Whamcloud - gitweb
LU-19062 llapi: add layout pattern string functions
authorAndreas Dilger <adilger@whamcloud.com>
Tue, 27 May 2025 04:02:22 +0000 (22:02 -0600)
committerOleg Drokin <green@linuxhacker.ru>
Fri, 13 Jun 2025 01:36:16 +0000 (21:36 -0400)
commitf80101d331eb85ef21e11284206e359b0c0c9c9f
tree3f957a661999918d794f351a6badda866b48aced
parentebd6a236a80ab6e07d6bcde631d4b10cefd78d35
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
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