1libnvme(9) API Manual libnvme(9)
2
3
4
6 struct nvme_id_ns - Identify Namespace data structure
7
9 struct nvme_id_ns {
10 __le64 nsze;
11 __le64 ncap;
12 __le64 nuse;
13 __u8 nsfeat;
14 __u8 nlbaf;
15 __u8 flbas;
16 __u8 mc;
17 __u8 dpc;
18 __u8 dps;
19 __u8 nmic;
20 __u8 rescap;
21 __u8 fpi;
22 __u8 dlfeat;
23 __le16 nawun;
24 __le16 nawupf;
25 __le16 nacwu;
26 __le16 nabsn;
27 __le16 nabo;
28 __le16 nabspf;
29 __le16 noiob;
30 __u8 nvmcap[16];
31 __le16 npwg;
32 __le16 npwa;
33 __le16 npdg;
34 __le16 npda;
35 __le16 nows;
36 __le16 mssrl;
37 __le32 mcl;
38 __u8 msrc;
39 __u8 rsvd81;
40 __u8 nulbaf;
41 __u8 rsvd83[9];
42 __le32 anagrpid;
43 __u8 rsvd96[3];
44 __u8 nsattr;
45 __le16 nvmsetid;
46 __le16 endgid;
47 __u8 nguid[16];
48 __u8 eui64[8];
49 struct nvme_lbaf lbaf[64];
50 __le64 lbstm;
51 __u8 vs[3704];
52 };
53
54
56 nsze Namespace Size indicates the total size of the namespace in
57 logical blocks. The number of logical blocks is based on
58 the formatted LBA size.
59
60 ncap Namespace Capacity indicates the maximum number of logical
61 blocks that may be allocated in the namespace at any point
62 in time. The number of logical blocks is based on the for‐
63 matted LBA size.
64
65 nuse Namespace Utilization indicates the current number of logi‐
66 cal blocks allocated in the namespace. This field is
67 smaller than or equal to the Namespace Capacity. The number
68 of logical blocks is based on the formatted LBA size.
69
70 nsfeat Namespace Features, see enum nvme_id_nsfeat.
71
72 nlbaf Number of LBA Formats defines the number of supported LBA
73 data size and metadata size combinations supported by the
74 namespace and the highest possible index to struct
75 nvme_id_ns.lbaf.
76
77 flbas Formatted LBA Size, see enum nvme_id_ns_flbas.
78
79 mc Metadata Capabilities, see enum nvme_id_ns_mc.
80
81 dpc End-to-end Data Protection Capabilities, see enum
82 nvme_id_ns_dpc.
83
84 dps End-to-end Data Protection Type Settings, see enum
85 nvme_id_ns_dps.
86
87 nmic Namespace Multi-path I/O and Namespace Sharing Capabili‐
88 ties, see enum nvme_id_ns_nmic.
89
90 rescap Reservation Capabilities, see enum nvme_id_ns_rescap.
91
92 fpi Format Progress Indicator, see enum nvme_nd_ns_fpi.
93
94 dlfeat Deallocate Logical Block Features, see enum
95 nvme_id_ns_dlfeat.
96
97 nawun Namespace Atomic Write Unit Normal indicates the namespace
98 specific size of the write operation guaranteed to be writ‐
99 ten atomically to the NVM during normal operation.
100
101 nawupf Namespace Atomic Write Unit Power Fail indicates the name‐
102 space specific size of the write operation guaranteed to be
103 written atomically to the NVM during a power fail or error
104 condition.
105
106 nacwu Namespace Atomic Compare & Write Unit indicates the name‐
107 space specific size of the write operation guaranteed to be
108 written atomically to the NVM for a Compare and Write fused
109 command.
110
111 nabsn Namespace Atomic Boundary Size Normal indicates the atomic
112 boundary size for this namespace for the NAWUN value. This
113 field is specified in logical blocks.
114
115 nabo Namespace Atomic Boundary Offset indicates the LBA on this
116 namespace where the first atomic boundary starts.
117
118 nabspf Namespace Atomic Boundary Size Power Fail indicates the
119 atomic boundary size for this namespace specific to the
120 Namespace Atomic Write Unit Power Fail value. This field is
121 specified in logical blocks.
122
123 noiob Namespace Optimal I/O Boundary indicates the optimal I/O
124 boundary for this namespace. This field is specified in
125 logical blocks. The host should construct Read and Write
126 commands that do not cross the I/O boundary to achieve op‐
127 timal performance.
128
129 nvmcap NVM Capacity indicates the total size of the NVM allocated
130 to this namespace. The value is in bytes.
131
132 npwg Namespace Preferred Write Granularity indicates the small‐
133 est recommended write granularity in logical blocks for
134 this namespace. This is a 0's based value.
135
136 npwa Namespace Preferred Write Alignment indicates the recom‐
137 mended write alignment in logical blocks for this name‐
138 space. This is a 0's based value.
139
140 npdg Namespace Preferred Deallocate Granularity indicates the
141 recommended granularity in logical blocks for the Dataset
142 Management command with the Attribute - Deallocate bit.
143
144 npda Namespace Preferred Deallocate Alignment indicates the rec‐
145 ommended alignment in logical blocks for the Dataset Man‐
146 agement command with the Attribute - Deallocate bit
147
148 nows Namespace Optimal Write Size indicates the size in logical
149 blocks for optimal write performance for this namespace.
150 This is a 0's based value.
151
152 mssrl Maximum Single Source Range Length indicates the maximum
153 number of logical blocks that may be specified in each
154 valid Source Range field of a Copy command.
155
156 mcl Maximum Copy Length indicates the maximum number of logical
157 blocks that may be specified in a Copy command.
158
159 msrc Maximum Source Range Count indicates the maximum number of
160 Source Range entries that may be used to specify source
161 data in a Copy command. This is a 0’s based value.
162
163 rsvd81 Reserved
164
165 nulbaf Number of Unique Capability LBA Formats defines the number
166 of supported user data size and metadata size combinations
167 supported by the namespace that may not share the same ca‐
168 pabilities. LBA formats shall be allocated in order and
169 packed sequentially.
170
171 rsvd83 Reserved
172
173 anagrpid ANA Group Identifier indicates the ANA Group Identifier of
174 the ANA group of which the namespace is a member.
175
176 rsvd96 Reserved
177
178 nsattr Namespace Attributes, see enum nvme_id_ns_attr.
179
180 nvmsetid NVM Set Identifier indicates the NVM Set with which this
181 namespace is associated.
182
183 endgid Endurance Group Identifier indicates the Endurance Group
184 with which this namespace is associated.
185
186 nguid Namespace Globally Unique Identifier contains a 128-bit
187 value that is globally unique and assigned to the namespace
188 when the namespace is created. This field remains fixed
189 throughout the life of the namespace and is preserved
190 across namespace and controller operations
191
192 eui64 IEEE Extended Unique Identifier contains a 64-bit IEEE Ex‐
193 tended Unique Identifier (EUI-64) that is globally unique
194 and assigned to the namespace when the namespace is cre‐
195 ated. This field remains fixed throughout the life of the
196 namespace and is preserved across namespace and controller
197 operations
198
199 lbaf LBA Format, see struct nvme_lbaf.
200
201 lbstm Logical Block Storage Tag Mask for end-to-end protection
202
203 vs Vendor Specific
204
205
206
207November 2022 struct nvme_id_ns libnvme(9)