Whamcloud - gitweb
LU-19062 llapi: add layout pattern string functions 30/59530/9
authorAndreas Dilger <adilger@whamcloud.com>
Tue, 27 May 2025 04:02:22 +0000 (22:02 -0600)
committerOleg Drokin <green@whamcloud.com>
Mon, 23 Jun 2025 04:34:09 +0000 (04:34 +0000)
commit85f386d63e0a942e9a59d48179949f89470d9158
tree2c767c227049e965fa3be51bd4c80cd4054b2f22
parent1f8a750e3f591117f6e24952298dbde0cb49ba04
LU-19062 llapi: add layout pattern string functions

Add llapi_lov_pattern_string() to print arbitrary pattern flags to
a string rather than layout2name() which only can print specific
hard-coded combinations of patterns.

Add llapi_lov_string_pattern() to convert layout pattern names to
flags.

Add enum lov_pattern that holds LOV_PATTERN constants, and use it.

Add description of patterns to lfs-getstripe.1.
Restore "-L, --layout" argument listing to lfs-setstripe.1.

Fixes: b6deb420a8 ("LU-17370 utils: simplify lfs help text")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ie21c7c75c685f3a15ac23e83562a12a3ea2540e5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59530
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Zhenyu Xu <bobijam@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
14 files changed:
Documentation/man1/lfs-getstripe.1
Documentation/man1/lfs-setstripe.1
Documentation/man3/Makefile.am
Documentation/man3/llapi_lov_pattern_string.3 [new file with mode: 0644]
Documentation/man3/llapi_lov_string_pattern.3 [new file with mode: 0644]
lustre/include/lustre/lustreapi.h
lustre/include/uapi/linux/lustre/lustre_idl.h
lustre/include/uapi/linux/lustre/lustre_user.h
lustre/tests/sanity-hsm.sh
lustre/tests/sanity.sh
lustre/utils/lfs.c
lustre/utils/liblustreapi.c
lustre/utils/liblustreapi_hsm.c
lustre/utils/liblustreapi_layout.c