summaryrefslogtreecommitdiffstats
path: root/include/target
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2012-04-24 00:25:06 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2012-05-06 15:11:26 -0700
commit5787cacd0bd5ee016ad807b244550d34fe2beebe (patch)
treed9303fd0c5767f945c13dfc34eb0b16a4f4d2730 /include/target
parentcf572a9627c9ae86082216de109780c1d2e2ee28 (diff)
target: remove struct se_task
We can use struct se_cmd for everything it did. Make sure to pass the S/G list and data direction to the execution function to ease adding back BIDI support later on. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'include/target')
-rw-r--r--include/target/target_core_backend.h11
-rw-r--r--include/target/target_core_base.h11
2 files changed, 6 insertions, 16 deletions
diff --git a/include/target/target_core_backend.h b/include/target/target_core_backend.h
index 2f54649dc02..2d7db85e93a 100644
--- a/include/target/target_core_backend.h
+++ b/include/target/target_core_backend.h
@@ -23,12 +23,11 @@ struct se_subsystem_api {
struct se_device *(*create_virtdevice)(struct se_hba *,
struct se_subsystem_dev *, void *);
void (*free_device)(void *);
- int (*transport_complete)(struct se_task *task);
- struct se_task *(*alloc_task)(unsigned char *cdb);
- int (*do_task)(struct se_task *);
+ int (*transport_complete)(struct se_cmd *cmd, struct scatterlist *);
+ int (*execute_cmd)(struct se_cmd *, struct scatterlist *, u32,
+ enum dma_data_direction);
int (*do_discard)(struct se_device *, sector_t, u32);
void (*do_sync_cache)(struct se_cmd *);
- void (*free_task)(struct se_task *);
ssize_t (*check_configfs_dev_params)(struct se_hba *,
struct se_subsystem_dev *);
ssize_t (*set_configfs_dev_params)(struct se_hba *,
@@ -38,7 +37,7 @@ struct se_subsystem_api {
u32 (*get_device_rev)(struct se_device *);
u32 (*get_device_type)(struct se_device *);
sector_t (*get_blocks)(struct se_device *);
- unsigned char *(*get_sense_buffer)(struct se_task *);
+ unsigned char *(*get_sense_buffer)(struct se_cmd *);
};
int transport_subsystem_register(struct se_subsystem_api *);
@@ -48,8 +47,6 @@ struct se_device *transport_add_device_to_core_hba(struct se_hba *,
struct se_subsystem_api *, struct se_subsystem_dev *, u32,
void *, struct se_dev_limits *, const char *, const char *);
-void transport_complete_sync_cache(struct se_cmd *, int);
-void transport_complete_task(struct se_task *, int);
void target_complete_cmd(struct se_cmd *, u8);
void transport_set_vpd_proto_id(struct t10_vpd *, unsigned char *);
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
index 9ea87e68275..55a80bd5070 100644
--- a/include/target/target_core_base.h
+++ b/include/target/target_core_base.h
@@ -477,14 +477,6 @@ struct se_queue_obj {
wait_queue_head_t thread_wq;
};
-struct se_task {
- struct se_cmd *task_se_cmd;
- struct scatterlist *task_sg;
- u32 task_sg_nents;
- u8 task_scsi_status;
- enum dma_data_direction task_data_direction;
-};
-
struct se_tmr_req {
/* Task Management function to be performed */
u8 function;
@@ -592,7 +584,8 @@ struct se_cmd {
/* old task stop completion, consider merging with some of the above */
struct completion task_stop_comp;
- struct se_task *t_task;
+ /* backend private data */
+ void *priv;
};
struct se_ua {