engines/io_uring: remove dead code related to trim
[fio.git] / engines / nvme.h
index 1c0e526b95edfe67e0c6fef4e34e5e098e96a1e7..238471dd76b94f1dd063eee7449ed9e2354a6abd 100644 (file)
@@ -48,6 +48,8 @@ struct nvme_uring_cmd {
 #define NVME_ZNS_ZSA_RESET 0x4
 #define NVME_ZONE_TYPE_SEQWRITE_REQ 0x2
 
+#define NVME_ATTRIBUTE_DEALLOCATE (1 << 2)
+
 enum nvme_identify_cns {
        NVME_IDENTIFY_CNS_NS            = 0x00,
        NVME_IDENTIFY_CNS_CSI_NS        = 0x05,
@@ -67,6 +69,7 @@ enum nvme_admin_opcode {
 enum nvme_io_opcode {
        nvme_cmd_write                  = 0x01,
        nvme_cmd_read                   = 0x02,
+       nvme_cmd_dsm                    = 0x09,
        nvme_cmd_io_mgmt_recv           = 0x12,
        nvme_zns_cmd_mgmt_send          = 0x79,
        nvme_zns_cmd_mgmt_recv          = 0x7a,
@@ -85,6 +88,7 @@ enum nvme_zns_zs {
 struct nvme_data {
        __u32 nsid;
        __u32 lba_shift;
+       __u32 lba_ext;
 };
 
 struct nvme_lbaf {
@@ -131,8 +135,7 @@ struct nvme_id_ns {
        __le16                  endgid;
        __u8                    nguid[16];
        __u8                    eui64[8];
-       struct nvme_lbaf        lbaf[16];
-       __u8                    rsvd192[192];
+       struct nvme_lbaf        lbaf[64];
        __u8                    vs[3712];
 };
 
@@ -207,14 +210,20 @@ struct nvme_fdp_ruh_status {
        struct nvme_fdp_ruh_status_desc ruhss[];
 };
 
+struct nvme_dsm_range {
+       __le32  cattr;
+       __le32  nlb;
+       __le64  slba;
+};
+
 int fio_nvme_iomgmt_ruhs(struct thread_data *td, struct fio_file *f,
                         struct nvme_fdp_ruh_status *ruhs, __u32 bytes);
 
 int fio_nvme_get_info(struct fio_file *f, __u32 *nsid, __u32 *lba_sz,
-                     __u64 *nlba);
+                     __u32 *ms, __u64 *nlba);
 
 int fio_nvme_uring_cmd_prep(struct nvme_uring_cmd *cmd, struct io_u *io_u,
-                           struct iovec *iov);
+                           struct iovec *iov, struct nvme_dsm_range *dsm);
 
 int fio_nvme_get_zoned_model(struct thread_data *td, struct fio_file *f,
                             enum zbd_zoned_model *model);