]> git.itanic.dy.fi Git - linux-stable/commit
xfs: attach dquots and reserve quota blocks during unwritten conversion
authorDarrick J. Wong <darrick.wong@oracle.com>
Sat, 9 Nov 2019 07:04:20 +0000 (23:04 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Mon, 11 Nov 2019 20:42:52 +0000 (12:42 -0800)
commit2815a16d7ff6230a8e37928829d221bb075aa160
treed2379eb1646e00e8e8b3c3c6d380a4678b4c400e
parent27d9ee577dccec94fb0fc1a14728de64db342f86
xfs: attach dquots and reserve quota blocks during unwritten conversion

In xfs_iomap_write_unwritten, we need to ensure that dquots are attached
to the inode and quota blocks reserved so that we capture in the quota
counters any blocks allocated to handle a bmbt split.  This can happen
on the first unwritten extent conversion to a preallocated sparse file
on a fresh mount.

This was found by running generic/311 with quotas enabled.  The bug
seems to have been introduced in "[XFS] rework iocore infrastructure,
remove some code and make it more" from ~2002?

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/xfs_iomap.c