summaryrefslogtreecommitdiffstats
path: root/drivers/nvdimm/core.c
diff options
context:
space:
mode:
authorVishal Verma <vishal.l.verma@intel.com>2015-06-25 10:22:39 +0200
committerDan Williams <dan.j.williams@intel.com>2015-06-26 17:23:38 +0200
commitfcae695737fca0849c18db814d9d8de05c0fd2a2 (patch)
treed88f8a5edf637cf1013c764e14df8c97b4b77539 /drivers/nvdimm/core.c
parentlibnvdimm, btt: add support for blk integrity (diff)
downloadlinux-fcae695737fca0849c18db814d9d8de05c0fd2a2.tar.xz
linux-fcae695737fca0849c18db814d9d8de05c0fd2a2.zip
libnvdimm, blk: add support for blk integrity
Support multiple block sizes (sector + metadata) for nd_blk in the same way as done for the BTT. Add the idea of an 'internal' lbasize, which is properly aligned and padded, and store metadata in this space. Signed-off-by: Vishal Verma <vishal.l.verma@linux.intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/nvdimm/core.c')
-rw-r--r--drivers/nvdimm/core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/nvdimm/core.c b/drivers/nvdimm/core.c
index 1d96b9a6e4cc..4288169432de 100644
--- a/drivers/nvdimm/core.c
+++ b/drivers/nvdimm/core.c
@@ -379,6 +379,9 @@ int nd_integrity_init(struct gendisk *disk, unsigned long meta_size)
};
int ret;
+ if (meta_size == 0)
+ return 0;
+
ret = blk_integrity_register(disk, &integrity);
if (ret)
return ret;