From: Christoph Hellwig Date: Sun, 6 Jun 2021 09:28:40 +0000 (+0200) Subject: block: ease restrictions for non-integrity metadata X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=c05ddaf57b65b9f1df841c31d8c729597a491c63;p=users%2Fhch%2Fblock.git block: ease restrictions for non-integrity metadata 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 --- diff --git a/block/blk-integrity.c b/block/blk-integrity.c index 12ed2e7c2e76..5612a6dbc8de 100644 --- a/block/blk-integrity.c +++ b/block/blk-integrity.c @@ -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