Whamcloud - gitweb
LU-10011 utils: suppress annoying messages for project quota 00/29600/4
authorWang Shilong <wshilong@ddn.com>
Tue, 19 Sep 2017 13:10:48 +0000 (21:10 +0800)
committerJohn L. Hammond <john.hammond@intel.com>
Tue, 19 Dec 2017 18:28:48 +0000 (18:28 +0000)
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 <unknown> (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 <mnt> will only
output current user/group quota information in default

Lustre-change: https://review.whamcloud.com/29107
Lustre-commit: 0ba70b538768871f8504aca1ed6a24472f46a87d

Change-Id: Ie76ba14c4c4486a9246aafed0e8538eaae85ee98
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/29600
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
lustre/utils/lfs.c

index 83c4226..1abe70b 100644 (file)
@@ -4157,7 +4157,8 @@ all_output:
                        break;
                default:
                        rc = -ENOTSUP;
-                       break;
+                       pass++;
+                       goto out;
                }
                if (rc)
                        name = "<unknown>";