summaryrefslogtreecommitdiffstats
path: root/drivers/nvdimm/nd.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2021-08-24 18:05:51 +0200
committerDan Williams <dan.j.williams@intel.com>2021-08-24 21:08:28 +0200
commitf56541a7122c68ef3074e41c2cb14182eb11d3a5 (patch)
tree733d4c7dc832733b4b0fc50aeb39da8f50b5b397 /drivers/nvdimm/nd.h
parentlibnvdimm/labels: Add a checksum calculation helper (diff)
downloadlinux-f56541a7122c68ef3074e41c2cb14182eb11d3a5.tar.xz
linux-f56541a7122c68ef3074e41c2cb14182eb11d3a5.zip
libnvdimm/labels: Add blk isetcookie set / validation helpers
In preparation for LIBNVDIMM to manage labels on CXL devices deploy helpers that abstract the label type from the implementation. The CXL label format is mostly similar to the EFI label format with concepts / fields added, like dynamic region creation and label type guids, and other concepts removed like BLK-mode and interleave-set-cookie ids. Given BLK-mode is not even supported on CXL push hide the BLK-mode specific details inside the helpers. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Link: https://lore.kernel.org/r/162982115185.1124374.13459190993792729776.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/nvdimm/nd.h')
-rw-r--r--drivers/nvdimm/nd.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/nvdimm/nd.h b/drivers/nvdimm/nd.h
index 9bf9cd4a9a2d..955c4395a8e3 100644
--- a/drivers/nvdimm/nd.h
+++ b/drivers/nvdimm/nd.h
@@ -177,6 +177,10 @@ static inline void nsl_set_lbasize(struct nvdimm_drvdata *ndd,
nd_label->lbasize = __cpu_to_le64(lbasize);
}
+bool nsl_validate_blk_isetcookie(struct nvdimm_drvdata *ndd,
+ struct nd_namespace_label *nd_label,
+ u64 isetcookie);
+
struct nd_region_data {
int ns_count;
int ns_active;