]> git.ipfire.org Git - thirdparty/linux.git/commit
xfs: use bounce buffering direct I/O when the device requires stable pages
authorChristoph Hellwig <hch@lst.de>
Mon, 26 Jan 2026 05:53:46 +0000 (06:53 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 28 Jan 2026 12:16:40 +0000 (05:16 -0700)
commit3373503df025ab6c9a8ad2ce6b7febd2eb3c99dc
tree708993b4a62e728af26ced143d574b6c47493976
parentc9d114846b380fec1093b7bca91ee5a8cd7b575d
xfs: use bounce buffering direct I/O when the device requires stable pages

Fix direct I/O on devices that require stable pages by asking iomap
to bounce buffer.  To support this, ioends are used for direct reads
in this case to provide a user context for copying data back from the
bounce buffer.

This fixes qemu when used on devices using T10 protection information
and probably other cases like iSCSI using data digests.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Tested-by: Anuj Gupta <anuj20.g@samsung.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/xfs/xfs_aops.c
fs/xfs/xfs_file.c