1
0
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:
David Teigland 2022-09-27 12:59:17 -05:00
parent c1ab9fb37f
commit 3ca44e13be

View File

@ -6856,10 +6856,12 @@ int lv_resize(struct cmd_context *cmd, struct logical_volume *lv,
is_active = lv_is_active(lv_top);
if (is_reduce && !is_active && !strcmp(lp->fsopt, "checksize")) {
lv_top->status |= LV_TEMPORARY;
if (!activate_lv(cmd, lv_top)) {
log_error("Failed to activate %s to check for fs.", display_lvname(lv_top));
goto out;
}
lv_top->status &= ~LV_TEMPORARY;
if (!sync_local_dev_names(cmd))
stack;
activated_checksize = 1;