mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
vdo: enable dmeventd resize
This commit is contained in:
parent
3d367f3348
commit
f3c52a515b
@ -255,8 +255,7 @@ void process_event(struct dm_task *dmt,
|
|||||||
} else
|
} else
|
||||||
state->max_fails = 1; /* Reset on success */
|
state->max_fails = 1; /* Reset on success */
|
||||||
|
|
||||||
/* FIXME: ATM nothing can be done, drop 0, once it becomes useful */
|
if (needs_policy)
|
||||||
if (0 && needs_policy)
|
|
||||||
_use_policy(dmt, state);
|
_use_policy(dmt, state);
|
||||||
out:
|
out:
|
||||||
if (vdop.status)
|
if (vdop.status)
|
||||||
|
@ -4795,6 +4795,18 @@ static int _lvresize_adjust_policy(const struct logical_volume *lv,
|
|||||||
"minimum supported 50%%.", policy_threshold);
|
"minimum supported 50%%.", policy_threshold);
|
||||||
policy_threshold = 50;
|
policy_threshold = 50;
|
||||||
}
|
}
|
||||||
|
} else if (lv_is_vdo_pool(lv)) {
|
||||||
|
policy_threshold =
|
||||||
|
find_config_tree_int(cmd, activation_vdo_pool_autoextend_threshold_CFG,
|
||||||
|
lv_config_profile(lv));
|
||||||
|
policy_amount =
|
||||||
|
find_config_tree_int(cmd, activation_vdo_pool_autoextend_percent_CFG,
|
||||||
|
lv_config_profile(lv));
|
||||||
|
if (policy_threshold < 50) {
|
||||||
|
log_warn("WARNING: VDO pool autoextend threshold %d%% is set below "
|
||||||
|
"minimum supported 50%%.", policy_threshold);
|
||||||
|
policy_threshold = 50;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
policy_threshold =
|
policy_threshold =
|
||||||
find_config_tree_int(cmd, activation_snapshot_autoextend_threshold_CFG, NULL);
|
find_config_tree_int(cmd, activation_snapshot_autoextend_threshold_CFG, NULL);
|
||||||
@ -4833,6 +4845,9 @@ static int _lvresize_adjust_policy(const struct logical_volume *lv,
|
|||||||
|
|
||||||
if (!lv_thin_pool_percent(lv, 0, &percent))
|
if (!lv_thin_pool_percent(lv, 0, &percent))
|
||||||
return_0;
|
return_0;
|
||||||
|
} else if (lv_is_vdo_pool(lv)) {
|
||||||
|
if (!lv_vdo_pool_percent(lv, &percent))
|
||||||
|
return_0;
|
||||||
} else {
|
} else {
|
||||||
if (!lv_snapshot_percent(lv, &percent))
|
if (!lv_snapshot_percent(lv, &percent))
|
||||||
return_0;
|
return_0;
|
||||||
@ -4916,7 +4931,10 @@ static int _lvresize_check(struct logical_volume *lv,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lp->use_policies && !lv_is_cow(lv) && !lv_is_thin_pool(lv)) {
|
if (lp->use_policies &&
|
||||||
|
!lv_is_cow(lv) &&
|
||||||
|
!lv_is_thin_pool(lv) &&
|
||||||
|
!lv_is_vdo_pool(lv)) {
|
||||||
log_error("Policy-based resize is supported only for snapshot and thin pool volumes.");
|
log_error("Policy-based resize is supported only for snapshot and thin pool volumes.");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user