aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target/iscsi
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-03-02 14:43:27 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-03-02 14:43:27 -0500
commit986248993d495aebffcdf0758ce28ab85aa4e9ff (patch)
tree850c037dc3cb992ae1eb93bb05038f2fed95d70a /drivers/target/iscsi
parent426d266c12e9116497e3055212f823a56e1a6914 (diff)
parent2dbe10a202d2743582b5fb7c9864455ef6ecf9a6 (diff)
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Pull SCSI target patches from Nicholas Bellinger: "Here are the remaining target-pending patches for v3.9-rc1. The most important one here is the immediate queue starvation regression fix for iscsi-target, which addresses a bug that's effecting v3.5+ kernels under heavy sustained READ only workloads. Thanks alot to Benjamin Estrabaud for helping to track this down! Also included is a pSCSI exception bugfix from Asias, along with a handful of other minor changes. Both bugfixes are CC'ed to stable." * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: target/pscsi: Rename sg_num to nr_vecs in pscsi_get_bio() target/pscsi: Fix page increment target/pscsi: Drop unnecessary NULL assignment to bio->bi_next target: Add __exit annotation for module_exit functions iscsi-target: Fix immediate queue starvation regression with DATAIN
Diffstat (limited to 'drivers/target/iscsi')
-rw-r--r--drivers/target/iscsi/iscsi_target.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
index 9435a3d369a7..7ea246a07731 100644
--- a/drivers/target/iscsi/iscsi_target.c
+++ b/drivers/target/iscsi/iscsi_target.c
@@ -3584,6 +3584,10 @@ check_rsp_state:
3584 spin_lock_bh(&cmd->istate_lock); 3584 spin_lock_bh(&cmd->istate_lock);
3585 cmd->i_state = ISTATE_SENT_STATUS; 3585 cmd->i_state = ISTATE_SENT_STATUS;
3586 spin_unlock_bh(&cmd->istate_lock); 3586 spin_unlock_bh(&cmd->istate_lock);
3587
3588 if (atomic_read(&conn->check_immediate_queue))
3589 return 1;
3590
3587 continue; 3591 continue;
3588 } else if (ret == 2) { 3592 } else if (ret == 2) {
3589 /* Still must send status, 3593 /* Still must send status,
@@ -3673,7 +3677,7 @@ check_rsp_state:
3673 } 3677 }
3674 3678
3675 if (atomic_read(&conn->check_immediate_queue)) 3679 if (atomic_read(&conn->check_immediate_queue))
3676 break; 3680 return 1;
3677 } 3681 }
3678 3682
3679 return 0; 3683 return 0;
@@ -3717,12 +3721,15 @@ restart:
3717 signal_pending(current)) 3721 signal_pending(current))
3718 goto transport_err; 3722 goto transport_err;
3719 3723
3724get_immediate:
3720 ret = handle_immediate_queue(conn); 3725 ret = handle_immediate_queue(conn);
3721 if (ret < 0) 3726 if (ret < 0)
3722 goto transport_err; 3727 goto transport_err;
3723 3728
3724 ret = handle_response_queue(conn); 3729 ret = handle_response_queue(conn);
3725 if (ret == -EAGAIN) 3730 if (ret == 1)
3731 goto get_immediate;
3732 else if (ret == -EAGAIN)
3726 goto restart; 3733 goto restart;
3727 else if (ret < 0) 3734 else if (ret < 0)
3728 goto transport_err; 3735 goto transport_err;