mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
thin: properly check for status for max sizes metadata
When metadata LV size was over DM_THIN_MAX_METADATA_SIZE sectors, the info() routine was incorrectly trying to match bigger size, while we do never pass any bigger device. Fixing a case, where lvs should be displaying status for metadata LV with 16GB size.
This commit is contained in:
parent
3503ef23e3
commit
1095322901
@ -1,5 +1,6 @@
|
||||
Version 2.02.170 -
|
||||
==================================
|
||||
Look for limited thin pool metadata size when using 16G metadata.
|
||||
Add lvconvert pool creation rule disallowing options with poolmetadata.
|
||||
Fix lvconvert when the same LV is incorrectly reused in options.
|
||||
Fix lvconvert VG name validation in option values.
|
||||
|
@ -260,6 +260,11 @@ static int _info_run(const char *dlid, struct dm_info *dminfo,
|
||||
start *= seg_status->seg->le;
|
||||
length *= _seg_len(seg_status->seg);
|
||||
|
||||
/* Uses max DM_THIN_MAX_METADATA_SIZE sectors for metadata device */
|
||||
if (lv_is_thin_pool_metadata(seg_status->seg->lv) &&
|
||||
(length > DM_THIN_MAX_METADATA_SIZE))
|
||||
length = DM_THIN_MAX_METADATA_SIZE;
|
||||
|
||||
do {
|
||||
target = dm_get_next_target(dmt, target, &target_start,
|
||||
&target_length, &target_name, &target_params);
|
||||
|
@ -37,6 +37,11 @@ lvcreate -L4M --chunksize 64k --poolmetadatasize 17G -T $vg/pool2 2>out
|
||||
grep "WARNING: Maximum" out
|
||||
check lv_field $vg/pool1_tmeta size "2.00m"
|
||||
check lv_field $vg/pool2_tmeta size "16.00g"
|
||||
|
||||
# Check can start and see thinpool with metadata size above kernel limit
|
||||
lvcreate -L4M --poolmetadatasize 16G -T $vg/poolM
|
||||
check lv_field $vg/poolM data_percent "0.00"
|
||||
|
||||
lvremove -ff $vg
|
||||
|
||||
# Test automatic calculation of pool metadata size
|
||||
|
Loading…
Reference in New Issue
Block a user