Patch "xfs: don't fail unwritten extent conversion on writeback due to edquot" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    xfs: don't fail unwritten extent conversion on writeback due to edquot

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     xfs-don-t-fail-unwritten-extent-conversion-on-writeback-due-to-edquot.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From foo@baz Mon Nov  7 09:49:06 AM CET 2022
From: Chandan Babu R <chandan.babu@xxxxxxxxxx>
Date: Mon,  7 Nov 2022 09:33:26 +0530
Subject: xfs: don't fail unwritten extent conversion on writeback due to edquot
To: gregkh@xxxxxxxxxxxxxxxxxxx
Cc: sashal@xxxxxxxxxx, mcgrof@xxxxxxxxxx, linux-xfs@xxxxxxxxxxxxxxx, stable@xxxxxxxxxxxxxxx, djwong@xxxxxxxxxx, chandan.babu@xxxxxxxxxx, amir73il@xxxxxxxxx, leah.rumancik@xxxxxxxxx
Message-ID: <20221107040327.132719-6-chandan.babu@xxxxxxxxxx>

From: "Darrick J. Wong" <darrick.wong@xxxxxxxxxx>

commit 1edd2c055dff9710b1e29d4df01902abb0a55f1f 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@xxxxxxxxxx>
Reviewed-by: Brian Foster <bfoster@xxxxxxxxxx>
Reviewed-by: Christoph Hellwig <hch@xxxxxx>
Acked-by: Darrick J. Wong <djwong@xxxxxxxxxx>
Signed-off-by: Chandan Babu R <chandan.babu@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 fs/xfs/xfs_iomap.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/xfs/xfs_iomap.c
+++ b/fs/xfs/xfs_iomap.c
@@ -789,7 +789,7 @@ xfs_iomap_write_unwritten(
 		xfs_trans_ijoin(tp, ip, 0);
 
 		error = xfs_trans_reserve_quota_nblks(tp, ip, resblks, 0,
-				XFS_QMOPT_RES_REGBLKS);
+				XFS_QMOPT_RES_REGBLKS | XFS_QMOPT_FORCE_RES);
 		if (error)
 			goto error_on_bmapi_transaction;
 


Patches currently in stable-queue which might be from chandan.babu@xxxxxxxxxx are

queue-5.4/xfs-gut-error-handling-in-xfs_trans_unreserve_and_mod_sb.patch
queue-5.4/xfs-add-the-missed-xfs_perag_put-for-xfs_ifree_cluster.patch
queue-5.4/xfs-don-t-fail-verifier-on-empty-attr3-leaf-block.patch
queue-5.4/xfs-group-quota-should-return-edquot-when-prj-quota-enabled.patch
queue-5.4/xfs-use-ordered-buffers-to-initialize-dquot-buffers-during-quotacheck.patch
queue-5.4/xfs-don-t-fail-unwritten-extent-conversion-on-writeback-due-to-edquot.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux