mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
lvreduce: use temporary flag when activating lv to check for fs
This flag is meant to suppress udev processing of the LV.
This commit is contained in:
parent
c1ab9fb37f
commit
3ca44e13be
@ -6856,10 +6856,12 @@ int lv_resize(struct cmd_context *cmd, struct logical_volume *lv,
|
|||||||
is_active = lv_is_active(lv_top);
|
is_active = lv_is_active(lv_top);
|
||||||
|
|
||||||
if (is_reduce && !is_active && !strcmp(lp->fsopt, "checksize")) {
|
if (is_reduce && !is_active && !strcmp(lp->fsopt, "checksize")) {
|
||||||
|
lv_top->status |= LV_TEMPORARY;
|
||||||
if (!activate_lv(cmd, lv_top)) {
|
if (!activate_lv(cmd, lv_top)) {
|
||||||
log_error("Failed to activate %s to check for fs.", display_lvname(lv_top));
|
log_error("Failed to activate %s to check for fs.", display_lvname(lv_top));
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
lv_top->status &= ~LV_TEMPORARY;
|
||||||
if (!sync_local_dev_names(cmd))
|
if (!sync_local_dev_names(cmd))
|
||||||
stack;
|
stack;
|
||||||
activated_checksize = 1;
|
activated_checksize = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user