Skip to content

Commit b220e1e

Browse files
ikegami-tigaw
authored andcommitted
ioctl: add nvme_get_log_dispersed_ns_participating_nss()
Since added the NVMe 2.1 log page. Signed-off-by: Tokunori Ikegami <[email protected]>
1 parent 454b5e0 commit b220e1e

2 files changed

Lines changed: 33 additions & 0 deletions

File tree

src/nvme/ioctl.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2135,6 +2135,24 @@ static inline int nvme_get_log_rotational_media_info(int fd, __u16 endgid, __u32
21352135
return nvme_get_endgid_log(fd, false, NVME_LOG_LID_ROTATIONAL_MEDIA_INFO, endgid, len, log);
21362136
}
21372137

2138+
/**
2139+
* nvme_get_log_dispersed_ns_participating_nss() - Retrieve Dispersed Namespace Participating NVM
2140+
* Subsystems Log
2141+
* @fd: File descriptor of nvme device
2142+
* @nsid: Namespace Identifier
2143+
* @len: The allocated length of the log page
2144+
* @log: User address to store the log page
2145+
*
2146+
* Return: The nvme command status if a response was received (see
2147+
* &enum nvme_status_field) or -1 with errno set otherwise
2148+
*/
2149+
static inline int nvme_get_log_dispersed_ns_participating_nss(int fd, __u32 nsid, __u32 len,
2150+
struct nvme_dispersed_ns_participating_nss_log *log)
2151+
{
2152+
return nvme_get_nsid_log(fd, false, NVME_LOG_LID_DISPERSED_NS_PARTICIPATING_NSS, nsid, len,
2153+
log);
2154+
}
2155+
21382156
/**
21392157
* nvme_get_log_phy_rx_eom() - Retrieve Physical Interface Receiver Eye Opening Measurement Log
21402158
* @fd: File descriptor of nvme device

src/nvme/types.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4789,6 +4789,21 @@ struct nvme_rotational_media_info_log {
47894789
__u8 rsvd24[488];
47904790
};
47914791

4792+
/**
4793+
* struct nvme_dispersed_ns_participating_nss_log - Dispersed Namespace Participating NVM Subsystems
4794+
* Log
4795+
* @genctr: Generation Counter
4796+
* @numpsub: Number of Participating NVM Subsystems
4797+
* @rsvd16: Reserved
4798+
* @participating_nss: Participating NVM Subsystem Entry
4799+
*/
4800+
struct nvme_dispersed_ns_participating_nss_log {
4801+
__le64 genctr;
4802+
__le64 numpsub;
4803+
__u8 rsvd16[240];
4804+
__u8 participating_nss[];
4805+
};
4806+
47924807
/**
47934808
* struct nvme_eom_lane_desc - EOM Lane Descriptor
47944809
* @rsvd0: Reserved

0 commit comments

Comments
 (0)