mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
thin: rename function
Rename pool_can_resize_metadata() to more reusable thin_pool_feature_supported() which could be queried for mutiple different features.
This commit is contained in:
parent
1d7b2715e5
commit
2dae78b722
@ -1,5 +1,6 @@
|
||||
Version 2.02.106 -
|
||||
====================================
|
||||
Rename internal pool_can_resize_metadata() to thin_pool_feature_supported().
|
||||
Issue error if libbblkid detects signature and fails to return offset/length.
|
||||
Update autoconf config.guess/sub to 2014-01-01.
|
||||
Online thin pool metadata resize requires 1.10 kernel thin pool target.
|
||||
|
@ -3469,7 +3469,7 @@ static int _adjust_policy_params(struct cmd_context *cmd,
|
||||
return_0;
|
||||
if ((PERCENT_0 < percent && percent <= PERCENT_100) &&
|
||||
(percent > policy_threshold)) {
|
||||
if (!pool_can_resize_metadata(lv)) {
|
||||
if (!thin_pool_feature_supported(lv, THIN_FEATURE_METADATA_RESIZE)) {
|
||||
log_error_once("Online metadata resize for %s/%s is not supported.",
|
||||
lp->vg_name, lp->lv_name);
|
||||
return 0;
|
||||
@ -3535,7 +3535,7 @@ static int _lvresize_poolmetadata_prepare(struct cmd_context *cmd,
|
||||
|
||||
lp->poolmetadataextents = 0;
|
||||
|
||||
if (!pool_can_resize_metadata(pool_lv)) {
|
||||
if (!thin_pool_feature_supported(pool_lv, THIN_FEATURE_METADATA_RESIZE)) {
|
||||
log_error("Support for online metadata resize not detected.");
|
||||
return 0;
|
||||
}
|
||||
|
@ -674,7 +674,7 @@ uint64_t extents_from_size(struct cmd_context *cmd, uint64_t size,
|
||||
|
||||
struct logical_volume *find_pool_lv(const struct logical_volume *lv);
|
||||
int pool_is_active(const struct logical_volume *pool_lv);
|
||||
int pool_can_resize_metadata(const struct logical_volume *pool_lv);
|
||||
int thin_pool_feature_supported(const struct logical_volume *pool_lv, int feature);
|
||||
int update_pool_lv(struct logical_volume *lv, int activate);
|
||||
int update_profilable_pool_params(struct cmd_context *cmd, struct profile *profile,
|
||||
int passed_args, int *chunk_size_calc_method,
|
||||
|
@ -206,7 +206,7 @@ int pool_is_active(const struct logical_volume *lv)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int pool_can_resize_metadata(const struct logical_volume *lv)
|
||||
int thin_pool_feature_supported(const struct logical_volume *lv, int feature)
|
||||
{
|
||||
static unsigned attr = 0U;
|
||||
struct lv_segment *seg;
|
||||
@ -225,7 +225,7 @@ int pool_can_resize_metadata(const struct logical_volume *lv)
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (attr & THIN_FEATURE_METADATA_RESIZE) ? 1 : 0;
|
||||
return (attr & feature) ? 1 : 0;
|
||||
}
|
||||
|
||||
int pool_below_threshold(const struct lv_segment *pool_seg)
|
||||
|
Loading…
Reference in New Issue
Block a user