Skip to contentSkip to conversation

iscsi tcp: bidi capable

PATCH In review Boaz Harrosh 3 participants 5 messages Jan 20, 2009 – Feb 8, 2009 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iscsi tcp: bidi capable

From: Pete Wyckoff <[email protected]>

Mark iscsi_tcp as being capable of bidirectional transfers. The bsg interface checks this bit before attempting any bidirectional commands.

---
 drivers/scsi/iscsi_tcp.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
drivers/scsi/iscsi_tcp.c +7 -0
index af092a8..9e2d4fb 100644
@@ -806,6 +806,12 @@ static void iscsi_sw_tcp_session_destroy(struct iscsi_cls_session *cls_session)
 	iscsi_host_free(shost);
 }
 
+static int iscsi_tcp_slave_alloc(struct scsi_device *sdev)
+{
+	set_bit(QUEUE_FLAG_BIDI, &sdev->request_queue->queue_flags);
+	return 0;
+}
+
 static int iscsi_sw_tcp_slave_configure(struct scsi_device *sdev)
 {
 	blk_queue_bounce_limit(sdev->request_queue, BLK_BOUNCE_ANY);
@@ -826,6 +832,7 @@ static struct scsi_host_template iscsi_sw_tcp_sht = {
 	.eh_device_reset_handler= iscsi_eh_device_reset,
 	.eh_target_reset_handler= iscsi_eh_target_reset,
 	.use_clustering         = DISABLE_CLUSTERING,
+	.slave_alloc            = iscsi_tcp_slave_alloc,
 	.slave_configure        = iscsi_sw_tcp_slave_configure,
 	.proc_name		= "iscsi_tcp",
 	.this_id		= -1,
Signature · 1 line
1.6.0.1
#1 lore raw
Quoted 9 lines · Boaz Harrosh

From: Pete Wyckoff <[email protected]>

Mark iscsi_tcp as being capable of bidirectional transfers. The bsg interface checks this bit before attempting any bidirectional commands.

---

<snip>

Mike hi, whatever happened with this patch?

It is over scsi-misc but I think it should be good for iscsi tree. (Sorry) Since open-osd is apparently only going into next Kernel, sigh. Then this is fine for the next Kernel as well.

(I was advertising BIDI kernels since 2.6.26, well I guess not
from bsg+iscsi)

Thanks
Boaz

#2 lore raw
Quoted 7 lines · Boaz Harrosh
Quoted 6 lines · Boaz Harrosh

From: Pete Wyckoff <[email protected]>

Mark iscsi_tcp as being capable of bidirectional transfers. The bsg interface checks this bit before attempting any bidirectional commands.

Quoted 7 lines
Quoted 3 lines

---

<snip>

Mike hi, whatever happened with this patch?

I never saw it before. I must have missed it. I will queue it for the next feature window.

#4 lore raw
In reply to a message not in the archive
Quoted 17 lines · Boaz Harrosh

From: Pete Wyckoff <[email protected]>

Mark iscsi_tcp as being capable of bidirectional transfers. The bsg interface checks this bit before attempting any bidirectional commands.

---
 drivers/scsi/iscsi_tcp.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
drivers/scsi/iscsi_tcp.c +0 -0
index af092a8..9e2d4fb 100644

drivers/scsi/iscsi_tcp.c static void iscsi_sw_tcp_session_destroy(struct iscsi_cls_session *cls_session) · line 810

Quoted 5 lines
drivers/scsi/iscsi_tcp.c +2 -0
@@ -806,6 +806,12 @@ static void iscsi_sw_tcp_session_destroy(struct iscsi_cls_session *cls_session)
 	iscsi_host_free(shost);
 }
 
+static int iscsi_tcp_slave_alloc(struct scsi_device *sdev)
+{

I merged this for 2.6.30 with a small change where this is renamed iscsi_sw_tcp_slave_alloc to fit the naming of functions in that file.

Thanks.

#5 lore raw
Quoted 21 lines · Mike Christie
Quoted 20 lines · Boaz Harrosh

From: Pete Wyckoff <[email protected]>

Mark iscsi_tcp as being capable of bidirectional transfers. The bsg interface checks this bit before attempting any bidirectional commands.

---
 drivers/scsi/iscsi_tcp.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
drivers/scsi/iscsi_tcp.c +0 -0
index af092a8..9e2d4fb 100644
@@ -806,6 +806,12 @@ static void iscsi_sw_tcp_session_destroy(struct iscsi_cls_session *cls_session)
 	iscsi_host_free(shost);
 }
 
Quoted 6 lines

drivers/scsi/iscsi_tcp.c static void iscsi_sw_tcp_session_destroy(struct iscsi_cls_session *cls_session) · line 810

Quoted 2 lines
drivers/scsi/iscsi_tcp.c +2 -0
+static int iscsi_tcp_slave_alloc(struct scsi_device *sdev)
+{

I merged this for 2.6.30 with a small change where this is renamed iscsi_sw_tcp_slave_alloc to fit the naming of functions in that file.

Sure, thanks, sorry. It's Pete's patch and I failed to adapt it to latest changes.

Quoted 2 lines

Thanks.

Thanks
Boaz