Whamcloud - gitweb
LU-14180 utils: verify setstripe comp_end is valid
authorAndreas Dilger <adilger@whamcloud.com>
Sun, 28 Feb 2021 23:51:14 +0000 (15:51 -0800)
committerAndreas Dilger <adilger@whamcloud.com>
Sun, 7 Mar 2021 06:44:36 +0000 (06:44 +0000)
commitd645373541fcf69fe1e49095c2637cd90ef26dab
tree6017791eee9b1b76fc774835162a4ea5825f26eb
parentf3da4933799f184b1a7ec55cf05145c06b127ae4
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.

Lustre-change: https://review.whamcloud.com/41239
Lustre-commit: 83e38bba6237f838c9a5d7d36b258cf6dd28bd13

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/41790
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@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