From 0ba70b538768871f8504aca1ed6a24472f46a87d Mon Sep 17 00:00:00 2001 From: Wang Shilong Date: Tue, 19 Sep 2017 21:10:48 +0800 Subject: [PATCH] LU-10011 utils: suppress annoying messages for project quota See following output: [wsl@w003 ~]$ lfs quota /lustre1 Disk quotas for usr wsl (uid 14434): Filesystem kbytes quota limit grace files quota limit grace /lustre1 0 0 0 - 0 0 0 - Disk quotas for grp se (gid 1000): Filesystem kbytes quota limit grace files quota limit grace /lustre1 44028 0 0 - 40 0 0 - Unexpected quotactl error: Operation not supported Disk quotas for prj (pid 0): Filesystem kbytes quota limit grace files quota limit grace /lustre1 [0] [0] [0] - [0] [0] [0] - Some errors happened when getting quota info. Some devices may be not working or deactivated. The data in "[]" is inaccurate. Since project quota is disabled in default, unsupported project quota messages will be annoying here. Even Project quota is enabled, project id 0 will be outputed here, it dose not make much sense either, instead, lfs quota will only output current user/group quota information in default Change-Id: Ie76ba14c4c4486a9246aafed0e8538eaae85ee98 Signed-off-by: Wang Shilong Reviewed-on: https://review.whamcloud.com/29107 Reviewed-by: Andreas Dilger Reviewed-by: Li Xi Reviewed-by: Emoly Liu Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/utils/lfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lustre/utils/lfs.c b/lustre/utils/lfs.c index dc07fb9..28795ce 100644 --- a/lustre/utils/lfs.c +++ b/lustre/utils/lfs.c @@ -4185,7 +4185,8 @@ all_output: break; default: rc = -ENOTSUP; - break; + pass++; + goto out; } if (rc) name = ""; -- 1.8.3.1