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

cleanup: reorder condition

There is no point to wait for sync for non-locally active LV.
This commit is contained in:
Zdenek Kabelac 2018-03-29 22:53:13 +02:00
parent 1287edf626
commit 27a1a0e5c0

View File

@ -7149,6 +7149,12 @@ int wipe_lv(struct logical_volume *lv, struct wipe_params wp)
/* nothing to do */
return 1;
if (!lv_is_active_locally(lv)) {
log_error("Volume \"%s/%s\" is not active locally (volume_list activation filter?).",
lv->vg->name, lv->name);
return 0;
}
/* Wait until devices are available */
if (!sync_local_dev_names(lv->vg->cmd)) {
log_error("Failed to sync local devices before wiping LV %s.",
@ -7156,12 +7162,6 @@ int wipe_lv(struct logical_volume *lv, struct wipe_params wp)
return 0;
}
if (!lv_is_active_locally(lv)) {
log_error("Volume \"%s/%s\" is not active locally (volume_list activation filter?).",
lv->vg->name, lv->name);
return 0;
}
/*
* FIXME:
* <clausen> also, more than 4k