diff mbox series

[STABLE,6.3.x] xfs: fix livelock in delayed allocation at ENOSPC

Message ID ZHKB/KD1yyx77fop@dread.disaster.area (mailing list archive)
State Accepted
Headers show
Series [STABLE,6.3.x] xfs: fix livelock in delayed allocation at ENOSPC | expand

Commit Message

Dave Chinner May 27, 2023, 10:19 p.m. UTC
Hi Greg,

A regression in 6.3.0 has been identified in XFS that causes
filesystem corruption.  It has been seen in the wild by a number of
users, and bisected down to an issued we'd already fixed in 6.4-rc1
with commit:

9419092fb263 ("xfs: fix livelock in delayed allocation at ENOSPC")

This was reported with much less harmful symptoms (alloctor
livelock) and it wasn't realised that it could have other, more
impactful symptoms. A reproducer for the corruption was found
yesterday and, soon after than, the cause of the corruption reports
was identified.

The commit applies cleanly to a 6.3.0 kernel here, so it should also
apply cleanly to a current 6.3.x kernel. I've included the entire
commit below in case that's easier for you.

Can you please pull this commit into the next 6.3.x release as a
matter of priority?

Cheers,

Dave.

Comments

Greg Kroah-Hartman May 28, 2023, 7:01 a.m. UTC | #1
On Sun, May 28, 2023 at 08:19:40AM +1000, Dave Chinner wrote:
> Hi Greg,
> 
> A regression in 6.3.0 has been identified in XFS that causes
> filesystem corruption.  It has been seen in the wild by a number of
> users, and bisected down to an issued we'd already fixed in 6.4-rc1
> with commit:
> 
> 9419092fb263 ("xfs: fix livelock in delayed allocation at ENOSPC")
> 
> This was reported with much less harmful symptoms (alloctor
> livelock) and it wasn't realised that it could have other, more
> impactful symptoms. A reproducer for the corruption was found
> yesterday and, soon after than, the cause of the corruption reports
> was identified.
> 
> The commit applies cleanly to a 6.3.0 kernel here, so it should also
> apply cleanly to a current 6.3.x kernel. I've included the entire
> commit below in case that's easier for you.
> 
> Can you please pull this commit into the next 6.3.x release as a
> matter of priority?

Now queued up, thanks.

greg k-h
diff mbox series

Patch

diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
index 1a4e446194dd..b512de0540d5 100644
--- a/fs/xfs/libxfs/xfs_bmap.c
+++ b/fs/xfs/libxfs/xfs_bmap.c
@@ -3540,7 +3540,6 @@  xfs_bmap_btalloc_at_eof(
 	 * original non-aligned state so the caller can proceed on allocation
 	 * failure as if this function was never called.
 	 */
-	args->fsbno = ap->blkno;
 	args->alignment = 1;
 	return 0;
 }