[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1250637355.27590.68.camel@haakon2.linux-iscsi.org>
Date: Tue, 18 Aug 2009 16:15:55 -0700
From: "Nicholas A. Bellinger" <nab@...ux-iscsi.org>
To: LKML <linux-kernel@...r.kernel.org>,
linux-scsi <linux-scsi@...r.kernel.org>
Cc: Douglas Gilbert <dgilbert@...erlog.com>,
FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>,
Mike Christie <michaelc@...wisc.edu>,
James Bottomley <James.Bottomley@...senPartnership.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"H. Peter Anvin" <hpa@...or.com>,
Alasdair G Kergon <agk@...hat.com>,
Joel Becker <joel.becker@...cle.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
Florian Haas <florian.haas@...bit.com>,
Philipp Reisner <philipp.reisner@...bit.com>
Subject: [PATCH 3/4] [LIO-Target]: Add ALUA Active/NonOptimized state check
Greetings,
This patch adds a call to target_core_mod symbol core_alua_check_nonop_delay()
in iscsi_handle_scsi_cmd(), which can optionally call msleep_interruptible() for
ALUA target port group members currently in the Active/NonOptimized primary access
state to allow schedule() to be run for real time iSCSI traffic shaping using
SPC-4 ALUA primitives.
The millisecond sleep interval is changed on a per ALUA target port group basis
in target_core_mod configfs at /sys/kernel/config/target/core/$HBA/$DEV/alua/$TG_PT_GP_NAME/nonop_delay_msecs
which will update the timeout for all members of the ALUA target port group using
generic target_core_mod infrastructure.
Signed-off-by: Nicholas A. Bellinger <nab@...ux-iscsi.org>
---
drivers/lio-core/iscsi_target.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/drivers/lio-core/iscsi_target.c b/drivers/lio-core/iscsi_target.c
index 3b1e3b7..5d00473 100644
--- a/drivers/lio-core/iscsi_target.c
+++ b/drivers/lio-core/iscsi_target.c
@@ -57,6 +57,7 @@
#include <iscsi_debug_opcodes.h>
#include <iscsi_target_core.h>
#include <target/target_core_base.h>
+#include <target/target_core_alua.h>
#include <iscsi_target_error.h>
#include <iscsi_target_datain_values.h>
#include <iscsi_target_discovery.h>
@@ -1571,7 +1572,11 @@ build_list:
attach_cmd:
iscsi_attach_cmd_to_queue(conn, cmd);
-
+ /*
+ * Check if we need to delay processing because of ALUA
+ * Active/NonOptimized primary access state..
+ */
+ core_alua_check_nonop_delay(SE_CMD(cmd));
/*
* Check the CmdSN against ExpCmdSN/MaxCmdSN here if
* the Immediate Bit is not set, and no Immediate
--
1.5.4.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists