libnvdimm/labels: Add blk isetcookie set / validation helpers
authorDan Williams <dan.j.williams@intel.com>
Tue, 24 Aug 2021 16:05:51 +0000 (09:05 -0700)
committerDan Williams <dan.j.williams@intel.com>
Tue, 24 Aug 2021 19:08:28 +0000 (12:08 -0700)
commitf56541a7122c68ef3074e41c2cb14182eb11d3a5
tree733d4c7dc832733b4b0fc50aeb39da8f50b5b397
parent7cd35b2920500908eb3d9d00939f2aea3e8f8361
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>
drivers/nvdimm/label.c
drivers/nvdimm/namespace_devs.c
drivers/nvdimm/nd.h