target: Core cleanups from AGrover (round 1)
This patch contains the squashed version of a number of cleanups and minor fixes from Andy's initial series (round 1) for target core this past spring. The condensed log looks like: target: use errno values instead of returning -1 for everything target: Rename transport_calc_sg_num to transport_init_task_sg target: Fix leak in error path in transport_init_task_sg target/pscsi: Remove pscsi_get_sh() usage target: Make two runtime checks into WARN_ONs target: Remove hba queue depth and convert to spin_lock_irq usage target: dev->dev_status_queue_obj is unused target: Make struct se_queue_req.cmd type struct se_cmd * target: Remove __transport_get_qr_from_queue() target: Rename se_dev->g_se_dev_list to se_dev_node target: Remove struct se_global target: Simplify scsi mib index table code target: Make dev_queue_obj a member of se_device instead of a pointer target: remove extraneous returns at end of void functions target: Ensure transport_dump_vpd_ident_type returns null-terminated str target: Function pointers don't need to use '&' to be assigned target: Fix comment in __transport_execute_tasks() target: Misc style cleanups target: rename struct pr_reservation_template to pr_reservation target: Remove #defines that just perform indirection target: Inline transport_get_task_from_execute_queue() target: Minor header comment fixes Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
此提交包含在:
@@ -118,7 +118,7 @@ static struct se_cmd *tcm_loop_allocate_core_cmd(
|
||||
* Signal BIDI usage with T_TASK(cmd)->t_tasks_bidi
|
||||
*/
|
||||
if (scsi_bidi_cmnd(sc))
|
||||
T_TASK(se_cmd)->t_tasks_bidi = 1;
|
||||
se_cmd->t_task->t_tasks_bidi = 1;
|
||||
/*
|
||||
* Locate the struct se_lun pointer and attach it to struct se_cmd
|
||||
*/
|
||||
@@ -176,7 +176,7 @@ static int tcm_loop_new_cmd_map(struct se_cmd *se_cmd)
|
||||
* For BIDI commands, pass in the extra READ buffer
|
||||
* to transport_generic_map_mem_to_cmd() below..
|
||||
*/
|
||||
if (T_TASK(se_cmd)->t_tasks_bidi) {
|
||||
if (se_cmd->t_task->t_tasks_bidi) {
|
||||
struct scsi_data_buffer *sdb = scsi_in(sc);
|
||||
|
||||
mem_bidi_ptr = (void *)sdb->table.sgl;
|
||||
@@ -1402,9 +1402,9 @@ static int tcm_loop_register_configfs(void)
|
||||
* Register the top level struct config_item_type with TCM core
|
||||
*/
|
||||
fabric = target_fabric_configfs_init(THIS_MODULE, "loopback");
|
||||
if (!fabric) {
|
||||
if (IS_ERR(fabric)) {
|
||||
printk(KERN_ERR "tcm_loop_register_configfs() failed!\n");
|
||||
return -1;
|
||||
return PTR_ERR(fabric);
|
||||
}
|
||||
/*
|
||||
* Setup the fabric API of function pointers used by target_core_mod
|
||||
|
新增問題並參考
封鎖使用者