Whamcloud - gitweb
LU-14645 utils: setstripe cleanup
authorVitaly Fertman <c17818@cray.com>
Tue, 20 Dec 2022 19:50:47 +0000 (11:50 -0800)
committerAndreas Dilger <adilger@whamcloud.com>
Wed, 4 Jan 2023 20:42:15 +0000 (20:42 +0000)
commit36b6510e57011dc3ede3adcca6010a16393515ef
tree830c0121c89da2cf5617fcd39896a2f8a9b2b688
parent0a0921b033ad0bb42a08b2f7d6c60a954cc83e99
LU-14645 utils: setstripe cleanup

lfs setstripe checks stripe parameters differently for PFL and !PFL
layouts. Whereas the PFL layout is checked in comp_args_to_layout()
individually and in llapi_layout_sanity_cb() in pairs, !PFL layout
verification is done partially in several places. Create a common
llapi_stripe_param_verify() for this purpose. Make the checks for
both cases symmetric.

skip some excessive checks:
- do not check the file is on lustre fs, the following ioctl does it;
- do not check the stripe-index is valid, done on MDS side;
- do not check the pool exists for a !PFL file (align with a setstripe
  for PFL files);

Lustre-change: https://review.whamcloud.com/43465
Lustre-commit: 149934fe28dac22a51ec9b2873c4f215cb204947

Lustre-change: https://review.whamcloud.com/46151
Lustre-commit: 5e65d6a8e57a5a17c4c7e043cb46e86bf82b7782

Lustre-change: https://review.whamcloud.com/46152
Lustre-commit: cd1f8527d414a12ec7eb5b69fe30509a45b33ad4

Signed-off-by: Vitaly Fertman <c17818@cray.com>
Change-Id: I456b1b2e876229ac1a354d4e3879624325856574
HPE-bug-id: LUS-9886
Reviewed-on: https://es-gerrit.dev.cray.com/158589
Reviewed-by: Andriy Skulysh <c17819@cray.com>
Reviewed-by: Alexander Boyko <c17825@cray.com>
Tested-by: Alexander Lezhoev <c17454@cray.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: Andriy Skulysh <askulysh@gmail.com>
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/49459
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
lustre/include/lustre/lustreapi.h
lustre/tests/ost-pools.sh
lustre/utils/lfs.c
lustre/utils/liblustreapi.c
lustre/utils/liblustreapi_layout.c
lustre/utils/lustreapi_internal.h