Skip to content

Commit f92b2a3

Browse files
cjp256igaw
authored andcommitted
types: fix regression for vendor-specific field in nvme_id_ns
Recent versions of nvme-cli have started reading vs from offset 392 instead of 384. Previous PRs coupled the use of nvme_id_ns for use in namespace management (create_ns). However, the NVMe spec has a different structure for namespace management, with only a subset of the fields allowed/shared and some additional fields. To fix this, remove lbstm and restore the proper length for vs from nvme_id_ns. I expect that create_ns() should fully switch over to the nvme_ns_mgmt_host_sw_specified struct which seems aligned with the spec (though has some newer fields than what is available in the latest NVMe Command Set Specification Revision 1.0c). This will have to be addressed separately in nvme-cli. #307 linux-nvme/nvme-cli#1452 Signed-off-by: Chris Patterson <[email protected]>
1 parent 9b1ec10 commit f92b2a3

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/nvme/types.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1799,7 +1799,6 @@ enum nvme_lbaf_rp {
17991799
* remains fixed throughout the life of the namespace and is
18001800
* preserved across namespace and controller operations
18011801
* @lbaf: LBA Format, see &struct nvme_lbaf.
1802-
* @lbstm: Logical Block Storage Tag Mask for end-to-end protection
18031802
* @vs: Vendor Specific
18041803
*/
18051804
struct nvme_id_ns {
@@ -1843,8 +1842,7 @@ struct nvme_id_ns {
18431842
__u8 nguid[16];
18441843
__u8 eui64[8];
18451844
struct nvme_lbaf lbaf[64];
1846-
__le64 lbstm;
1847-
__u8 vs[3704];
1845+
__u8 vs[3712];
18481846
};
18491847

18501848
/**

0 commit comments

Comments
 (0)