diff options
author | Konstantin Khlebnikov <[email protected]> | 2018-05-20 22:49:54 -0400 |
---|---|---|
committer | Theodore Ts'o <[email protected]> | 2018-05-20 22:49:54 -0400 |
commit | f06925c7394236d769c788940c9a7b85dbe4c40c (patch) | |
tree | 879115a132b59b462c16072008c2cc28f676a650 | |
parent | 21c580d88e2abd62b58ce34872cceb5c0d056330 (diff) |
ext4: report delalloc reserve as non-free in statfs for project quota
This reserved space isn't committed yet but cannot be used for allocations.
For userspace it has no difference from used space. XFS already does this.
Signed-off-by: Konstantin Khlebnikov <[email protected]>
Signed-off-by: Theodore Ts'o <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Fixes: 689c958cbe6b ("ext4: add project quota support")
-rw-r--r-- | fs/ext4/super.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 1388e56bb3f5..c1c5c8775ae7 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -5289,7 +5289,8 @@ static int ext4_statfs_project(struct super_block *sb, dquot->dq_dqb.dqb_bsoftlimit : dquot->dq_dqb.dqb_bhardlimit) >> sb->s_blocksize_bits; if (limit && buf->f_blocks > limit) { - curblock = dquot->dq_dqb.dqb_curspace >> sb->s_blocksize_bits; + curblock = (dquot->dq_dqb.dqb_curspace + + dquot->dq_dqb.dqb_rsvspace) >> sb->s_blocksize_bits; buf->f_blocks = limit; buf->f_bfree = buf->f_bavail = (buf->f_blocks > curblock) ? |