]> git.baikalelectronics.ru Git - kernel.git/commit
target/iscsi: Refactor target_tx_thread immediate+response queue loops
authorAndy Grover <agrover@redhat.com>
Tue, 3 Apr 2012 22:51:09 +0000 (15:51 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Sun, 15 Apr 2012 00:40:34 +0000 (17:40 -0700)
commite5d358bdbe453f796fa8bd59034f7beb4f00215b
treec974a5838d4b117acee40eeeb00b786cb2e0db21
parent1c01dbb2d3885653deb0640dc49784d0f3743687
target/iscsi: Refactor target_tx_thread immediate+response queue loops

Immediate queue:

Consolidate down to one switch statement by moving send_tx_data and stuff
from second switch into the first switch, or the functions the first switch
calls.

Response queue:

Do not lock istate_lock except directly around i_state modifications.

Put entire ISTATE_SEND_DATAIN path within first switch statement, in prep
for further refactoring.

All other cases set use_misc = 1 and will not be using sendpage, so just
use send_tx_data for these and set use_misc param to 1.

map_sg, sent_status, use_misc, and se_cmd vars no longer needed.

Then put immediate and response handling in separate functions in order
to get iscsi_target_tx_thread down to where it fits on a page.

Signed-off-by: Andy Grover <agrover@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/iscsi/iscsi_target.c
drivers/target/iscsi/iscsi_target.h