1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

polldaemon: optimise out waiting after polling

Waiting even after _check_lv_status returned success and
'finished' flag was set to true doesn't make much sense.

Note that while we skip the wait() we also skip the
init_full_scan_done(0) inside the routine. This should
have no impact as long as the code after _wait_for_single_lv
doesn't presume anything about the state of the cache.
This commit is contained in:
Ondrej Kozina 2015-05-05 16:09:53 +02:00
parent 22ae43a11e
commit bda26acf70

View File

@ -209,7 +209,7 @@ static int _wait_for_single_lv(struct cmd_context *cmd, const char *name, const
* polldaemon(s) are polling. These other polldaemon(s) can then * polldaemon(s) are polling. These other polldaemon(s) can then
* continue polling an LV that doesn't have a "status". * continue polling an LV that doesn't have a "status".
*/ */
if (!parms->wait_before_testing) if (!parms->wait_before_testing && !finished)
_sleep_and_rescan_devices(parms); _sleep_and_rescan_devices(parms);
} }