cxlflash: Virtual LUN support
[deliverable/linux.git] / include / uapi / scsi / cxlflash_ioctl.h
index 57077340653101a7c15241b1fbc31cb1a9999f5a..831351b2e66022ee66f56bc2b8fe9c2f9fd7347f 100644 (file)
@@ -71,6 +71,17 @@ struct dk_cxlflash_udirect {
        __u64 reserved[8];              /* Reserved for future use */
 };
 
+#define DK_CXLFLASH_UVIRTUAL_NEED_WRITE_SAME   0x8000000000000000ULL
+
+struct dk_cxlflash_uvirtual {
+       struct dk_cxlflash_hdr hdr;     /* Common fields */
+       __u64 context_id;               /* Context to own virtual resources */
+       __u64 lun_size;                 /* Requested size, in 4K blocks */
+       __u64 rsrc_handle;              /* Returned resource handle */
+       __u64 last_lba;                 /* Returned last LBA of LUN */
+       __u64 reserved[8];              /* Reserved for future use */
+};
+
 struct dk_cxlflash_release {
        struct dk_cxlflash_hdr hdr;     /* Common fields */
        __u64 context_id;               /* Context owning resources */
@@ -78,6 +89,23 @@ struct dk_cxlflash_release {
        __u64 reserved[8];              /* Reserved for future use */
 };
 
+struct dk_cxlflash_resize {
+       struct dk_cxlflash_hdr hdr;     /* Common fields */
+       __u64 context_id;               /* Context owning resources */
+       __u64 rsrc_handle;              /* Resource handle of LUN to resize */
+       __u64 req_size;                 /* New requested size, in 4K blocks */
+       __u64 last_lba;                 /* Returned last LBA of LUN */
+       __u64 reserved[8];              /* Reserved for future use */
+};
+
+struct dk_cxlflash_clone {
+       struct dk_cxlflash_hdr hdr;     /* Common fields */
+       __u64 context_id_src;           /* Context to clone from */
+       __u64 context_id_dst;           /* Context to clone to */
+       __u64 adap_fd_src;              /* Source context adapter fd */
+       __u64 reserved[8];              /* Reserved for future use */
+};
+
 #define DK_CXLFLASH_VERIFY_SENSE_LEN   18
 #define DK_CXLFLASH_VERIFY_HINT_SENSE  0x8000000000000000ULL
 
@@ -118,7 +146,10 @@ union cxlflash_ioctls {
        struct dk_cxlflash_attach attach;
        struct dk_cxlflash_detach detach;
        struct dk_cxlflash_udirect udirect;
+       struct dk_cxlflash_uvirtual uvirtual;
        struct dk_cxlflash_release release;
+       struct dk_cxlflash_resize resize;
+       struct dk_cxlflash_clone clone;
        struct dk_cxlflash_verify verify;
        struct dk_cxlflash_recover_afu recover_afu;
        struct dk_cxlflash_manage_lun manage_lun;
@@ -136,5 +167,8 @@ union cxlflash_ioctls {
 #define DK_CXLFLASH_VERIFY             CXL_IOWR(0x84, dk_cxlflash_verify)
 #define DK_CXLFLASH_RECOVER_AFU                CXL_IOWR(0x85, dk_cxlflash_recover_afu)
 #define DK_CXLFLASH_MANAGE_LUN         CXL_IOWR(0x86, dk_cxlflash_manage_lun)
+#define DK_CXLFLASH_USER_VIRTUAL       CXL_IOWR(0x87, dk_cxlflash_uvirtual)
+#define DK_CXLFLASH_VLUN_RESIZE                CXL_IOWR(0x88, dk_cxlflash_resize)
+#define DK_CXLFLASH_VLUN_CLONE         CXL_IOWR(0x89, dk_cxlflash_clone)
 
 #endif /* ifndef _CXLFLASH_IOCTL_H */
This page took 0.042905 seconds and 5 git commands to generate.