From: Nicholas Bellinger <[email protected]>

This patch sets up the required target_iostate pointers to
se_cmd->execute_cmd() via existing sbc_ops.

This includes:

   - struct se_device,
   - struct target_iomem,
   - and ->t_comp_func() callback.

Cc: Jens Axboe <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Martin Petersen <[email protected]>
Cc: Sagi Grimberg <[email protected]>
Cc: Hannes Reinecke <[email protected]>
Cc: Mike Christie <[email protected]>
Signed-off-by: Nicholas Bellinger <[email protected]>
---
 drivers/target/target_core_transport.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/target/target_core_transport.c 
b/drivers/target/target_core_transport.c
index 2207624..4156059 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -1797,6 +1797,12 @@ void __target_execute_cmd(struct se_cmd *cmd, bool 
do_checks)
                        goto err;
                }
        }
+       /*
+        * Setup t_iostate + t_iomem for backend device submission
+        */
+       cmd->t_iostate.se_dev = cmd->se_dev;
+       cmd->t_iostate.iomem = &cmd->t_iomem;
+       cmd->t_iostate.t_comp_func = &target_complete_ios;
 
        ret = cmd->execute_cmd(cmd);
        if (!ret)
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to