]> git.baikalelectronics.ru Git - kernel.git/commit
libnvdimm, btt: write and validate parent_uuid
authorVishal Verma <vishal.l.verma@intel.com>
Wed, 29 Jul 2015 20:58:09 +0000 (14:58 -0600)
committerDan Williams <dan.j.williams@intel.com>
Fri, 14 Aug 2015 17:43:04 +0000 (13:43 -0400)
commit429cde90a813ed32917c424de9a10fe331e2c568
treec8351f8cc5140510800ab2098259133de122ae17
parent6d75f19585d0c6b4c895ec5e07f02546cceaafc4
libnvdimm, btt: write and validate parent_uuid

When a BTT is instantiated on a namespace it must validate the namespace
uuid matches the 'parent_uuid' stored in the btt superblock. This
property enforces that changing the namespace UUID invalidates all
former BTT instances on that storage. For "IO namespaces" that don't
have a label or UUID, the parent_uuid is set to zero, and this
validation is skipped. For such cases, old BTTs have to be invalidated
by forcing the namespace to raw mode, and overwriting the BTT info
blocks.

Based on a patch by Dan Williams <dan.j.williams@intel.com>

Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/btt.c
drivers/nvdimm/btt_devs.c
drivers/nvdimm/namespace_devs.c
drivers/nvdimm/nd.h