Commit | Line | Data |
---|---|---|
2025cf9e | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
e1455744 DW |
2 | /* |
3 | * Copyright (c) 2014-2015, Intel Corporation. | |
e1455744 DW |
4 | */ |
5 | ||
6 | #ifndef __NVDIMM_PFN_H | |
7 | #define __NVDIMM_PFN_H | |
8 | ||
9 | #include <linux/types.h> | |
d9cbe09d | 10 | #include <linux/mmzone.h> |
e1455744 DW |
11 | |
12 | #define PFN_SIG_LEN 16 | |
13 | #define PFN_SIG "NVDIMM_PFN_INFO\0" | |
c5ed9268 | 14 | #define DAX_SIG "NVDIMM_DAX_INFO\0" |
e1455744 DW |
15 | |
16 | struct nd_pfn_sb { | |
17 | u8 signature[PFN_SIG_LEN]; | |
18 | u8 uuid[16]; | |
19 | u8 parent_uuid[16]; | |
20 | __le32 flags; | |
21 | __le16 version_major; | |
22 | __le16 version_minor; | |
cfe30b87 | 23 | __le64 dataoff; /* relative to namespace_base + start_pad */ |
e1455744 DW |
24 | __le64 npfns; |
25 | __le32 mode; | |
cfe30b87 | 26 | /* minor-version-1 additions for section alignment */ |
6acd7d5e DW |
27 | /** |
28 | * @start_pad: Deprecated attribute to pad start-misaligned namespaces | |
29 | * | |
30 | * start_pad is deprecated because the original definition did | |
31 | * not comprehend that dataoff is relative to the base address | |
32 | * of the namespace not the start_pad adjusted base. The result | |
33 | * is that the dax path is broken, but the block-I/O path is | |
34 | * not. The kernel will no longer create namespaces using start | |
35 | * padding, but it still supports block-I/O for legacy | |
36 | * configurations mainly to allow a backup, reconfigure the | |
37 | * namespace, and restore flow to repair dax operation. | |
38 | */ | |
cfe30b87 DW |
39 | __le32 start_pad; |
40 | __le32 end_trunc; | |
45a0dac0 DW |
41 | /* minor-version-2 record the base alignment of the mapping */ |
42 | __le32 align; | |
7e3e888d | 43 | /* minor-version-3 guarantee the padding and flags are zero */ |
edbb52c2 AK |
44 | /* minor-version-4 record the page size and struct page size */ |
45 | __le32 page_size; | |
46 | __le16 page_struct_size; | |
47 | u8 padding[3994]; | |
e1455744 DW |
48 | __le64 checksum; |
49 | }; | |
d9cbe09d | 50 | |
e1455744 | 51 | #endif /* __NVDIMM_PFN_H */ |