mbox series

[0/4] Zone write plugging and DM zone fixes

Message ID 20240530054035.491497-1-dlemoal@kernel.org (mailing list archive)
Headers show
Series Zone write plugging and DM zone fixes | expand

Message

Damien Le Moal May 30, 2024, 5:40 a.m. UTC
The first patch of this series fixes null_blk to avoid weird zone
configurations, namely, a zoned device with a last smaller zone with a
zone capacity smaller than the zone size. Related to this, the next 2
patches fix the handling by zone write plugging of zoned devices with a
last smaller zone. That was completely botched in the initial series.

Finally, the last patch addresses a long standing issue with zoned
device-mapper devices: no zone resource limits (max open and max active
zones limits) are not exposed to the user. This patch fixes that,
allowing for the limits of the underlying target devices to be exposed
with a warning for setups that lead to unreliable limits.

This is all based on block/block-6.10 branch and the last patch depends
on Christoph's recent DM queue limits fixes. While the last patch is
technically not really a fix for a recent bug, it would be nice to get
it in this cycle as the change in the max open zone limits introduced
with zone write plugging (i.e. expose a imax open zone limit of 128 for
devices with no open zones limits) is confusing zonefs tests causing
failures.

Damien Le Moal (4):
  null_blk: Do not allow runt zone with zone capacity smaller then zone size
  block: Fix validation of zoned device with a runt zone
  block: Fix zone write plugging handling of devices with a runt zone
  dm: Improve zone resource limits handling

 block/blk-zoned.c              |  47 ++++++--
 drivers/block/null_blk/zoned.c |  11 ++
 drivers/md/dm-zone.c           | 214 +++++++++++++++++++++++++++------
 include/linux/blkdev.h         |   1 +
 4 files changed, 225 insertions(+), 48 deletions(-)

Comments

Jens Axboe May 30, 2024, 9:03 p.m. UTC | #1
On 5/29/24 11:40 PM, Damien Le Moal wrote:
> The first patch of this series fixes null_blk to avoid weird zone
> configurations, namely, a zoned device with a last smaller zone with a
> zone capacity smaller than the zone size. Related to this, the next 2
> patches fix the handling by zone write plugging of zoned devices with a
> last smaller zone. That was completely botched in the initial series.
> 
> Finally, the last patch addresses a long standing issue with zoned
> device-mapper devices: no zone resource limits (max open and max active
> zones limits) are not exposed to the user. This patch fixes that,
> allowing for the limits of the underlying target devices to be exposed
> with a warning for setups that lead to unreliable limits.

Would be nice to get the dm part acked, but I guess I can queue up 1-3
for now for 6.10?
Jens Axboe May 30, 2024, 9:04 p.m. UTC | #2
On Thu, 30 May 2024 14:40:31 +0900, Damien Le Moal wrote:
> The first patch of this series fixes null_blk to avoid weird zone
> configurations, namely, a zoned device with a last smaller zone with a
> zone capacity smaller than the zone size. Related to this, the next 2
> patches fix the handling by zone write plugging of zoned devices with a
> last smaller zone. That was completely botched in the initial series.
> 
> Finally, the last patch addresses a long standing issue with zoned
> device-mapper devices: no zone resource limits (max open and max active
> zones limits) are not exposed to the user. This patch fixes that,
> allowing for the limits of the underlying target devices to be exposed
> with a warning for setups that lead to unreliable limits.
> 
> [...]

Applied, thanks!

[1/4] null_blk: Do not allow runt zone with zone capacity smaller then zone size
      commit: b164316808ec5de391c3e7b0148ec937d32d280d
[2/4] block: Fix validation of zoned device with a runt zone
      commit: cd6399936869b4a042dd1270078cbf2bb871a407
[3/4] block: Fix zone write plugging handling of devices with a runt zone
      commit: 29459c3eaa5c6261fbe0dea7bdeb9b48d35d862a

Best regards,
Damien Le Moal May 30, 2024, 11:58 p.m. UTC | #3
On 5/31/24 6:03 AM, Jens Axboe wrote:
> On 5/29/24 11:40 PM, Damien Le Moal wrote:
>> The first patch of this series fixes null_blk to avoid weird zone
>> configurations, namely, a zoned device with a last smaller zone with a
>> zone capacity smaller than the zone size. Related to this, the next 2
>> patches fix the handling by zone write plugging of zoned devices with a
>> last smaller zone. That was completely botched in the initial series.
>>
>> Finally, the last patch addresses a long standing issue with zoned
>> device-mapper devices: no zone resource limits (max open and max active
>> zones limits) are not exposed to the user. This patch fixes that,
>> allowing for the limits of the underlying target devices to be exposed
>> with a warning for setups that lead to unreliable limits.
> 
> Would be nice to get the dm part acked, but I guess I can queue up 1-3
> for now for 6.10?

Yes please.

Mike, Mikulas,

Could you please review patch 4 ? It is a long standing issue with DM but now
that zone write plugging fakes a smaller 128 max open zones limit for drives
with no limits, zonefs gets confused and tests fail. So it would be great to
get this patch in for 6.10 as a fix.
Thanks !