1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00

wipe_lv: move sync_local_dev_names in front

Synchronize things before checking for locally active volume.
This commit is contained in:
Zdenek Kabelac 2014-09-19 11:06:31 +02:00
parent d8b775f4eb
commit f1e9e94a5b

View File

@ -6360,6 +6360,8 @@ int wipe_lv(struct logical_volume *lv, struct wipe_params wp)
/* nothing to do */
return 1;
sync_local_dev_names(lv->vg->cmd); /* Wait until devices are available */
if (!lv_is_active_locally(lv)) {
log_error("Volume \"%s/%s\" is not active locally.",
lv->vg->name, lv->name);
@ -6379,8 +6381,6 @@ int wipe_lv(struct logical_volume *lv, struct wipe_params wp)
return 0;
}
sync_local_dev_names(lv->vg->cmd); /* Wait until devices are available */
if (!(dev = dev_cache_get(name, NULL))) {
log_error("%s: not found: device not cleared", name);
return 0;