mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
lvremove: few more validation before archive
Before we finally call archive, we still can do a few more validation without modifying VG. So delay archive() call few lines.
This commit is contained in:
parent
e2c4a3ef67
commit
979d12eb4a
@ -5404,9 +5404,6 @@ int lv_remove_single(struct cmd_context *cmd, struct logical_volume *lv,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!archive(vg))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (lv_is_cache(lv)) {
|
if (lv_is_cache(lv)) {
|
||||||
if (!lv_remove_single(cmd, first_seg(lv)->pool_lv, force,
|
if (!lv_remove_single(cmd, first_seg(lv)->pool_lv, force,
|
||||||
suppress_remove_message)) {
|
suppress_remove_message)) {
|
||||||
@ -5420,6 +5417,9 @@ int lv_remove_single(struct cmd_context *cmd, struct logical_volume *lv,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!archive(vg))
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (lv_is_cow(lv)) {
|
if (lv_is_cow(lv)) {
|
||||||
/* Old format1 code */
|
/* Old format1 code */
|
||||||
if (!(lv->vg->fid->fmt->features & FMT_MDAS))
|
if (!(lv->vg->fid->fmt->features & FMT_MDAS))
|
||||||
|
Loading…
Reference in New Issue
Block a user