summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2024-03-06 17:27:38 +0300
committerIra Weiny <ira.weiny@intel.com>2024-04-25 22:37:12 +0300
commit1e97469678a0987174d8bec0d955b67e0048ac84 (patch)
tree3ae17c63ee7f3ad07553e49b4095d0b0c346bb6d /drivers
parent9566b89295196996bce57bf307bc634cb0713cec (diff)
downloadlinux-1e97469678a0987174d8bec0d955b67e0048ac84.tar.xz
nvdimm/btt: always set max_integrity_segments
max_integrity_segments is just a hardware/driver limit and can be safely set even when integrity data is not supported. Set it in the initial queue_limits passed to blk_alloc_disk to simplify the driver. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20240306142739.237234-3-hch@lst.de Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/nvdimm/btt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c
index 8e855b4e3e38..1e5aedaf8c7b 100644
--- a/drivers/nvdimm/btt.c
+++ b/drivers/nvdimm/btt.c
@@ -1500,6 +1500,7 @@ static int btt_blk_init(struct btt *btt)
struct queue_limits lim = {
.logical_block_size = btt->sector_size,
.max_hw_sectors = UINT_MAX,
+ .max_integrity_segments = 1,
};
int rc;
@@ -1521,7 +1522,6 @@ static int btt_blk_init(struct btt *btt)
.tag_size = btt_meta_size(btt),
};
blk_integrity_register(btt->btt_disk, &bi);
- blk_queue_max_integrity_segments(btt->btt_disk->queue, 1);
}
set_capacity(btt->btt_disk, btt->nlba * btt->sector_size >> 9);