diff options
author | David Teigland <teigland@redhat.com> | 2018-04-13 14:40:00 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2018-04-20 11:22:48 -0500 |
commit | 7b0a8f47be7df13aab0552599aa2dc2233cc223c (patch) | |
tree | 1240ddd59cbb576047599685a5ec9b06d8c852dc /tools/polldaemon.c | |
parent | aa833bdd8aa6a3e3557b19fa3877b0eee806df63 (diff) | |
download | lvm2-7b0a8f47be7df13aab0552599aa2dc2233cc223c.tar.gz |
lvmpolld: update to use new scanning correctly
Diffstat (limited to 'tools/polldaemon.c')
-rw-r--r-- | tools/polldaemon.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/polldaemon.c b/tools/polldaemon.c index cf7a94721..83f0424dc 100644 --- a/tools/polldaemon.c +++ b/tools/polldaemon.c @@ -126,6 +126,14 @@ static void _nanosleep(unsigned secs, unsigned allow_zero_time) static void _sleep_and_rescan_devices(struct cmd_context *cmd, struct daemon_parms *parms) { if (parms->interval && !parms->aborting) { + /* + * FIXME: do we really need to drop everything and then rescan + * everything between each iteration? What change exactly does + * each iteration check for, and does seeing that require + * rescanning everything? + */ + lvmcache_destroy(cmd, 1, 0); + label_scan_destroy(cmd); dev_close_all(); _nanosleep(parms->interval, 1); lvmcache_label_scan(cmd); @@ -141,6 +149,9 @@ int wait_for_single_lv(struct cmd_context *cmd, struct poll_operation_id *id, uint32_t lockd_state = 0; int ret; + if (!parms->wait_before_testing) + lvmcache_label_scan(cmd); + /* Poll for completion */ while (!finished) { if (parms->wait_before_testing) |