From: Hongchao Zhang Date: Thu, 28 Jul 2022 13:56:55 +0000 (+0800) Subject: LU-15996 quota: change 'none' to 'expired' for grace X-Git-Tag: 2.15.51~5 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F12%2F47912%2F7;p=fs%2Flustre-release.git 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 --- 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);