Re: [PATCH v2 1/4] block: Introduce bio_needs_zone_write_plugging()

2025-06-24 Thread Damien Le Moal
On 6/25/25 3:18 PM, Christoph Hellwig wrote: > On Wed, Jun 25, 2025 at 03:14:51PM +0900, Damien Le Moal wrote: >> On 6/25/25 3:12 PM, Christoph Hellwig wrote: >>> On Wed, Jun 25, 2025 at 02:59:05PM +0900, Damien Le Moal wrote: +bool bio_needs_zone_write_plugging(struct bio *bio) >>> >>> Can yo

Re: [PATCH v2 1/4] block: Introduce bio_needs_zone_write_plugging()

2025-06-24 Thread Christoph Hellwig
On Wed, Jun 25, 2025 at 03:14:51PM +0900, Damien Le Moal wrote: > On 6/25/25 3:12 PM, Christoph Hellwig wrote: > > On Wed, Jun 25, 2025 at 02:59:05PM +0900, Damien Le Moal wrote: > >> +bool bio_needs_zone_write_plugging(struct bio *bio) > > > > Can you use this in blk_zone_plug_bio instead of dupl

Re: [PATCH v2 1/4] block: Introduce bio_needs_zone_write_plugging()

2025-06-24 Thread Damien Le Moal
On 6/25/25 3:12 PM, Christoph Hellwig wrote: > On Wed, Jun 25, 2025 at 02:59:05PM +0900, Damien Le Moal wrote: >> +bool bio_needs_zone_write_plugging(struct bio *bio) > > Can you use this in blk_zone_plug_bio instead of duplicating the logic? I thought about doing that, but we would still need to

Re: [PATCH v2 1/4] block: Introduce bio_needs_zone_write_plugging()

2025-06-24 Thread Christoph Hellwig
On Wed, Jun 25, 2025 at 02:59:05PM +0900, Damien Le Moal wrote: > +bool bio_needs_zone_write_plugging(struct bio *bio) Can you use this in blk_zone_plug_bio instead of duplicating the logic? I also wonder if we should only it it, as despite looking quite complex it should compile down to just a f

[PATCH v2 1/4] block: Introduce bio_needs_zone_write_plugging()

2025-06-24 Thread Damien Le Moal
In preparation for fixing device mapper zone write handling, introduce the helper function bio_needs_zone_write_plugging() to test if a BIO requires handling through zone write plugging. This function returns true for any write operation to a zoned block device. For zone append opertions, true is r