Skip to content

Commit 2b01808

Browse files
keithbuschaxboe
authored andcommitted
blk-mq: unconditional nr_integrity_segments
Always defining the field will make using it easier and less error prone in future patches. There shouldn't be any downside to this: the field fits in what would otherwise be a 2-byte hole, so we're not saving space by conditionally leaving it out. Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Keith Busch <kbusch@kernel.org> Link: https://lore.kernel.org/r/20240913182854.2445457-2-kbusch@meta.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent d4d7c03 commit 2b01808

File tree

2 files changed

+0
-5
lines changed

2 files changed

+0
-5
lines changed

block/blk-mq.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,9 +376,7 @@ static struct request *blk_mq_rq_ctx_init(struct blk_mq_alloc_data *data,
376376
rq->io_start_time_ns = 0;
377377
rq->stats_sectors = 0;
378378
rq->nr_phys_segments = 0;
379-
#if defined(CONFIG_BLK_DEV_INTEGRITY)
380379
rq->nr_integrity_segments = 0;
381-
#endif
382380
rq->end_io = NULL;
383381
rq->end_io_data = NULL;
384382

include/linux/blk-mq.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,7 @@ struct request {
149149
* physical address coalescing is performed.
150150
*/
151151
unsigned short nr_phys_segments;
152-
153-
#ifdef CONFIG_BLK_DEV_INTEGRITY
154152
unsigned short nr_integrity_segments;
155-
#endif
156153

157154
#ifdef CONFIG_BLK_INLINE_ENCRYPTION
158155
struct bio_crypt_ctx *crypt_ctx;

0 commit comments

Comments
 (0)