Skip to content

Commit 587371e

Browse files
damien-lemoalaxboe
authored andcommitted
block: Treat sequential write preferred zone type as invalid
With the removal of the support for host-aware zoned devices, blk_revalidate_zone_cb() should never see the zone type BLK_ZONE_TYPE_SEQWRITE_PREF (sequential write preffered zones). Treat this zone type as being invalid. Fixes: 7437bb7 ("block: remove support for the host aware zone model") Signed-off-by: Damien Le Moal <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 4e33b07 commit 587371e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

block/blk-zoned.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,14 +498,14 @@ static int blk_revalidate_zone_cb(struct blk_zone *zone, unsigned int idx,
498498
set_bit(idx, args->conv_zones_bitmap);
499499
break;
500500
case BLK_ZONE_TYPE_SEQWRITE_REQ:
501-
case BLK_ZONE_TYPE_SEQWRITE_PREF:
502501
if (!args->seq_zones_wlock) {
503502
args->seq_zones_wlock =
504503
blk_alloc_zone_bitmap(q->node, args->nr_zones);
505504
if (!args->seq_zones_wlock)
506505
return -ENOMEM;
507506
}
508507
break;
508+
case BLK_ZONE_TYPE_SEQWRITE_PREF:
509509
default:
510510
pr_warn("%s: Invalid zone type 0x%x at sectors %llu\n",
511511
disk->disk_name, (int)zone->type, zone->start);

0 commit comments

Comments
 (0)