diff options
author | Christoph Hellwig <hch@infradead.org> | 2012-04-24 00:25:06 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-05-06 18:11:26 -0400 |
commit | 5787cacd0bd5ee016ad807b244550d34fe2beebe (patch) | |
tree | d9303fd0c5767f945c13dfc34eb0b16a4f4d2730 /include/target | |
parent | cf572a9627c9ae86082216de109780c1d2e2ee28 (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.h | 11 | ||||
-rw-r--r-- | include/target/target_core_base.h | 11 |
2 files changed, 6 insertions, 16 deletions
diff --git a/include/target/target_core_backend.h b/include/target/target_core_backend.h index 2f54649dc029..2d7db85e93ae 100644 --- a/include/target/target_core_backend.h +++ b/include/target/target_core_backend.h | |||
@@ -23,12 +23,11 @@ struct se_subsystem_api { | |||
23 | struct se_device *(*create_virtdevice)(struct se_hba *, | 23 | struct se_device *(*create_virtdevice)(struct se_hba *, |
24 | struct se_subsystem_dev *, void *); | 24 | struct se_subsystem_dev *, void *); |
25 | void (*free_device)(void *); | 25 | void (*free_device)(void *); |
26 | int (*transport_complete)(struct se_task *task); | 26 | int (*transport_complete)(struct se_cmd *cmd, struct scatterlist *); |
27 | struct se_task *(*alloc_task)(unsigned char *cdb); | 27 | int (*execute_cmd)(struct se_cmd *, struct scatterlist *, u32, |
28 | int (*do_task)(struct se_task *); | 28 | enum dma_data_direction); |
29 | int (*do_discard)(struct se_device *, sector_t, u32); | 29 | int (*do_discard)(struct se_device *, sector_t, u32); |
30 | void (*do_sync_cache)(struct se_cmd *); | 30 | void (*do_sync_cache)(struct se_cmd *); |
31 | void (*free_task)(struct se_task *); | ||
32 | ssize_t (*check_configfs_dev_params)(struct se_hba *, | 31 | ssize_t (*check_configfs_dev_params)(struct se_hba *, |
33 | struct se_subsystem_dev *); | 32 | struct se_subsystem_dev *); |
34 | ssize_t (*set_configfs_dev_params)(struct se_hba *, | 33 | ssize_t (*set_configfs_dev_params)(struct se_hba *, |
@@ -38,7 +37,7 @@ struct se_subsystem_api { | |||
38 | u32 (*get_device_rev)(struct se_device *); | 37 | u32 (*get_device_rev)(struct se_device *); |
39 | u32 (*get_device_type)(struct se_device *); | 38 | u32 (*get_device_type)(struct se_device *); |
40 | sector_t (*get_blocks)(struct se_device *); | 39 | sector_t (*get_blocks)(struct se_device *); |
41 | unsigned char *(*get_sense_buffer)(struct se_task *); | 40 | unsigned char *(*get_sense_buffer)(struct se_cmd *); |
42 | }; | 41 | }; |
43 | 42 | ||
44 | int transport_subsystem_register(struct se_subsystem_api *); | 43 | int transport_subsystem_register(struct se_subsystem_api *); |
@@ -48,8 +47,6 @@ struct se_device *transport_add_device_to_core_hba(struct se_hba *, | |||
48 | struct se_subsystem_api *, struct se_subsystem_dev *, u32, | 47 | struct se_subsystem_api *, struct se_subsystem_dev *, u32, |
49 | void *, struct se_dev_limits *, const char *, const char *); | 48 | void *, struct se_dev_limits *, const char *, const char *); |
50 | 49 | ||
51 | void transport_complete_sync_cache(struct se_cmd *, int); | ||
52 | void transport_complete_task(struct se_task *, int); | ||
53 | void target_complete_cmd(struct se_cmd *, u8); | 50 | void target_complete_cmd(struct se_cmd *, u8); |
54 | 51 | ||
55 | void transport_set_vpd_proto_id(struct t10_vpd *, unsigned char *); | 52 | 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 9ea87e68275d..55a80bd50703 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h | |||
@@ -477,14 +477,6 @@ struct se_queue_obj { | |||
477 | wait_queue_head_t thread_wq; | 477 | wait_queue_head_t thread_wq; |
478 | }; | 478 | }; |
479 | 479 | ||
480 | struct se_task { | ||
481 | struct se_cmd *task_se_cmd; | ||
482 | struct scatterlist *task_sg; | ||
483 | u32 task_sg_nents; | ||
484 | u8 task_scsi_status; | ||
485 | enum dma_data_direction task_data_direction; | ||
486 | }; | ||
487 | |||
488 | struct se_tmr_req { | 480 | struct se_tmr_req { |
489 | /* Task Management function to be performed */ | 481 | /* Task Management function to be performed */ |
490 | u8 function; | 482 | u8 function; |
@@ -592,7 +584,8 @@ struct se_cmd { | |||
592 | /* old task stop completion, consider merging with some of the above */ | 584 | /* old task stop completion, consider merging with some of the above */ |
593 | struct completion task_stop_comp; | 585 | struct completion task_stop_comp; |
594 | 586 | ||
595 | struct se_task *t_task; | 587 | /* backend private data */ |
588 | void *priv; | ||
596 | }; | 589 | }; |
597 | 590 | ||
598 | struct se_ua { | 591 | struct se_ua { |