From b7f8b55374b139578ad6f9cf7168b945e3bab0be Mon Sep 17 00:00:00 2001 From: Lei Feng Date: Mon, 26 Jul 2021 08:48:01 +0800 Subject: [PATCH] EX-3323 lipe: add --roid option for lpcc_purge Command line option --roid is an alias of --rwid of lpcc_purge. Change-Id: I1ff9c828ce92cadf9d97db4b91be9825824a7fc2 Signed-off-by: Lei Feng Test-Parameters: trivial Reviewed-on: https://review.whamcloud.com/44005 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Yingjin Qian Reviewed-by: Li Xi --- lipe/src/lpcc_purge.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lipe/src/lpcc_purge.c b/lipe/src/lpcc_purge.c index 42d9f68..50689d9 100644 --- a/lipe/src/lpcc_purge.c +++ b/lipe/src/lpcc_purge.c @@ -260,7 +260,7 @@ static void usage(void) "\t-f, --config-file=FILE\n" "\t-C, --cache=DIR root directory of PCC\n" "\t-M, --mount=DIR local Lustre client's mountpoint\n" - "\t-A, --rwid=NUM the rwid of PCC\n" + "\t-A, --rwid, --roid=NUM the roid/rwid of PCC\n" "\t-H, --high-usage=NUM %% of space or inode to start purging (default: %u)\n" "\t-L, --low-usage=NUM %% of space or inode to stop purging (default: %u)\n" "\t-i, --interval=NUM, seconds to next check (default: %u)\n" @@ -287,6 +287,7 @@ static struct option long_options[] = { { "cache", required_argument, NULL, 'C'}, { "mount", required_argument, NULL, 'M'}, { "rwid", required_argument, NULL, 'A'}, + { "roid", required_argument, NULL, 'A'}, { "high-usage", required_argument, NULL, 'H'}, { "low-usage", required_argument, NULL, 'L'}, { "interval", required_argument, NULL, 'i'}, @@ -485,7 +486,7 @@ static void lpcc_purge_process_opt(int c, char *optarg) value = strtol(optarg, &endptr, 10); if (*endptr != '\0' || value <= 0) { llapi_error(LLAPI_MSG_FATAL, -EINVAL, - "invalid rwid: '%s'", + "invalid roid/rwid: '%s'", optarg); exit(1); } @@ -600,7 +601,7 @@ void lpcc_purge_verify_opts(void) } if (opt.o_rwid == -1) { llapi_error(LLAPI_MSG_FATAL, EINVAL, - "rwid mount point must be specified"); + "roid/rwid must be specified"); exit(1); } if (opt.o_dumpfile == NULL) { -- 1.8.3.1