Skip to content

Commit 5fd0268

Browse files
Christoph Hellwigaxboe
authored andcommitted
block: mark bounce buffering as incompatible with integrity
None of the few drivers still using the legacy block layer bounce buffering support integrity metadata. Explicitly mark the features as incompatible and stop creating the slab and mempool for integrity buffers for the bounce bio_set. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Anuj Gupta <[email protected]> Reviewed-by: Martin K. Petersen <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 567abc9 commit 5fd0268

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

block/blk-settings.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,11 @@ static int blk_validate_integrity_limits(struct queue_limits *lim)
117117
return 0;
118118
}
119119

120+
if (lim->features & BLK_FEAT_BOUNCE_HIGH) {
121+
pr_warn("no bounce buffer support for integrity metadata\n");
122+
return -EINVAL;
123+
}
124+
120125
if (!IS_ENABLED(CONFIG_BLK_DEV_INTEGRITY)) {
121126
pr_warn("integrity support disabled.\n");
122127
return -EINVAL;

block/bounce.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ static void init_bounce_bioset(void)
4141

4242
ret = bioset_init(&bounce_bio_set, BIO_POOL_SIZE, 0, BIOSET_NEED_BVECS);
4343
BUG_ON(ret);
44-
if (bioset_integrity_create(&bounce_bio_set, BIO_POOL_SIZE))
45-
BUG_ON(1);
4644

4745
ret = bioset_init(&bounce_bio_split, BIO_POOL_SIZE, 0, 0);
4846
BUG_ON(ret);

0 commit comments

Comments
 (0)