Whamcloud - gitweb
Branch b1_6
authorbobijam <bobijam>
Thu, 29 Nov 2007 01:45:59 +0000 (01:45 +0000)
committerbobijam <bobijam>
Thu, 29 Nov 2007 01:45:59 +0000 (01:45 +0000)
b=14283
i=zhenyu.xu, oleg.drokin

show "used" as only the used space, to match "df".

lustre/utils/lfs.c

index e188b94..fae0aad 100644 (file)
@@ -724,8 +724,8 @@ static int showdf(char *mntdir, struct obd_statfs *stat,
                         int shift = cooked ? 0 : 10;
 
                         avail = (stat->os_bavail * stat->os_bsize) >> shift;
-                        used = stat->os_blocks - stat->os_bavail;
-                        used = (used * stat->os_bsize) >> shift;
+                        used  = ((stat->os_blocks - stat->os_bfree) *
+                                 stat->os_bsize) >> shift;
                         total = (stat->os_blocks * stat->os_bsize) >> shift;
                 }