]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iomap: rework REQ_FUA selection
authorChristoph Hellwig <hch@lst.de>
Thu, 13 Nov 2025 17:06:28 +0000 (18:06 +0100)
committerChristian Brauner <brauner@kernel.org>
Tue, 25 Nov 2025 09:22:18 +0000 (10:22 +0100)
commit29086a31b3abc662d0571ed6a938937ec1e1ec0a
tree051d17550e5b024c00fec47d454f29f0f64efab5
parentddb4873286e03e193c5a3bebb5fc6fa820e9ee3a
iomap: rework REQ_FUA selection

The way how iomap_dio_can_use_fua and the caller is structured is
a bit confusing, as the main guarding condition is hidden in the
helper, and the secondary conditions are split between caller and
callee.

Refactor the code, so that iomap_dio_bio_iter itself tracks if a write
might need metadata updates based on the iomap type and flags, and
then have a condition based on that to use the FUA flag.

Note that this also moves the REQ_OP_WRITE assignment to the end of
the branch to improve readability a bit.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://patch.msgid.link/20251113170633.1453259-4-hch@lst.de
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/iomap/direct-io.c