Skip to contentSkip to conversation

dm zoned: assign max_io_len correctly

PATCH In review Hou Tao 2 participants 2 messages Jun 15, 2020 Device mapper

lore
Share & tools
lore

Hou Tao

author
#0 lore raw

PATCH 1/1 dm zoned: assign max_io_len correctly

The unit of max_io_len is sector instead of byte (spotted through code review), so fix it.

Fixes 3b1a94c88b79 ("dm zoned: drive-managed zoned block device target")
---
 drivers/md/dm-zoned-target.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/dm-zoned-target.c +1 -1
index a907a9446c0b..cf915009c306 100644
@@ -890,7 +890,7 @@ static int dmz_ctr(struct dm_target *ti, unsigned int argc, char **argv)
 	}
 
 	/* Set target (no write same support) */
-	ti->max_io_len = dmz_zone_nr_sectors(dmz->metadata) << 9;
+	ti->max_io_len = dmz_zone_nr_sectors(dmz->metadata);
 	ti->num_flush_bios = 1;
 	ti->num_discard_bios = 1;
 	ti->num_write_zeroes_bios = 1;
Signature · 1 line
2.25.0.4.g0ad7144999
Reviewed-by on v1 1/1
#1 lore raw
Quoted 15 lines · Hou Tao

The unit of max_io_len is sector instead of byte (spotted through code review), so fix it.

Fixes 3b1a94c88b79 ("dm zoned: drive-managed zoned block device target")
---
 drivers/md/dm-zoned-target.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/dm-zoned-target.c +0 -0
index a907a9446c0b..cf915009c306 100644

drivers/md/dm-zoned-target.c static int dmz_ctr(struct dm_target *ti, unsigned int argc, char **argv) · line 896

Quoted 8 lines
drivers/md/dm-zoned-target.c +1 -1
@@ -890,7 +890,7 @@ static int dmz_ctr(struct dm_target *ti, unsigned int argc, char **argv)
 	}
 
 	/* Set target (no write same support) */
-	ti->max_io_len = dmz_zone_nr_sectors(dmz->metadata) << 9;
+	ti->max_io_len = dmz_zone_nr_sectors(dmz->metadata);
 	ti->num_flush_bios = 1;
 	ti->num_discard_bios = 1;
 	ti->num_write_zeroes_bios = 1;

Good catch !

Signature · 2 lines
Damien Le Moal
Western Digital Research