* [PATCH 1/2] block: Clear zone limits for a non-zoned stacked queue
@ 2024-02-22 13:17 Damien Le Moal
2024-02-22 13:17 ` [PATCH 2/2] block: Do not include rbtree.h in blk-zoned.c Damien Le Moal
2024-02-22 17:35 ` [PATCH 1/2] block: Clear zone limits for a non-zoned stacked queue Jens Axboe
0 siblings, 2 replies; 4+ messages in thread
From: Damien Le Moal @ 2024-02-22 13:17 UTC (permalink / raw)
To: Jens Axboe, linux-block; +Cc: Christoph Hellwig
Device mapper may create a non-zoned mapped device out of a zoned device
(e.g., the dm-zoned target). In such case, some queue limit such as the
max_zone_append_sectors and zone_write_granularity endup being non zero
values for a block device that is not zoned. Avoid this by clearing
these limits in blk_stack_limits() when the stacked zoned limit is
false.
Fixes: 3093a479727b ("block: inherit the zoned characteristics in blk_stack_limits")
Cc: stable@vger.kernel.org
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
---
block/blk-settings.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/block/blk-settings.c b/block/blk-settings.c
index 06ea91e51b8b..5adadce08408 100644
--- a/block/blk-settings.c
+++ b/block/blk-settings.c
@@ -689,6 +689,10 @@ int blk_stack_limits(struct queue_limits *t, struct queue_limits *b,
t->zone_write_granularity = max(t->zone_write_granularity,
b->zone_write_granularity);
t->zoned = max(t->zoned, b->zoned);
+ if (!t->zoned) {
+ t->zone_write_granularity = 0;
+ t->max_zone_append_sectors = 0;
+ }
return ret;
}
EXPORT_SYMBOL(blk_stack_limits);
--
2.43.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] block: Do not include rbtree.h in blk-zoned.c
2024-02-22 13:17 [PATCH 1/2] block: Clear zone limits for a non-zoned stacked queue Damien Le Moal
@ 2024-02-22 13:17 ` Damien Le Moal
2024-02-22 17:33 ` Bart Van Assche
2024-02-22 17:35 ` [PATCH 1/2] block: Clear zone limits for a non-zoned stacked queue Jens Axboe
1 sibling, 1 reply; 4+ messages in thread
From: Damien Le Moal @ 2024-02-22 13:17 UTC (permalink / raw)
To: Jens Axboe, linux-block; +Cc: Christoph Hellwig
The block zone code does not use RB-tree. So remove the include of
linux/rbtree.h as it is not needed.
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
---
block/blk-zoned.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/block/blk-zoned.c b/block/blk-zoned.c
index d343e5756a9c..fa930881b06b 100644
--- a/block/blk-zoned.c
+++ b/block/blk-zoned.c
@@ -11,7 +11,6 @@
#include <linux/kernel.h>
#include <linux/module.h>
-#include <linux/rbtree.h>
#include <linux/blkdev.h>
#include <linux/blk-mq.h>
#include <linux/mm.h>
--
2.43.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] block: Do not include rbtree.h in blk-zoned.c
2024-02-22 13:17 ` [PATCH 2/2] block: Do not include rbtree.h in blk-zoned.c Damien Le Moal
@ 2024-02-22 17:33 ` Bart Van Assche
0 siblings, 0 replies; 4+ messages in thread
From: Bart Van Assche @ 2024-02-22 17:33 UTC (permalink / raw)
To: Damien Le Moal, Jens Axboe, linux-block; +Cc: Christoph Hellwig
On 2/22/24 05:17, Damien Le Moal wrote:
> The block zone code does not use RB-tree. So remove the include of
> linux/rbtree.h as it is not needed.
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] block: Clear zone limits for a non-zoned stacked queue
2024-02-22 13:17 [PATCH 1/2] block: Clear zone limits for a non-zoned stacked queue Damien Le Moal
2024-02-22 13:17 ` [PATCH 2/2] block: Do not include rbtree.h in blk-zoned.c Damien Le Moal
@ 2024-02-22 17:35 ` Jens Axboe
1 sibling, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2024-02-22 17:35 UTC (permalink / raw)
To: linux-block, Damien Le Moal; +Cc: Christoph Hellwig
On Thu, 22 Feb 2024 22:17:23 +0900, Damien Le Moal wrote:
> Device mapper may create a non-zoned mapped device out of a zoned device
> (e.g., the dm-zoned target). In such case, some queue limit such as the
> max_zone_append_sectors and zone_write_granularity endup being non zero
> values for a block device that is not zoned. Avoid this by clearing
> these limits in blk_stack_limits() when the stacked zoned limit is
> false.
>
> [...]
Applied, thanks!
[1/2] block: Clear zone limits for a non-zoned stacked queue
commit: c8f6f88d25929ad2f290b428efcae3b526f3eab0
[2/2] block: Do not include rbtree.h in blk-zoned.c
commit: 522d73526f8d4519eefc693204bb474391e60f2b
Best regards,
--
Jens Axboe
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-02-22 17:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-22 13:17 [PATCH 1/2] block: Clear zone limits for a non-zoned stacked queue Damien Le Moal
2024-02-22 13:17 ` [PATCH 2/2] block: Do not include rbtree.h in blk-zoned.c Damien Le Moal
2024-02-22 17:33 ` Bart Van Assche
2024-02-22 17:35 ` [PATCH 1/2] block: Clear zone limits for a non-zoned stacked queue Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).