mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-18 10:04:20 +03:00
dmeventd: time scaling for status retry
In normal case it's too slow to wait 1 second for default. So rather start with short time and increase sleep between status retesting.
This commit is contained in:
parent
62c7027a7c
commit
0dc73f7dbd
@ -1649,7 +1649,7 @@ 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 < 10; i++) {
|
for (i = 0; i < 40; 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 ||
|
||||||
@ -1659,7 +1659,7 @@ int monitor_dev_for_events(struct cmd_context *cmd, const struct logical_volume
|
|||||||
lv->vg->name, lv->name, monitor ? "" : "un");
|
lv->vg->name, lv->name, monitor ? "" : "un");
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
sleep(1);
|
usleep(10000 * i);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r)
|
if (r)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user