Commit b8b22533 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Nicholas Bellinger
Browse files

tcm_fc: Offload WRITE I/O backend submission to tpg workqueue

Defer the write processing to the internal to be able to use
target_execute_cmd.  I'm not even entirely sure the calling code requires
this due to the convoluted structure in libfc, but let's be safe for now.
Signed-off-by: default avatarChristoph Hellwig <>
Cc: Mark Rustad <>
Cc: Kiran Patil <>
Signed-off-by: default avatarNicholas Bellinger <>
parent 43381ce8
......@@ -183,6 +183,13 @@ int ft_queue_data_in(struct se_cmd *se_cmd)
return ft_queue_status(se_cmd);
static void ft_execute_work(struct work_struct *work)
struct ft_cmd *cmd = container_of(work, struct ft_cmd, work);
* Receive write data frame.
......@@ -307,8 +314,10 @@ void ft_recv_write_data(struct ft_cmd *cmd, struct fc_frame *fp)
cmd->write_data_len += tlen;
if (cmd->write_data_len == se_cmd->data_length)
if (cmd->write_data_len == se_cmd->data_length) {
INIT_WORK(&cmd->work, ft_execute_work);
queue_work(cmd->sess->tport->tpg->workqueue, &cmd->work);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment