History

libnvdimm: namespace indices: read and validate

This on media label format [1] consists of two index blocks followed by an array of labels. None of these structures are ever updated in place. A sequence number tracks the current active index and the next one to write, while labels are written to free slots. +------------+ | | | nsindex0 | | | +------------+ | | | nsindex1 | | | +------------+ | label0 | +------------+ | label1 | +------------+ | | ....nslot... | | +------------+ | labelN | +------------+ After reading valid labels, store the dpa ranges they claim into per-dimm resource trees. [1]: http://pmem.io/documents/NVDIMM_Namespace_Spec.pdf

Dan Williams committed 11 years ago

Commit 4a826c81 parent eaf96157 files · +520 −2Browse files

Showing the changes to include/uapi (1 of 7 files). Show all

Unified · Split

include/uapi/linux/ndctl.h+0−1
@@ -175,7 +175,6 @@ static inline const char *nvdimm_cmd_name(unsigned cmd) · 174 unmodified lines
175175 #define ND_IOCTL_ARS_STATUS _IOWR(ND_IOCTL, ND_CMD_ARS_STATUS,\
176176 struct nd_cmd_ars_status)
177177
178−
179178 #define ND_DEVICE_DIMM 1 /* nd_dimm: container for "config data" */
180179 #define ND_DEVICE_REGION_PMEM 2 /* nd_region: (parent of PMEM namespaces) */
181180 #define ND_DEVICE_REGION_BLK 3 /* nd_region: (parent of BLK namespaces) */