From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konstantin Khorenko Date: Fri, 21 Aug 2026 18:37:04 +0200 Subject: [Devel] [PATCH vz10 18/32] block: guard the cbt_list initialization with CONFIG_BLK_DEV_CBT In-Reply-To: <20260821163718.187766-1-khorenko@virtuozzo.com> References: <20260821163718.187766-1-khorenko@virtuozzo.com> Message-ID: <20260821163718.187766-19-khorenko@virtuozzo.com> List-Id: From: Eva Kurchatova request_queue::cbt_list only exists when CONFIG_BLK_DEV_CBT is enabled, but blk_alloc_queue() initializes it unconditionally, so the build fails without that option: block/blk-core.c: error: 'struct request_queue' has no member named 'cbt_list' CONFIG_BLK_DEV_CBT has no default, so every configuration that does not ask for it explicitly hits this, plain x86_64 defconfig included. Guard the INIT_LIST_HEAD() the same way the field itself is guarded. Fixes: e5c67003994e ("block/blk-cbt: allow multiple cbts in a single queue") Feature: cbt: changed block tracking (for backup) https://virtuozzo.atlassian.net/browse/VSTOR-134732 Signed-off-by: Eva Kurchatova Signed-off-by: Konstantin Khorenko --- block/blk-core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/blk-core.c b/block/blk-core.c index a168f2e41b7d..bcc3060de670 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -440,7 +440,9 @@ struct request_queue *blk_alloc_queue(struct queue_limits *lim, int node_id) init_waitqueue_head(&q->mq_freeze_wq); mutex_init(&q->mq_freeze_lock); +#ifdef CONFIG_BLK_DEV_CBT INIT_LIST_HEAD(&q->cbt_list); +#endif blkg_init_queue(q); -- 2.47.1