Re: [PATCH] xfs: wait for direct I/O before swapping extents

From: Carlos Maiolino

Date: Wed Nov 18 2026 - 03:59:17 EST


On Tue, 10 Nov 2026 09:38:17 +0900, Daejun Park wrote:
> An AIO direct write drops the iolock before its bios complete.
> XFS_IOC_SWAPEXT does not wait for it. The write can land in blocks that
> the swap moved to the temporary file. Once xfs_fsr frees them, the
> write corrupts whatever reuses them.
>
> Wait for direct I/O first, as exchange-range does.
>
> [...]

Applied to for-next, thanks!

[1/1] xfs: wait for direct I/O before swapping extents
commit: 844bc1167f1b2d19d9495a556599af24dc4468bd

Best regards,
--
Carlos Maiolino <cem@xxxxxxxxxx>