mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 3/4] [LIO-Target]: Add ALUA Active/NonOptimized state check
@ 2009-08-18 23:15 Nicholas A. Bellinger
  0 siblings, 0 replies; only message in thread
From: Nicholas A. Bellinger @ 2009-08-18 23:15 UTC (permalink / raw)
  To: LKML, linux-scsi
  Cc: Douglas Gilbert, FUJITA Tomonori, Mike Christie, James Bottomley,
	Andrew Morton, H. Peter Anvin, Alasdair G Kergon, Joel Becker,
	Martin K. Petersen, Florian Haas, Philipp Reisner

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@linux-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




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-08-18 23:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-18 23:15 [PATCH 3/4] [LIO-Target]: Add ALUA Active/NonOptimized state check Nicholas A. Bellinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®