]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: don't fail unwritten extent conversion on writeback due to edquot
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 7 Nov 2022 04:03:26 +0000 (09:33 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Nov 2022 16:57:54 +0000 (17:57 +0100)
commit21ff3ba829edfeb64e4891da2951bb3a20019c02
tree25d46c6229c7c1398792663a59f06107ba52a7f7
parent30082dc517f4a94002e5973ff5136abc90b420b9
xfs: don't fail unwritten extent conversion on writeback due to edquot

commit 1541702162ea8b88c9d3c0299bbcc620ecfaf834 upstream.

During writeback, it's possible for the quota block reservation in
xfs_iomap_write_unwritten to fail with EDQUOT because we hit the quota
limit.  This causes writeback errors for data that was already written
to disk, when it's not even guaranteed that the bmbt will expand to
exceed the quota limit.  Irritatingly, this condition is reported to
userspace as EIO by fsync, which is confusing.

We wrote the data, so allow the reservation.  That might put us slightly
above the hard limit, but it's better than losing data after a write.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandan.babu@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/xfs/xfs_iomap.c