]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfsprogs: xfs_quota: return real-time used data as intended
authorAlex Elder <aelder@sgi.com>
Wed, 24 Aug 2011 21:53:41 +0000 (21:53 +0000)
committerAlex Elder <aelder@sgi.com>
Fri, 26 Aug 2011 01:40:26 +0000 (20:40 -0500)
In projects_free_space_data() the real-time used space consumption
is never set.  Instead, that value is returned in the field that
should hold the quota limit.

Found by inspection.  Never seen/noticed because we currently don't
support quotas when a filesystem has a realtime volume.

Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
quota/free.c

index 825ce34f2377e255af740036ee1920234786d7b1..26ec293a17814989e4454e5eaf64b46afc3faa75 100644 (file)
@@ -177,16 +177,18 @@ projects_free_space_data(
                *bfree = (d.d_blk_softlimit - d.d_bcount) << 1;
        }
        *bused = d.d_bcount << 1;
+
        if (d.d_ino_softlimit) {
                *icount = d.d_ino_softlimit;
                *ifree = (d.d_ino_softlimit - d.d_icount);
        }
        *iused = d.d_icount;
+
        if (d.d_rtb_softlimit) {
                *rcount = d.d_rtb_softlimit << 1;
                *rfree = (d.d_rtb_softlimit - d.d_rtbcount) << 1;
        }
-       *rcount = d.d_rtbcount << 1;
+       *rused = d.d_rtbcount << 1;
 
        close(fd);
        return 1;