]> www.infradead.org Git - users/hch/misc.git/commitdiff
block: mark bounce buffering as incompatible with integrity
authorChristoph Hellwig <hch@lst.de>
Sun, 26 Jan 2025 05:14:26 +0000 (06:14 +0100)
committerChristoph Hellwig <hch@lst.de>
Mon, 3 Feb 2025 09:18:37 +0000 (10:18 +0100)
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 <hch@lst.de>
block/blk-settings.c
block/bounce.c

index c44dadc35e1ece20be211eb3ad19a8b1ac31ef3b..d73fc9c5c1fb9131361c62e133e1cf40420babef 100644 (file)
@@ -117,6 +117,11 @@ static int blk_validate_integrity_limits(struct queue_limits *lim)
                return 0;
        }
 
+       if (lim->features & BLK_FEAT_BOUNCE_HIGH) {
+               pr_warn("no bounce buffer support for integruty metadata\n");
+               return -EINVAL;
+       }
+
        if (!IS_ENABLED(CONFIG_BLK_DEV_INTEGRITY)) {
                pr_warn("integrity support disabled.\n");
                return -EINVAL;
index 0d898cd5ec497f7a3bc68e9ab1805f40cb9c9519..09a9616cf20944ff1ef1c24609ffb76f6b62643f 100644 (file)
@@ -41,8 +41,6 @@ static void init_bounce_bioset(void)
 
        ret = bioset_init(&bounce_bio_set, BIO_POOL_SIZE, 0, BIOSET_NEED_BVECS);
        BUG_ON(ret);
-       if (bioset_integrity_create(&bounce_bio_set, BIO_POOL_SIZE))
-               BUG_ON(1);
 
        ret = bioset_init(&bounce_bio_split, BIO_POOL_SIZE, 0, 0);
        BUG_ON(ret);