mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-11 20:58:50 +03:00
wipe_lv: move sync_local_dev_names in front
Synchronize things before checking for locally active volume.
This commit is contained in:
parent
d8b775f4eb
commit
f1e9e94a5b
@ -6360,6 +6360,8 @@ int wipe_lv(struct logical_volume *lv, struct wipe_params wp)
|
|||||||
/* nothing to do */
|
/* nothing to do */
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
sync_local_dev_names(lv->vg->cmd); /* Wait until devices are available */
|
||||||
|
|
||||||
if (!lv_is_active_locally(lv)) {
|
if (!lv_is_active_locally(lv)) {
|
||||||
log_error("Volume \"%s/%s\" is not active locally.",
|
log_error("Volume \"%s/%s\" is not active locally.",
|
||||||
lv->vg->name, lv->name);
|
lv->vg->name, lv->name);
|
||||||
@ -6379,8 +6381,6 @@ int wipe_lv(struct logical_volume *lv, struct wipe_params wp)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
sync_local_dev_names(lv->vg->cmd); /* Wait until devices are available */
|
|
||||||
|
|
||||||
if (!(dev = dev_cache_get(name, NULL))) {
|
if (!(dev = dev_cache_get(name, NULL))) {
|
||||||
log_error("%s: not found: device not cleared", name);
|
log_error("%s: not found: device not cleared", name);
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user