Commit 5d1966b6 authored by Damien Le Moal's avatar Damien Le Moal Committed by Bart Van Assche
Browse files

FROMGIT: block: Introduce bio_needs_zone_write_plugging()



In preparation for fixing device mapper zone write handling, introduce
the inline helper function bio_needs_zone_write_plugging() to test if a
BIO requires handling through zone write plugging using the function
blk_zone_plug_bio(). This function returns true for any write
(op_is_write(bio) == true) operation directed at a zoned block device
using zone write plugging, that is, a block device with a disk that has
a zone write plug hash table.

This helper allows simplifying the check on entry to blk_zone_plug_bio()
and used in to protect calls to it for blk-mq devices and DM devices.

Fixes: f211268e ("dm: Use the block layer zone append emulation")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarDamien Le Moal <dlemoal@kernel.org>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20250625093327.548866-3-dlemoal@kernel.org


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Bug: 417517944
Change-Id: I9628b14d4fe0e1f964d4036178fbc6ee49b3be78
(cherry picked from commit bf7a8b5cbbb2d531f3336be2186af0c5590d157c git://git.kernel.dk/linux-block

 for-next)
Signed-off-by: default avatarBart Van Assche <bvanassche@google.com>
parent 5aca8823
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment