From 53cb250382c1b0dc5063c0c37751df961082b36c Mon Sep 17 00:00:00 2001 From: Hongchao Zhang Date: Thu, 28 Jul 2022 21:56:55 +0800 Subject: [PATCH] LU-15996 quota: change 'none' to 'expired' for grace If the grace time is expired, the output of grace in 'lfs quota' is better to use 'expired' than 'none'. Test-Parameters: trivial testlist=sanity-quota Signed-off-by: Honghao Zhang Change-Id: I7a3fac77ca6e16ad406bef0bd7642d6d50feb4b2 Reviewed-on: https://review.whamcloud.com/47912 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Sergey Cheremencev Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- lustre/tests/sanity-quota.sh | 2 +- lustre/utils/lfs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lustre/tests/sanity-quota.sh b/lustre/tests/sanity-quota.sh index dd3e94e..3d8c5aa 100755 --- a/lustre/tests/sanity-quota.sh +++ b/lustre/tests/sanity-quota.sh @@ -394,7 +394,7 @@ wait_grace_time() { echo "Sleep through grace ..." [ "$orig_time" == "-" ] && error "Grace timeout was not set or quota not exceeded" - if [ "$orig_time" == "none" ]; then + if [ "$orig_time" == "expired" -o "$orig_time" == "none" ]; then echo "...Grace timeout already expired" else let sleep_seconds+=$extrasleep diff --git a/lustre/utils/lfs.c b/lustre/utils/lfs.c index 68a74da..111e4af 100644 --- a/lustre/utils/lfs.c +++ b/lustre/utils/lfs.c @@ -8043,7 +8043,7 @@ static void diff2str(time_t seconds, char *buf, time_t now) if (!seconds) return; if (seconds <= now) { - strcpy(buf, "none"); + strcpy(buf, "expired"); return; } __sec2str(seconds - now, buf); -- 1.8.3.1