From 4125a09b0a0d579ebace17f0e62b03ab9d5ab2f4 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 21 Oct 2015 13:20:29 -0400 Subject: block, libnvdimm, nvme: provide a built-in blk_integrity nop profile The libnvidmm-btt and nvme drivers use blk_integrity to reserve space for per-sector metadata, but sometimes without protection checksums. This property is generically useful, so teach the block core to internally specify a nop profile if one is not provided at registration time. Cc: Keith Busch Cc: Matthew Wilcox Suggested-by: Christoph Hellwig [hch: kill the local nvme nop profile as well] Acked-by: Martin K. Petersen Signed-off-by: Dan Williams Signed-off-by: Jens Axboe --- drivers/nvdimm/core.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'drivers/nvdimm/core.c') diff --git a/drivers/nvdimm/core.c b/drivers/nvdimm/core.c index e85848caf8d2..82c49bb87055 100644 --- a/drivers/nvdimm/core.c +++ b/drivers/nvdimm/core.c @@ -392,24 +392,14 @@ void nvdimm_bus_unregister(struct nvdimm_bus *nvdimm_bus) EXPORT_SYMBOL_GPL(nvdimm_bus_unregister); #ifdef CONFIG_BLK_DEV_INTEGRITY -static int nd_pi_nop_generate_verify(struct blk_integrity_iter *iter) -{ - return 0; -} - int nd_integrity_init(struct gendisk *disk, unsigned long meta_size) { struct blk_integrity bi; - static struct blk_integrity_profile profile = { - .name = "ND-PI-NOP", - .generate_fn = nd_pi_nop_generate_verify, - .verify_fn = nd_pi_nop_generate_verify, - }; if (meta_size == 0) return 0; - bi.profile = &profile; + bi.profile = NULL; bi.tuple_size = meta_size; bi.tag_size = meta_size; -- cgit