Whamcloud - gitweb
LU-3383 utils: typo in lfs print_quota() function 44/6444/4
authorPatrick Valentin <patrick.valentin@bull.net>
Fri, 24 May 2013 12:14:20 +0000 (14:14 +0200)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 23 Jul 2013 05:30:01 +0000 (05:30 +0000)
In the print_quota() function of 'lfs quota' command, the following
sequence is to determine if the inode grace time is expired:
         if (dqb->dqb_btime > now) {
                 iover = 2;
The test must be done on dqb_itime (inode time), instead of
dqb_btime (data time).

Signed-off-by: Patrick Valentin <patrick.valentin@bull.net>
Change-Id: I1aa9dc9c25ba219ea2272165d21895220a9ef9a7
Reviewed-on: http://review.whamcloud.com/6444
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/utils/lfs.c

index 556f837..c9ed502 100644 (file)
@@ -2515,11 +2515,11 @@ static void print_quota(char *mnt, struct if_quotactl *qctl, int type, int rc)
                     dqb->dqb_curinodes >= dqb->dqb_ihardlimit) {
                         iover = 1;
                 } else if (dqb->dqb_isoftlimit && dqb->dqb_itime) {
-                        if (dqb->dqb_btime > now) {
-                                iover = 2;
-                        } else {
-                                iover = 3;
-                        }
+                       if (dqb->dqb_itime > now) {
+                               iover = 2;
+                       } else {
+                               iover = 3;
+                       }
                 }
 
 #if 0           /* XXX: always print quotas even when no usages */