]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/target/target_core_base.h
target: Allow sbc_ops->execute_rw() to accept SGLs + data_direction
[karo-tx-linux.git] / include / target / target_core_base.h
index 3313b7d91ac8aa0e3c2a3168c0b880b97b3fa6f1..4a26a18a24d662c4720cc1dc9532668659c0fc61 100644 (file)
@@ -159,6 +159,8 @@ enum se_cmd_flags_table {
        SCF_ALUA_NON_OPTIMIZED          = 0x00008000,
        SCF_PASSTHROUGH_SG_TO_MEM_NOALLOC = 0x00020000,
        SCF_ACK_KREF                    = 0x00040000,
+       SCF_COMPARE_AND_WRITE           = 0x00080000,
+       SCF_COMPARE_AND_WRITE_POST      = 0x00100000,
 };
 
 /* struct se_dev_entry->lun_flags and struct se_lun->lun_access */
@@ -448,11 +450,14 @@ struct se_cmd {
        struct kref             cmd_kref;
        struct target_core_fabric_ops *se_tfo;
        sense_reason_t          (*execute_cmd)(struct se_cmd *);
+       sense_reason_t          (*execute_rw)(struct se_cmd *, struct scatterlist *,
+                                             u32, enum dma_data_direction);
        sense_reason_t (*transport_complete_callback)(struct se_cmd *);
 
        unsigned char           *t_task_cdb;
        unsigned char           __t_task_cdb[TCM_MAX_COMMAND_SIZE];
        unsigned long long      t_task_lba;
+       unsigned int            t_task_nolb;
        unsigned int            transport_state;
 #define CMD_T_ABORTED          (1 << 0)
 #define CMD_T_ACTIVE           (1 << 1)