xfs
[Top] [All Lists]

[PATCH 15/19] xfs: quota limit statvfs available blocks

To: stable@xxxxxxxxxx
Subject: [PATCH 15/19] xfs: quota limit statvfs available blocks
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Fri, 12 Mar 2010 09:42:13 +1100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1268347337-7160-1-git-send-email-david@xxxxxxxxxxxxx>
References: <1268347337-7160-1-git-send-email-david@xxxxxxxxxxxxx>
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>

>From 9b00f30762fe9f914eb6e03057a616ed63a4e8ca
Date: Thu, 21 Jan 2010 11:17:20 +0000
A "df" run on an NFS client of an exported XFS file system reports
the wrong information for "available" blocks.  When a block quota is
enforced, the amount reported as free is limited by the quota, but
the amount reported available is not (and should be).

Reported-by: Guk-Bong, Kwon <gbkwon@xxxxxxxxx>
Signed-off-by: Christoph Hellwig <hch@xxxxxx>
Signed-off-by: Alex Elder <aelder@xxxxxxx>
---
 fs/xfs/quota/xfs_qm_bhv.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/xfs/quota/xfs_qm_bhv.c b/fs/xfs/quota/xfs_qm_bhv.c
index a534663..97b410c 100644
--- a/fs/xfs/quota/xfs_qm_bhv.c
+++ b/fs/xfs/quota/xfs_qm_bhv.c
@@ -59,7 +59,7 @@ xfs_fill_statvfs_from_dquot(
                be64_to_cpu(dp->d_blk_hardlimit);
        if (limit && statp->f_blocks > limit) {
                statp->f_blocks = limit;
-               statp->f_bfree =
+               statp->f_bfree = statp->f_bavail =
                        (statp->f_blocks > be64_to_cpu(dp->d_bcount)) ?
                         (statp->f_blocks - be64_to_cpu(dp->d_bcount)) : 0;
        }
-- 
1.6.5

<Prev in Thread] Current Thread [Next in Thread>