Whamcloud - gitweb
LU-15996 quota: change 'none' to 'expired' for grace 12/47912/7
authorHongchao Zhang <hongchao@whamcloud.com>
Thu, 28 Jul 2022 13:56:55 +0000 (21:56 +0800)
committerOleg Drokin <green@whamcloud.com>
Mon, 8 Aug 2022 19:53:46 +0000 (19:53 +0000)
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 <hongchao@whamcloud.com>
Change-Id: I7a3fac77ca6e16ad406bef0bd7642d6d50feb4b2
Reviewed-on: https://review.whamcloud.com/47912
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sergey Cheremencev <sergey.cheremencev@hpe.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity-quota.sh
lustre/utils/lfs.c

index dd3e94e..3d8c5aa 100755 (executable)
@@ -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
index 68a74da..111e4af 100644 (file)
@@ -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);