libnvdimm/pfn_dev: Add page size and struct page size to pfn superblock

This is needed so that pmem probe don't wrongly initialize a namespace
which doesn't have enough space reserved for holding struct pages
with the current kernel.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Link: https://lore.kernel.org/r/20190905154603.10349-5-aneesh.kumar@linux.ibm.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This commit is contained in:
Aneesh Kumar K.V
2019-09-05 21:16:00 +05:30
committed by Dan Williams
parent e96f0bf2ec
commit edbb52c244
2 changed files with 28 additions and 2 deletions

View File

@@ -29,7 +29,10 @@ struct nd_pfn_sb {
/* minor-version-2 record the base alignment of the mapping */
__le32 align;
/* minor-version-3 guarantee the padding and flags are zero */
u8 padding[4000];
/* minor-version-4 record the page size and struct page size */
__le32 page_size;
__le16 page_struct_size;
u8 padding[3994];
__le64 checksum;
};