diff options
author | Christoph Hellwig <hch@infradead.org> | 2012-07-08 15:58:47 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-07-16 17:35:20 -0700 |
commit | 7a6f0a1ea5f5ac9b67211071d558c5b09580695d (patch) | |
tree | 0ffcac6216f162ead3f009ab6aef739fcf53a241 /drivers/target | |
parent | 1389533ef944823a6ebc170345ad8743e48bc404 (diff) |
target: simply fabric driver queue full processing
There is no need to schedule the delayed processing in a workqueue that
offloads it to the target processing thread. Instead execute it directly
from the workqueue. There will be a lot of future work in this area,
which I'd likfe to defer for now as it is not nessecary for getting rid
of the target processing thread.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
-rw-r--r-- | drivers/target/target_core_transport.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 1f28d1804e15..68f0c8dbc03b 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -720,6 +720,8 @@ static void target_add_to_state_list(struct se_cmd *cmd) /* * Handle QUEUE_FULL / -EAGAIN and -ENOMEM status */ +static void transport_write_pending_qf(struct se_cmd *cmd); +static void transport_complete_qf(struct se_cmd *cmd); static void target_qf_do_work(struct work_struct *work) { @@ -743,7 +745,10 @@ static void target_qf_do_work(struct work_struct *work) (cmd->t_state == TRANSPORT_COMPLETE_QF_WP) ? "WRITE_PENDING" : "UNKNOWN"); - transport_add_cmd_to_queue(cmd, cmd->t_state, true); + if (cmd->t_state == TRANSPORT_COMPLETE_QF_WP) + transport_write_pending_qf(cmd); + else if (cmd->t_state == TRANSPORT_COMPLETE_QF_OK) + transport_complete_qf(cmd); } } @@ -3262,12 +3267,6 @@ get_cmd: case TRANSPORT_PROCESS_TMR: transport_generic_do_tmr(cmd); break; - case TRANSPORT_COMPLETE_QF_WP: - transport_write_pending_qf(cmd); - break; - case TRANSPORT_COMPLETE_QF_OK: - transport_complete_qf(cmd); - break; default: pr_err("Unknown t_state: %d for ITT: 0x%08x " "i_state: %d on SE LUN: %u\n", |