mbox series

[v5,0/4] Fix DM zone resource limits stacking

Message ID 20240606073721.88621-1-dlemoal@kernel.org (mailing list archive)
Headers show
Series Fix DM zone resource limits stacking | expand

Message

Damien Le Moal June 6, 2024, 7:37 a.m. UTC
This is the updated patch 4/4 of the series "Zone write plugging and DM
zone fixes". This patch fixes DM zone resource limits stacking (max open
zones and max active zones limits). Patch 1 is new and is added to help
catch problems and eventual regressions of the handling of these limits.

Changes from v4:
 - Fixed a typo in a comment in patch 1
 - Added patch 2 and changed patch 3 accordingly
 - Added review tags

Changes from v3:
 - Modify patch 1 to always check the zone resource limits values in
   disk_update_zone_resources(), including for DM devices that do not
   use zone write plugging. Simplify patch 2 accordingly by removing the
   same check and adjustment of the zone resource limits.
 - Added patch 3

Changes from v2:
 - Modify patch 1 to return an error for the case where the max open
   zones limit is greater than the max active zones limit.
 - Modify patch 2 to avoid duplicated actions on the limits and to
   remove warnings for unusual zone limits.

Changes from v1:
 - Added patch 1
 - Modified patch 2 to not cap the limits for a target with the number
   of sequential zones mapped but rather to use the device limits as is
   when more zones than the limits are mapped and 0 otherwise (no
   limits).

Damien Le Moal (4):
  block: Improve checks on zone resource limits
  dm: Call dm_revalidate_zones() after setting the queue limits
  dm: Improve zone resource limits handling
  dm: Remove unused macro DM_ZONE_INVALID_WP_OFST

 block/blk-settings.c  |   8 ++
 block/blk-zoned.c     |  20 +++-
 drivers/md/dm-table.c |  15 ++-
 drivers/md/dm-zone.c  | 220 ++++++++++++++++++++++++++++++++----------
 drivers/md/dm.h       |   1 +
 5 files changed, 207 insertions(+), 57 deletions(-)

Comments

Christoph Hellwig June 6, 2024, 7:59 a.m. UTC | #1
Vaguely related:  should we add you to MAINTAINERS for
drivers/md/dm-zone* so that you always are in the loop for changes
to this code?
Damien Le Moal June 6, 2024, 8:02 a.m. UTC | #2
On 6/6/24 4:59 PM, Christoph Hellwig wrote:
> Vaguely related:  should we add you to MAINTAINERS for
> drivers/md/dm-zone* so that you always are in the loop for changes
> to this code?

Sure, fine with me.

Note that I am working with Shin'ichiro to add test cases to better cover this.
So either way, our weekly runs on rc and -next will catch any issue/regression
sneaking in.