@@ -1124,6 +1124,7 @@ static inline int nvme_zns_identify_ctrl(int fd, struct nvme_zns_id_ctrl *id)
11241124 * @csi: Command set identifier, see &enum nvme_csi for known values
11251125 * @lsp: Log specific field
11261126 * @lsi: Endurance group information
1127+ * @domid: Domain Identifier selection, if supported
11271128 * @uuidx: UUID selection, if supported
11281129 * @rae: Retain asynchronous events
11291130 * @ot: Offset Type; if set @lpo specifies the index into the list
@@ -1143,6 +1144,7 @@ struct nvme_get_log_args {
11431144 enum nvme_csi csi ;
11441145 __u16 lsi ;
11451146 __u8 lsp ;
1147+ __u16 domid ;
11461148 __u8 uuidx ;
11471149 bool rae ;
11481150 bool ot ;
@@ -1174,6 +1176,7 @@ static inline int nvme_get_nsid_log(int fd, bool rae,
11741176 .csi = NVME_CSI_NVM ,
11751177 .lsi = NVME_LOG_LSI_NONE ,
11761178 .lsp = NVME_LOG_LSP_NONE ,
1179+ .domid = NVME_DOMID_NONE ,
11771180 .uuidx = NVME_UUID_NONE ,
11781181 .rae = false,
11791182 .ot = false,
@@ -1741,6 +1744,39 @@ static inline int nvme_get_log_discovery(int fd, bool rae,
17411744}
17421745
17431746
1747+ /**
1748+ * nvme_get_log_media_unit_stat() -
1749+ * @fd: File descriptor of nvme device
1750+ * @domid: Domain Identifier selection, if supported
1751+ *
1752+ * Return: The nvme command status if a response was received (see
1753+ * &enum nvme_status_field) or -1 with errno set otherwise
1754+ */
1755+ static inline int nvme_get_log_media_unit_stat (int fd , __u16 domid ,
1756+ struct nvme_media_unit_stat_log * mus )
1757+ {
1758+ struct nvme_get_log_args args = {
1759+ .args_size = sizeof (args ),
1760+ .fd = fd ,
1761+ .result = NULL ,
1762+ .timeout = NVME_DEFAULT_IOCTL_TIMEOUT ,
1763+ .lid = NVME_LOG_LID_MEDIA_UNIT_STATUS ,
1764+ .lpo = 0 ,
1765+ .log = mus ,
1766+ .len = sizeof (* mus ),
1767+ .nsid = NVME_NSID_NONE ,
1768+ .csi = NVME_CSI_NVM ,
1769+ .lsi = NVME_LOG_LSI_NONE ,
1770+ .lsp = NVME_LOG_LSP_NONE ,
1771+ .domid = domid ,
1772+ .uuidx = NVME_UUID_NONE ,
1773+ .rae = false,
1774+ .ot = false,
1775+ };
1776+ return nvme_get_log (& args );
1777+ }
1778+
1779+
17441780/**
17451781 * nvme_get_log_reservation() -
17461782 * @fd: File descriptor of nvme device
0 commit comments