Skip to content

Commit f45c6d4

Browse files
authored
Merge pull request #278 from sc108-lee/list_ns
ns list bug fix (wrong cns value)
2 parents 055a2b4 + c3fb4fc commit f45c6d4

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

src/nvme/ioctl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,7 @@ static inline int nvme_identify_active_ns_list_csi(int fd, __u32 nsid,
871871
.args_size = sizeof(args),
872872
.fd = fd,
873873
.timeout = NVME_DEFAULT_IOCTL_TIMEOUT,
874-
.cns = NVME_IDENTIFY_CNS_NS_ACTIVE_LIST,
874+
.cns = NVME_IDENTIFY_CNS_CSI_NS_ACTIVE_LIST,
875875
.csi = csi,
876876
.nsid = nsid,
877877
.cntid = NVME_CNTLID_NONE,
@@ -908,7 +908,7 @@ static inline int nvme_identify_allocated_ns_list_csi(int fd, __u32 nsid,
908908
.args_size = sizeof(args),
909909
.fd = fd,
910910
.timeout = NVME_DEFAULT_IOCTL_TIMEOUT,
911-
.cns = NVME_IDENTIFY_CNS_ALLOCATED_NS_LIST,
911+
.cns = NVME_IDENTIFY_CNS_CSI_ALLOCATED_NS_LIST,
912912
.csi = csi,
913913
.nsid = nsid,
914914
.cntid = NVME_CNTLID_NONE,

src/nvme/types.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,12 @@ enum nvme_constants {
125125
/**
126126
* enum nvme_csi - Defined command set indicators
127127
* @NVME_CSI_NVM: NVM Command Set Indicator
128+
* @NVME_CSI_KV: Key Value Command Set
128129
* @NVME_CSI_ZNS: Zoned Namespace Command Set
129130
*/
130131
enum nvme_csi {
131132
NVME_CSI_NVM = 0,
133+
NVME_CSI_KV = 1,
132134
NVME_CSI_ZNS = 2,
133135
};
134136

@@ -6046,7 +6048,7 @@ enum nvme_admin_opcode {
60466048
* @NVME_IDENTIFY_CNS_UUID_LIST: A UUID List
60476049
* @NVME_IDENTIFY_CNS_DOMAIN_LIST: Domain List
60486050
* @NVME_IDENTIFY_CNS_ENDURANCE_GROUP_ID: Endurance Group List
6049-
* @NVME_IDENTIFY_CNS_CSS_ALLOCATED_NS_LIST: I/O Command Set specific Allocated Namespace
6051+
* @NVME_IDENTIFY_CNS_CSI_ALLOCATED_NS_LIST: I/O Command Set specific Allocated Namespace
60506052
* ID list
60516053
* @NVME_IDENTIFY_CNS_COMMAND_SET_STRUCTURE: Base Specification 2.0a section 5.17.2.21
60526054
*/
@@ -6072,7 +6074,7 @@ enum nvme_identify_cns {
60726074
NVME_IDENTIFY_CNS_UUID_LIST = 0x17,
60736075
NVME_IDENTIFY_CNS_DOMAIN_LIST = 0x18,
60746076
NVME_IDENTIFY_CNS_ENDURANCE_GROUP_ID = 0x19,
6075-
NVME_IDENTIFY_CNS_CSS_ALLOCATED_NS_LIST = 0x1A,
6077+
NVME_IDENTIFY_CNS_CSI_ALLOCATED_NS_LIST = 0x1A,
60766078
NVME_IDENTIFY_CNS_COMMAND_SET_STRUCTURE = 0x1C,
60776079
};
60786080

0 commit comments

Comments
 (0)