diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2012-03-02 17:25:21 +0000 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2012-03-02 17:25:21 +0000 |
commit | 1babf249494759dbd0c144cf74f48eb05010a0f5 (patch) | |
tree | 2494db80b38945babf3412e3570df380107fe44f | |
parent | d06f64dd29a689ab0e97659a37ccb83819b75c3a (diff) | |
download | lvm2-1babf249494759dbd0c144cf74f48eb05010a0f5.tar.gz lvm2-1babf249494759dbd0c144cf74f48eb05010a0f5.tar.xz lvm2-1babf249494759dbd0c144cf74f48eb05010a0f5.zip |
Fix estimation of pool metadata device size
If no size was give the later added minimal size check efectively
disable this code. Also the argument for size now must be kept
in sector_size, so adding division by SECTOR_SIZE (moved into
a const expression)
-rw-r--r-- | WHATS_NEW | 1 | ||||
-rw-r--r-- | tools/lvcreate.c | 4 |
2 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,6 @@ Version 2.02.94 - ==================================== + Fix automatic estimation of metadata device size for thin pool. Test for alloc fail from _alloc_pv_segment() in _extend_pv(). Check for alloc fail from get_segtype_from_string() in _lvcreate_params(). Add _rimage as reserved suffix to lvm.8 man page. diff --git a/tools/lvcreate.c b/tools/lvcreate.c index eecc08b7..d5df59eb 100644 --- a/tools/lvcreate.c +++ b/tools/lvcreate.c @@ -293,10 +293,10 @@ static int _update_extents_params(struct volume_group *vg, break; } - if (lp->create_thin_pool && !lp->poolmetadatasize) + if (lp->create_thin_pool && !arg_count(vg->cmd, poolmetadatasize_ARG)) /* Defaults to nr_pool_blocks * 64b */ lp->poolmetadatasize = (uint64_t) lp->extents * vg->extent_size / - (uint64_t) lp->chunk_size * UINT64_C(64); + (uint64_t) (lp->chunk_size * (SECTOR_SIZE / UINT64_C(64))); if (lp->poolmetadatasize && !(lp->poolmetadataextents = extents_from_size(vg->cmd, lp->poolmetadatasize, |