diff options
author | Dan Williams <dan.j.williams@intel.com> | 2015-12-13 03:09:14 +0300 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2015-12-13 22:40:20 +0300 |
commit | a34d5e8a6ad1a31b186019c9c351777626698863 (patch) | |
tree | 8ca570f659c71e0118486dda5249d5cf7908bdc0 /drivers/nvdimm/pmem.c | |
parent | 315c562536c42aa4da9b6c5a2135dd6715a5e0b5 (diff) | |
download | linux-a34d5e8a6ad1a31b186019c9c351777626698863.tar.xz |
libnvdimm, pfn: add parent uuid validation
Track and check the uuid of the namespace hosting a pfn instance. This
forces the pfn info block to be invalidated if the namespace is
re-configured with a different uuid.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/nvdimm/pmem.c')
-rw-r--r-- | drivers/nvdimm/pmem.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c index 5ba351e4f26a..dc6866734f70 100644 --- a/drivers/nvdimm/pmem.c +++ b/drivers/nvdimm/pmem.c @@ -270,6 +270,7 @@ static int nd_pfn_init(struct nd_pfn *nd_pfn) pfn_sb->npfns = cpu_to_le64(npfns); memcpy(pfn_sb->signature, PFN_SIG, PFN_SIG_LEN); memcpy(pfn_sb->uuid, nd_pfn->uuid, 16); + memcpy(pfn_sb->parent_uuid, nd_dev_to_uuid(&ndns->dev), 16); pfn_sb->version_major = cpu_to_le16(1); checksum = nd_sb_checksum((struct nd_gen_sb *) pfn_sb); pfn_sb->checksum = cpu_to_le64(checksum); |