mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
f2fs: fix miscounted block limit in f2fs_statfs_project()
commit acdf217217 upstream.
statfs calculates Total/Used/Avail disk space in block unit,
so we should translate soft/hard prjquota limit to block unit
as well.
Below testing result shows the block/inode numbers of
Total/Used/Avail from df command are all correct afer
applying this patch.
[root@localhost quota-tools]\# ./repquota -P /dev/sdb1
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
ae2cb41583
commit
b1de9ec0e7
@@ -1219,6 +1219,8 @@ static int f2fs_statfs_project(struct super_block *sb,
|
||||
if (dquot->dq_dqb.dqb_bhardlimit &&
|
||||
(!limit || dquot->dq_dqb.dqb_bhardlimit < limit))
|
||||
limit = dquot->dq_dqb.dqb_bhardlimit;
|
||||
if (limit)
|
||||
limit >>= sb->s_blocksize_bits;
|
||||
|
||||
if (limit && buf->f_blocks > limit) {
|
||||
curblock = dquot->dq_dqb.dqb_curspace >> sb->s_blocksize_bits;
|
||||
|
||||
Reference in New Issue
Block a user