Re: [PATCH v3 2/5] block: Introduce bio_needs_zone_write_plugging()

2025-06-26 Thread Bart Van Assche
On 6/25/25 4:38 PM, Damien Le Moal wrote: On 6/26/25 00:48, Bart Van Assche wrote: On 6/25/25 2:33 AM, Damien Le Moal wrote: diff --git a/block/blk-mq.c b/block/blk-mq.c index 4806b867e37d..0c61492724d2 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -3169,8 +3169,10 @@ void blk_mq_submit_b

Re: [PATCH v3 2/5] block: Introduce bio_needs_zone_write_plugging()

2025-06-25 Thread Damien Le Moal
On 6/26/25 00:48, Bart Van Assche wrote: > On 6/25/25 2:33 AM, Damien Le Moal wrote: >> diff --git a/block/blk-mq.c b/block/blk-mq.c >> index 4806b867e37d..0c61492724d2 100644 >> --- a/block/blk-mq.c >> +++ b/block/blk-mq.c >> @@ -3169,8 +3169,10 @@ void blk_mq_submit_bio(struct bio *bio) >> i

Re: [PATCH v3 2/5] block: Introduce bio_needs_zone_write_plugging()

2025-06-25 Thread Johannes Thumshirn
On 25.06.25 11:44, Damien Le Moal wrote: > static inline bool bio_needs_zone_write_plugging(struct bio *bio) > +{ > + enum req_op op = bio_op(bio); > + > + /* > + * Only zoned block devices have a zone write plug hash table. But not > + * all of them have one (e.g. DM devices may

Re: [PATCH v3 2/5] block: Introduce bio_needs_zone_write_plugging()

2025-06-25 Thread Bart Van Assche
On 6/25/25 2:33 AM, Damien Le Moal wrote: diff --git a/block/blk-mq.c b/block/blk-mq.c index 4806b867e37d..0c61492724d2 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -3169,8 +3169,10 @@ void blk_mq_submit_bio(struct bio *bio) if (blk_mq_attempt_bio_merge(q, bio, nr_segs))

Re: [PATCH v3 2/5] block: Introduce bio_needs_zone_write_plugging()

2025-06-25 Thread Christoph Hellwig
Looks good: Reviewed-by: Christoph Hellwig

[PATCH v3 2/5] block: Introduce bio_needs_zone_write_plugging()

2025-06-25 Thread Damien Le Moal
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