mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
thin: fix feature compare function
Comparing for available feature missed the code path, when maj is already bigger. The bug would be only hit in the case, thin pool target would have increased major version.
This commit is contained in:
parent
902b343e0e
commit
f8b20fb8e8
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.106 -
|
Version 2.02.106 -
|
||||||
====================================
|
====================================
|
||||||
|
Fix test when checking target version for available thin features.
|
||||||
Detect thin feature external_origin_extend and limit extend when missing.
|
Detect thin feature external_origin_extend and limit extend when missing.
|
||||||
Rename internal pool_can_resize_metadata() to thin_pool_feature_supported().
|
Rename internal pool_can_resize_metadata() to thin_pool_feature_supported().
|
||||||
Issue error if libbblkid detects signature and fails to return offset/length.
|
Issue error if libbblkid detects signature and fails to return offset/length.
|
||||||
|
@ -651,7 +651,8 @@ static int _thin_target_present(struct cmd_context *cmd,
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < sizeof(_features)/sizeof(*_features); i++)
|
for (i = 0; i < sizeof(_features)/sizeof(*_features); i++)
|
||||||
if (maj >= _features[i].maj && min >= _features[i].min)
|
if ((maj > _features[i].maj) ||
|
||||||
|
(maj == _features[i].maj && min >= _features[i].min))
|
||||||
_attrs |= _features[i].thin_feature;
|
_attrs |= _features[i].thin_feature;
|
||||||
else
|
else
|
||||||
log_very_verbose("Target %s does not support %s.",
|
log_very_verbose("Target %s does not support %s.",
|
||||||
|
Loading…
Reference in New Issue
Block a user