• Vishal Verma's avatar
    libnvdimm, btt: write and validate parent_uuid · 6ec68954
    Vishal Verma authored
    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: default avatarVishal Verma <vishal.l.verma@intel.com>
    Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
    6ec68954
btt_devs.c 11 KB