Skip to contentSkip to conversation

max_hw_zone_append_sectos fixes

PATCH New Christoph Hellwig 4 participants 7 messages Nov 5, 2024 – Nov 8, 2024

Subsystems (2)
lore
Share & tools
lore

Christoph Hellwig

author maintainer
#0 lore raw

Hi Jens,

this series has a fix and a cleanup for the max_hw_zone_append_sectors change.

Diffstat:

 block/blk-settings.c          |    2 +-
 drivers/nvme/host/multipath.c |    2 --
 2 files changed, 1 insertion(+), 3 deletions(-)
author maintainer
#1 lore raw

PATCH 1/2 block: initialize max_hw_zone_append_sectors in blk_set_stacking_limits

Because max_zone_append_sectors is now just derived from it.

Fixes 2a8f6153e1c2 ("block: pre-calculate max_zone_append_sectors")
---
 block/blk-settings.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
block/blk-settings.c +1 -1
index 5cb69d85af0e..7d6b296997c2 100644
@@ -50,7 +50,7 @@ void blk_set_stacking_limits(struct queue_limits *lim)
 	lim->max_sectors = UINT_MAX;
 	lim->max_dev_sectors = UINT_MAX;
 	lim->max_write_zeroes_sectors = UINT_MAX;
-	lim->max_zone_append_sectors = UINT_MAX;
+	lim->max_hw_zone_append_sectors = UINT_MAX;
 	lim->max_user_discard_sectors = UINT_MAX;
 }
 EXPORT_SYMBOL(blk_set_stacking_limits);
Signature · 1 line
2.45.2
author maintainer
#2 lore raw

PATCH 2/2 nvme-multipath: don't bother clearing max_hw_zone_append_sectors

In reply to Christoph Hellwig

The limits stacking now properly zeroes it if at least one of the underlying limits clears it.

---
 drivers/nvme/host/multipath.c | 2 --
 1 file changed, 2 deletions(-)
drivers/nvme/host/multipath.c +0 -2
index c26cb7d3a2e5..f04cfe3fb936 100644
@@ -635,8 +635,6 @@ int nvme_mpath_alloc_disk(struct nvme_ctrl *ctrl, struct nvme_ns_head *head)
 	lim.features |= BLK_FEAT_IO_STAT | BLK_FEAT_NOWAIT | BLK_FEAT_POLL;
 	if (head->ids.csi == NVME_CSI_ZNS)
 		lim.features |= BLK_FEAT_ZONED;
-	else
-		lim.max_hw_zone_append_sectors = 0;
 
 	head->disk = blk_alloc_disk(&lim, ctrl->numa_node);
 	if (IS_ERR(head->disk))
Signature · 1 line
2.45.2
Tested-by
#4 lore raw
In reply to Christoph Hellwig

Verified the reported issue was fixed by this series:

Quoted 11 lines · Christoph Hellwig

Hi Jens,

this series has a fix and a cleanup for the max_hw_zone_append_sectors change.

Diffstat:

 block/blk-settings.c          |    2 +-
 drivers/nvme/host/multipath.c |    2 --
 2 files changed, 1 insertion(+), 3 deletions(-)
Signature · 2 lines
Best Regards,
  Yi Zhang
maintainer
#5 lore raw
In reply to Christoph Hellwig
Quoted 9 lines · Christoph Hellwig

Hi Jens,

this series has a fix and a cleanup for the max_hw_zone_append_sectors change.

Diffstat:

 block/blk-settings.c          |    2 +-
 drivers/nvme/host/multipath.c |    2 --
 2 files changed, 1 insertion(+), 3 deletions(-)

Given the recent revert, will you respin the parts that makes sense?

Signature · 1 line
Jens Axboe
author maintainer
#6 lore raw
Quoted 6 lines · Jens Axboe
Quoted 5 lines · Christoph Hellwig

Hi Jens,

this series has a fix and a cleanup for the max_hw_zone_append_sectors change.

Quoted 6 lines
Quoted 4 lines

Diffstat:

 block/blk-settings.c          |    2 +-
 drivers/nvme/host/multipath.c |    2 --
 2 files changed, 1 insertion(+), 3 deletions(-)

Given the recent revert, will you respin the parts that makes sense?

The first one should just be kept as-is. But I can resend it separately justto be clear.