]> www.infradead.org Git - users/hch/block.git/commitdiff
block: ease restrictions for non-integrity metadata
authorChristoph Hellwig <hch@lst.de>
Sun, 6 Jun 2021 09:28:40 +0000 (11:28 +0200)
committerChristoph Hellwig <hch@lst.de>
Mon, 7 Jun 2021 06:12:03 +0000 (08:12 +0200)
There is no need to force stable writes or the inline crypto exclusion
if we are only using non-integrity metadata.

Signed-off-by: Christoph Hellwig <hch@lst.de>
block/blk-integrity.c

index 12ed2e7c2e7664e5bd65e3b9f9e36774b8735194..5612a6dbc8de20e317ceb09a8812d11381376ff6 100644 (file)
@@ -408,6 +408,9 @@ void blk_integrity_register(struct gendisk *disk, struct blk_integrity *template
        bi->tuple_size = template->tuple_size;
        bi->tag_size = template->tag_size;
 
+       if (!bi->profile->verify_fn && !bi->profile->generate_fn)
+               return;
+
        blk_queue_flag_set(QUEUE_FLAG_STABLE_WRITES, disk->queue);
 
 #ifdef CONFIG_BLK_INLINE_ENCRYPTION