Skip to content

Commit

Permalink
ioctl: add nvme_get_log_dispersed_ns_participating_nss()
Browse files Browse the repository at this point in the history
Since added the NVMe 2.1 log page.

Signed-off-by: Tokunori Ikegami <[email protected]>
  • Loading branch information
ikegami-t committed Jan 4, 2025
1 parent 407a1bc commit d2b0468
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/nvme/ioctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -2128,6 +2128,25 @@ static inline int nvme_get_log_rotational_media_info(int fd, __u16 endgid, __u32
return nvme_get_endgid_log(fd, false, NVME_LOG_LID_ROTATIONAL_MEDIA_INFO, endgid, len, log);
}

/**
* nvme_get_log_dispersed_ns_participating_nss() - Dispersed Namespace Participating NVM Subsystems
* Log
* @fd: File descriptor of nvme device
* @nsid: Namespace Identifier
* @offset: Offset into log page
* @len: The allocated length of the log page
* @log: User address to store the log page
*
* Return: The nvme command status if a response was received (see
* &enum nvme_status_field) or -1 with errno set otherwise
*/
static inline int nvme_get_log_dispersed_ns_participating_nss(int fd, __u32 nsid, __u32 offset,
__u32 len, struct nvme_dispersed_ns_participating_nss_log *log)
{
return nvme_get_nsid_log(fd, false, NVME_LOG_LID_DISPERSED_NS_PARTICIPATING_NSS, nsid, len,
log);
}

/**
* nvme_get_log_phy_rx_eom() - Retrieve Physical Interface Receiver Eye Opening Measurement Log
* @fd: File descriptor of nvme device
Expand Down
15 changes: 15 additions & 0 deletions src/nvme/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -4789,6 +4789,21 @@ struct nvme_rotational_media_info_log {
__u8 rsvd24[488];
};

/**
* struct nvme_dispersed_ns_participating_nss_log - Dispersed Namespace Participating NVM Subsystems
* Log
* @genctr: Generation Counter
* @numpsub: Number of Participating NVM Subsystems
* @rsvd16: Reserved
* @participating_nss: Participating NVM Subsystem Entry
*/
struct nvme_dispersed_ns_participating_nss_log {
__le64 genctr;
__le64 numpsub;
__u8 rsvd16[240];
__u8 participating_nss[];
};

/**
* struct nvme_eom_lane_desc - EOM Lane Descriptor
* @rsvd0: Reserved
Expand Down

0 comments on commit d2b0468

Please sign in to comment.