提交 7ec811a8 编写于 作者: V Varun Prakash 提交者: Nicholas Bellinger

iscsi-target: add void (*iscsit_release_cmd)()

Add void (*iscsit_release_cmd)() to
struct iscsit_transport, iscsi-target
uses this callback to release transport
driver resources associated with an iSCSI cmd.

cxgbit.ko needs this callback to release DDP
resource and sg page in case of
PASSTHROUGH_SG_TO_MEM_NOALLOC.
Signed-off-by: NVarun Prakash <varun@chelsio.com>
Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
上级 2854bb23
...@@ -725,6 +725,9 @@ void __iscsit_free_cmd(struct iscsi_cmd *cmd, bool scsi_cmd, ...@@ -725,6 +725,9 @@ void __iscsit_free_cmd(struct iscsi_cmd *cmd, bool scsi_cmd,
iscsit_remove_cmd_from_immediate_queue(cmd, conn); iscsit_remove_cmd_from_immediate_queue(cmd, conn);
iscsit_remove_cmd_from_response_queue(cmd, conn); iscsit_remove_cmd_from_response_queue(cmd, conn);
} }
if (conn && conn->conn_transport->iscsit_release_cmd)
conn->conn_transport->iscsit_release_cmd(conn, cmd);
} }
void iscsit_free_cmd(struct iscsi_cmd *cmd, bool shutdown) void iscsit_free_cmd(struct iscsi_cmd *cmd, bool shutdown)
......
...@@ -24,6 +24,7 @@ struct iscsit_transport { ...@@ -24,6 +24,7 @@ struct iscsit_transport {
void (*iscsit_aborted_task)(struct iscsi_conn *, struct iscsi_cmd *); void (*iscsit_aborted_task)(struct iscsi_conn *, struct iscsi_cmd *);
int (*iscsit_xmit_pdu)(struct iscsi_conn *, struct iscsi_cmd *, int (*iscsit_xmit_pdu)(struct iscsi_conn *, struct iscsi_cmd *,
struct iscsi_datain_req *, const void *, u32); struct iscsi_datain_req *, const void *, u32);
void (*iscsit_release_cmd)(struct iscsi_conn *, struct iscsi_cmd *);
enum target_prot_op (*iscsit_get_sup_prot_ops)(struct iscsi_conn *); enum target_prot_op (*iscsit_get_sup_prot_ops)(struct iscsi_conn *);
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册