Enhance stripe size validation
PATCH v2 1/1 Enhance stripe size validation
From: Zhiqing Zhang <[email protected]>
While stripe size is twice the physical extent size, the original code will not reduce stripe size to maximum(physical extent size).
Signed-off-by Zhiqing Zhang <[email protected]>
--- lib/metadata/lv_manip.c | 2 +- man/lvresize.8.in | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-)
lib/metadata/lv_manip.c +1 -1
@@ -3394,7 +3394,7 @@ static int _validate_stripesize(struct cmd_context *cmd,if (!(vg->fid->fmt->features &FMT_SEGMENTS ))log_warn ("Varied stripesize not supported. Ignoring." ); -else if (lp->ac_stripesize_value > (uint64_t ) vg->extent_size *2 ) { +else if (lp->ac_stripesize_value > (uint64_t ) vg->extent_size) { log_error("Reducing stripe size %s to maximum, " "physical extent size %s", display_size(cmd,lp->ac_stripesize_value),
man/lvresize.8.in +3 -1
@@ -88,7 +88,9 @@ Defaults to whatever the last segment of the Logical Volume uses. Not applicable to LVs using the original metadata LVM format, which must use a single value throughout. .br -StripeSize must be 2^n (n = 2 to 9). +StripeSize must be 2^n (n = 2 to 9) for metadata in LVM1 format. +For metadata in LVM2 format, the stripe size may be a larger +power of 2 but must not exceed the physical extent size. .TP .B \-\-noudevsync Disable udev synchronisation. The
Signature · 1 line
1.7.1
PATCH v2 1/1 Enhance stripe size validation
Dne 26.2.2014 03:14, Zhang Zhiqing napsal(a):
Quoted 4 lines
From: Zhiqing Zhang <[email protected]>
While stripe size is twice the physical extent size, the original code will not reduce stripe size to maximum(physical extent size).
Yep thanks, applied with some more updates.
https://www.redhat.com/archives/lvm-devel/2014-February/msg00159.html
Unification of strip size validation is definitely needed....
Regards
Zdenek
Quoted 35 lines
Signed-off-by Zhiqing Zhang <[email protected]>--- lib/metadata/lv_manip.c | 2 +- man/lvresize.8.in | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-)lib/metadata/lv_manip.c +1
-1@@ -3394,7 +3394,7 @@ static int _validate_stripesize(struct cmd_context *cmd,if (!(vg->fid->fmt->features &FMT_SEGMENTS ))log_warn ("Varied stripesize not supported. Ignoring." ); -else if (lp->ac_stripesize_value > (uint64_t ) vg->extent_size *2 ) { +else if (lp->ac_stripesize_value > (uint64_t ) vg->extent_size) { log_error("Reducing stripe size %s to maximum, " "physical extent size %s", display_size(cmd,lp->ac_stripesize_value),man/lvresize.8.in +3
-1@@ -88,7 +88,9 @@ Defaults to whatever the last segment of the Logical Volume uses. Not applicable to LVs using the original metadata LVM format, which must use a single value throughout. .br -StripeSize must be 2^n (n = 2 to 9). +StripeSize must be 2^n (n = 2 to 9) for metadata in LVM1 format. +For metadata in LVM2 format, the stripe size may be a larger +power of 2 but must not exceed the physical extent size. .TP .B \-\-noudevsync Disable udev synchronisation. The