mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-31 21:18:26 +03:00
activation: trust 'pending' status reported by dmeventd
Only usleep when dmeventd reports 'pending' otherwise trust reported state.
This commit is contained in:
parent
05dd566a52
commit
65b82a8072
@ -1948,16 +1948,13 @@ int monitor_dev_for_events(struct cmd_context *cmd, const struct logical_volume
|
|||||||
|
|
||||||
/* Check [un]monitor results */
|
/* Check [un]monitor results */
|
||||||
/* Try a couple times if pending, but not forever... */
|
/* Try a couple times if pending, but not forever... */
|
||||||
for (i = 0; i < 40; i++) {
|
for (i = 0;; i++) {
|
||||||
pending = 0;
|
pending = 0;
|
||||||
monitored = seg->segtype->ops->target_monitored(seg, &pending);
|
monitored = seg->segtype->ops->target_monitored(seg, &pending);
|
||||||
if (pending ||
|
if (!pending || i >= 40)
|
||||||
(!monitored && monitor) ||
|
|
||||||
(monitored && !monitor))
|
|
||||||
log_very_verbose("%s %smonitoring still pending: waiting...",
|
|
||||||
display_lvname(lv), monitor ? "" : "un");
|
|
||||||
else
|
|
||||||
break;
|
break;
|
||||||
|
log_very_verbose("%s %smonitoring still pending: waiting...",
|
||||||
|
display_lvname(lv), monitor ? "" : "un");
|
||||||
usleep(10000 * i);
|
usleep(10000 * i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user