From 37f8b35991ca2be12c87ad58ccb043f48d4eea79 Mon Sep 17 00:00:00 2001 From: bobijam <bobijam> Date: Thu, 29 Nov 2007 01:45:59 +0000 Subject: [PATCH] Branch b1_6 b=14283 i=zhenyu.xu, oleg.drokin show "used" as only the used space, to match "df". --- lustre/utils/lfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lustre/utils/lfs.c b/lustre/utils/lfs.c index e188b9471c..fae0aadbf4 100644 --- a/lustre/utils/lfs.c +++ b/lustre/utils/lfs.c @@ -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; } -- GitLab