public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] block: Treat sequential write preferred zone type as invalid
@ 2024-01-07  7:22 Damien Le Moal
  2024-01-08  8:21 ` Christoph Hellwig
  2024-01-08 15:34 ` Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: Damien Le Moal @ 2024-01-07  7:22 UTC (permalink / raw)
  To: Jens Axboe, linux-block; +Cc: Christoph Hellwig

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: 7437bb73f087 ("block: remove support for the host aware zone model")
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
---
 block/blk-zoned.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/blk-zoned.c b/block/blk-zoned.c
index c59d44ee6b23..48252d9e3b0d 100644
--- a/block/blk-zoned.c
+++ b/block/blk-zoned.c
@@ -498,7 +498,6 @@ static int blk_revalidate_zone_cb(struct blk_zone *zone, unsigned int idx,
 		set_bit(idx, args->conv_zones_bitmap);
 		break;
 	case BLK_ZONE_TYPE_SEQWRITE_REQ:
-	case BLK_ZONE_TYPE_SEQWRITE_PREF:
 		if (!args->seq_zones_wlock) {
 			args->seq_zones_wlock =
 				blk_alloc_zone_bitmap(q->node, args->nr_zones);
@@ -506,6 +505,7 @@ static int blk_revalidate_zone_cb(struct blk_zone *zone, unsigned int idx,
 				return -ENOMEM;
 		}
 		break;
+	case BLK_ZONE_TYPE_SEQWRITE_PREF:
 	default:
 		pr_warn("%s: Invalid zone type 0x%x at sectors %llu\n",
 			disk->disk_name, (int)zone->type, zone->start);
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] block: Treat sequential write preferred zone type as invalid
  2024-01-07  7:22 [PATCH] block: Treat sequential write preferred zone type as invalid Damien Le Moal
@ 2024-01-08  8:21 ` Christoph Hellwig
  2024-01-08 15:34 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2024-01-08  8:21 UTC (permalink / raw)
  To: Damien Le Moal; +Cc: Jens Axboe, linux-block, Christoph Hellwig

On Sun, Jan 07, 2024 at 04:22:12PM +0900, Damien Le Moal wrote:
> 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.

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] block: Treat sequential write preferred zone type as invalid
  2024-01-07  7:22 [PATCH] block: Treat sequential write preferred zone type as invalid Damien Le Moal
  2024-01-08  8:21 ` Christoph Hellwig
@ 2024-01-08 15:34 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2024-01-08 15:34 UTC (permalink / raw)
  To: linux-block, Damien Le Moal; +Cc: Christoph Hellwig


On Sun, 07 Jan 2024 16:22:12 +0900, Damien Le Moal wrote:
> 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.
> 
> 

Applied, thanks!

[1/1] block: Treat sequential write preferred zone type as invalid
      commit: 587371ed783b046f22ba7a5e1cc9a19ae35123b4

Best regards,
-- 
Jens Axboe




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-01-08 15:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-07  7:22 [PATCH] block: Treat sequential write preferred zone type as invalid Damien Le Moal
2024-01-08  8:21 ` Christoph Hellwig
2024-01-08 15:34 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox