Whamcloud - gitweb
LU-14180 utils: verify setstripe comp_end is valid 39/41239/3
authorAndreas Dilger <adilger@whamcloud.com>
Tue, 26 Jan 2021 02:14:10 +0000 (18:14 -0800)
committerOleg Drokin <green@whamcloud.com>
Fri, 26 Feb 2021 20:13:28 +0000 (20:13 +0000)
commit83e38bba6237f838c9a5d7d36b258cf6dd28bd13
tree199b8defc2d0ceeacb4a2a9ce0c601eb22ca0d8c
parent8910291fc5ca71588e865ac2ec3a7fbb881a7082
LU-14180 utils: verify setstripe comp_end is valid

Verify that the "lfs setstripe -E <component_end>" value is valid.
Otherwise, if "-S" is not specified at the same time, then an
invalid file layout can be created and the file cannot be deleted
normally, only via "lfs rmdif <FID>".

Allow values < 4096 (e.g. '64' or '128' which would all be invalid
anyway) to be interpreted as KiB units.

Update usage messages and man pages to match.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Change-Id: I47fe7729ffd447c1c1cc098e5117e456263ebbe5
Reviewed-on: https://review.whamcloud.com/41239
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/doc/lfs-setstripe.1
lustre/lod/lod_lov.c
lustre/lod/lod_object.c
lustre/tests/sanity-pfl.sh
lustre/utils/lfs.c