Whamcloud - gitweb
LU-13589 utils: fix lfs setstripe unit parsing 80/38680/2
authorAndreas Dilger <adilger@whamcloud.com>
Wed, 20 May 2020 18:19:32 +0000 (12:19 -0600)
committerOleg Drokin <green@whamcloud.com>
Wed, 27 May 2020 17:30:01 +0000 (17:30 +0000)
commit4e7fd8821da4da2148c5044f416e390c42faf3b8
tree83fed2e55faff498893f6cf75d6a7643d4b676b9
parent775ce1c26c843d9ef9e6919f85e5284828762095
LU-13589 utils: fix lfs setstripe unit parsing

The "size_units" variable was not being reset while parsing different
"lfs setstripe" arguments, so e.g. "lfs setstripe -E 1M -S 65536 ..."
ended up using the 'M' unit for the stripe size, which resulted in a
stripe_size of 65536MiB = 64GiB, which resulted in an error.

This only appeared with PFL or other layout patterns which had more
than one unit being parsed, and was already fixed in master via SEL.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ib3f9be86f5104aaea4f77d87853255a518cbc3a0
Reviewed-on: https://review.whamcloud.com/38680
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Emoly Liu <emoly@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/utils/lfs.c