mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
resize: continue change for getting vdo status before resize
Continue commit a98b77c16455ee97f5bd4b89536a3ae4efd8e009. There needs to be error reported when status can't be obtained.
This commit is contained in:
parent
cb5f0bdba9
commit
6a9a4b4534
@ -4852,7 +4852,7 @@ static int _lvresize_adjust_policy(const struct logical_volume *lv,
|
||||
|
||||
if (lv_is_thin_pool(lv)) {
|
||||
if (!lv_thin_pool_percent(lv, 1, &percent))
|
||||
return_0;
|
||||
goto_bad;
|
||||
|
||||
/* Resize below the minimal usable value */
|
||||
min_threshold = pool_metadata_min_threshold(first_seg(lv)) / DM_PERCENT_1;
|
||||
@ -4860,13 +4860,14 @@ static int _lvresize_adjust_policy(const struct logical_volume *lv,
|
||||
min_threshold : policy_threshold, policy_amount);
|
||||
|
||||
if (!lv_thin_pool_percent(lv, 0, &percent))
|
||||
return_0;
|
||||
goto_bad;
|
||||
} else if (lv_is_vdo_pool(lv)) {
|
||||
if (!lv_vdo_pool_percent(lv, &percent))
|
||||
return_0;
|
||||
goto_bad;
|
||||
} else if (!lv_snapshot_percent(lv, &percent))
|
||||
return_0;
|
||||
goto_bad;
|
||||
else if (!lv_is_active(lv)) {
|
||||
bad:
|
||||
log_error("Can't read state of locally inactive LV %s.",
|
||||
display_lvname(lv));
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user