]> git.baikalelectronics.ru Git - kernel.git/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)
commitc8af680da43b7659e0eafb90df54a2b38611af96
treed2379eb1646e00e8e8b3c3c6d380a4678b4c400e
parentc434efaa76401970b0f8c31ae89bbdd95a77f773
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