Skip to contentSkip to conversation

null_blk: Print correct max open zones limit in null_init_zoned_dev()

PATCH Applied Damien Le Moal 3 participants 3 messages May 28, 2024 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 null_blk: Print correct max open zones limit in null_init_zoned_dev()

When changing the maximum number of open zones, print that number instead of the total number of zones.

Fixes dc4d137ee3b7 ("null_blk: add support for max open/active zone limit for zoned devices")
---
 drivers/block/null_blk/zoned.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/block/null_blk/zoned.c +1 -1
index 5b5a63adacc1..79c8e5e99f7f 100644
@@ -108,7 +108,7 @@ int null_init_zoned_dev(struct nullb_device *dev,
 	if (dev->zone_max_active && dev->zone_max_open > dev->zone_max_active) {
 		dev->zone_max_open = dev->zone_max_active;
 		pr_info("changed the maximum number of open zones to %u\n",
-			dev->nr_zones);
+			dev->zone_max_open);
 	} else if (dev->zone_max_open >= dev->nr_zones - dev->zone_nr_conv) {
 		dev->zone_max_open = 0;
 		pr_info("zone_max_open limit disabled, limit >= zone count\n");
Signature · 1 line
2.45.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 26 lines · Damien Le Moal

When changing the maximum number of open zones, print that number instead of the total number of zones.

Fixes dc4d137ee3b7 ("null_blk: add support for max open/active zone limit for zoned devices")
---
 drivers/block/null_blk/zoned.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/block/null_blk/zoned.c +1 -1
index 5b5a63adacc1..79c8e5e99f7f 100644
@@ -108,7 +108,7 @@ int null_init_zoned_dev(struct nullb_device *dev,
 	if (dev->zone_max_active && dev->zone_max_open > dev->zone_max_active) {
 		dev->zone_max_open = dev->zone_max_active;
 		pr_info("changed the maximum number of open zones to %u\n",
-			dev->nr_zones);
+			dev->zone_max_open);
 	} else if (dev->zone_max_open >= dev->nr_zones - dev->zone_nr_conv) {
 		dev->zone_max_open = 0;
 		pr_info("zone_max_open limit disabled, limit >= zone count\n");
Signature · 1 line
2.45.1
maintainer Applied
#2 lore raw
In reply to Damien Le Moal
Quoted 4 lines · Damien Le Moal

When changing the maximum number of open zones, print that number instead of the total number of zones.

Applied, thanks!

[1/1] null_blk: Print correct max open zones limit in null_init_zoned_dev()

      commit: 233e27b4d21c3e44eb863f03e566d3a22e81a7ae

Best regards,

Signature · 1 line
Jens Axboe