From ccd713371ee307f7692b975be4d605211fb8b7f9 Mon Sep 17 00:00:00 2001 From: adilger Date: Wed, 4 Jun 2003 01:54:52 +0000 Subject: [PATCH] Fix "used inodes" count in df by reducing the total number of inodes instead of increasing the number of used inodes when there is a constraint somewhere. As the constraint is eased, the total number of inodes will increase but we always show the correct number of used inodes. --- lustre/obdclass/fsfilt_ext3.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lustre/obdclass/fsfilt_ext3.c b/lustre/obdclass/fsfilt_ext3.c index 8dc795e..a02f1f5 100644 --- a/lustre/obdclass/fsfilt_ext3.c +++ b/lustre/obdclass/fsfilt_ext3.c @@ -467,8 +467,10 @@ static int fsfilt_ext3_statfs(struct super_block *sb, struct obd_statfs *osfs) struct statfs sfs; int rc = vfs_statfs(sb, &sfs); - if (!rc && sfs.f_bfree < sfs.f_ffree) + if (!rc && sfs.f_bfree < sfs.f_ffree) { + sfs.f_files = (sfs.f_files - sfs.f_ffree) + sfs.f_bfree; sfs.f_ffree = sfs.f_bfree; + } statfs_pack(osfs, &sfs); return rc; -- 1.8.3.1