From: Andreas Dilger Date: Thu, 9 Dec 2021 20:26:50 +0000 (-0700) Subject: LU-930 utils: add --lazy option to 'lfs find' usage X-Git-Tag: 2.14.57~50 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=e37adf512c6b08a3c008da051d76f68ad63d508c LU-930 utils: add --lazy option to 'lfs find' usage The usage message for "lfs find" does not show the "--lazy" option to allow checking LSOM data from the MDT instead of getting size and blocks from the OSTs. Also sort the options in the "lfs find" usage to be roughly in alphabetical order. Test-Parameters: trivial Fixes: 11aa7f8704c4 ("LU-11367 som: integrate LSOM with lfs find") Signed-off-by: Andreas Dilger Change-Id: Iafea18b2d74d889bb258f2be4b3af0f9203ebbe5 Reviewed-on: https://review.whamcloud.com/45816 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Yingjin Qian Reviewed-by: Jian Yu Reviewed-by: Olaf Faaland-LLNL Reviewed-by: Oleg Drokin --- diff --git a/lustre/utils/lfs.c b/lustre/utils/lfs.c index c4ee1f1..048b958 100644 --- a/lustre/utils/lfs.c +++ b/lustre/utils/lfs.c @@ -399,32 +399,29 @@ command_t cmdlist[] = { {"find", lfs_find, 0, "find files matching given attributes recursively in directory tree.\n" "usage: find ...\n" - " [[!] --atime|-A [+-]N[smhdwy]] [[!] --ctime|-C [+-]N[smhdwy]]\n" - " [[!] --mtime|-M [+-]N[smhdwy]]\n" - " [[!] --btime|--Btime|-B [+-]N[smhdwy]] [--help|-h]\n" - " [[!] --newer[XY] ] [[!] --blocks|-b N]\n" - " [--maxdepth|-D N] [[!] --mdt-index|--mdt|-m ]\n" - " [[!] --name|-n ] [[!] --ost|-O ]\n" - " [[!] --perm [/-]mode] [[!] --pool ] [--print|-P]\n" - " [--print0|-0] [[!] --projid ]\n" - " [[!] --size|-s [+-]N[bkMGTPE]]\n" - " [[!] --stripe-count|-c [+-]]\n" - " [[!] --stripe-index|-i ]\n" - " [[!] --stripe-size|-S [+-]N[kMGT]] [[!] --type|-t ]\n" - " [[!] --extension-size|--ext-size|-z [+-]N[kMGT]]\n" - " [[!] --gid|-g|--group|-G |]\n" - " [[!] --uid|-u|--user|-U |]\n" - " [[!] --layout|-L released,raid0,mdt]\n" - " [[!] --foreign[=]]\n" - " [[!] --component-count [+-]]\n" + " [[!] --atime|-A [+-]N[smhdwy]] [[!] --btime|-B [+-]N[smhdwy]]\n" + " [[!] --ctime|-C [+-]N[smhdwy]] [[!] --mtime|-M [+-]N[smhdwy]]\n" + " [[!] --blocks|-b N] [[!] --component-count [+-]]\n" " [[!] --component-start [+-]N[kMGTPE]]\n" " [[!] --component-end|-E [+-]N[kMGTPE]]\n" " [[!] --component-flags {init,stale,prefer,offline,nosync,extension}]\n" + " [[!] --extension-size|--ext-size|-z [+-]N[kMGT]]\n" + " [[!] --foreign[=]]\n" + " [[!] --gid|-g|--group|-G |] [--help|-h]\n" + " [[!] --layout|-L released,raid0,mdt] [--lazy]\n" + " [--maxdepth|-D N] [[!] --mdt-count|-T [+-]]\n" + " [[!] --mdt-hash|-H <[^][blm],[^]fnv_1a_64,all_char,crush,...>\n" + " [[!] --mdt-index|--mdt|-m ]\n" " [[!] --mirror-count|-N [+-]]\n" " [[!] --mirror-state <[^]state>]\n" - " [[!] --mdt-count|-T [+-]]\n" - " [[!] --mdt-hash|-H <[^][blm],[^]fnv_1a_64,all_char,crush,...>\n" - " [[!] --mdt-index|-m ]\n" + " [[!] --name|-n ] [[!] --newer[XY] ]\n" + " [[!] --ost|-O ] [[!] --perm [/-]mode]\n" + " [[!] --pool ] [--print|-P] [--print0|-0]\n" + " [[!] --projid ] [[!] --size|-s [+-]N[bkMGTPE]]\n" + " [[!] --stripe-count|-c [+-]]\n" + " [[!] --stripe-index|-i ]\n" + " [[!] --stripe-size|-S [+-]N[kMGT]] [[!] --type|-t ]\n" + " [[!] --uid|-u|--user|-U |]\n" "\t !: used before an option indicates 'NOT' requested attribute\n" "\t -: used before a value indicates less than requested value\n" "\t +: used before a value indicates more than requested value\n" @@ -4896,6 +4893,8 @@ static int lfs_find(int argc, char **argv) /* find { .val = 'o' .name = "or", .has_arg = no_argument }, like find(1) */ { .val = 'O', .name = "obd", .has_arg = required_argument }, { .val = 'O', .name = "ost", .has_arg = required_argument }, + { .val = LFS_FIND_PERM, + .name = "perm", .has_arg = required_argument }, /* no short option for pool yet, can be 'p' after 2.18 */ { .val = LFS_POOL_OPT, .name = "pool", .has_arg = required_argument }, @@ -4910,8 +4909,6 @@ static int lfs_find(int argc, char **argv) { .val = 'S', .name = "stripe-size", .has_arg = required_argument }, { .val = 'S', .name = "stripe_size", .has_arg = required_argument }, { .val = 't', .name = "type", .has_arg = required_argument }, - { .val = LFS_FIND_PERM, - .name = "perm", .has_arg = required_argument }, { .val = 'T', .name = "mdt-count", .has_arg = required_argument }, { .val = 'u', .name = "uid", .has_arg = required_argument }, { .val = 'U', .name = "user", .has_arg = required_argument },