* [PATCH] iscsi tcp set queue dma alignment to zero
@ 2007-03-01 22:20 Pete Wyckoff
2007-03-02 22:55 ` Mike Christie
0 siblings, 1 reply; 2+ messages in thread
From: Pete Wyckoff @ 2007-03-01 22:20 UTC (permalink / raw)
To: Mike Christie; +Cc: Jens Axboe, linux-scsi
Add a slave_configure function to iSCSI TCP to remove any DMA
alignment restriction. This permits the use of direct IO from
arbitrary addresses.
Signed-off-by: Pete Wyckoff <pw@osc.edu>
---
drivers/scsi/iscsi_tcp.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c
index 4376840..f48eedd 100644
--- a/drivers/scsi/iscsi_tcp.c
+++ b/drivers/scsi/iscsi_tcp.c
@@ -2132,6 +2132,16 @@ static void iscsi_tcp_session_destroy(struct iscsi_cls_session *cls_session)
iscsi_session_teardown(cls_session);
}
+/*
+ * New device attached. Turn off the DMA alignment restriction on
+ * the request queue.
+ */
+static int iscsi_tcp_slave_configure(struct scsi_device *sdev)
+{
+ blk_queue_dma_alignment(sdev->request_queue, 0);
+ return 0;
+}
+
static struct scsi_host_template iscsi_sht = {
.name = "iSCSI Initiator over TCP/IP",
.queuecommand = iscsi_queuecommand,
@@ -2142,6 +2152,7 @@ static struct scsi_host_template iscsi_sht = {
.eh_abort_handler = iscsi_eh_abort,
.eh_host_reset_handler = iscsi_eh_host_reset,
.use_clustering = DISABLE_CLUSTERING,
+ .slave_configure = iscsi_tcp_slave_configure,
.proc_name = "iscsi_tcp",
.this_id = -1,
};
--
1.5.0.2
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] iscsi tcp set queue dma alignment to zero
2007-03-01 22:20 [PATCH] iscsi tcp set queue dma alignment to zero Pete Wyckoff
@ 2007-03-02 22:55 ` Mike Christie
0 siblings, 0 replies; 2+ messages in thread
From: Mike Christie @ 2007-03-02 22:55 UTC (permalink / raw)
To: Pete Wyckoff; +Cc: Jens Axboe, linux-scsi, Erez Zilber
Pete Wyckoff wrote:
> Add a slave_configure function to iSCSI TCP to remove any DMA
> alignment restriction. This permits the use of direct IO from
> arbitrary addresses.
>
> Signed-off-by: Pete Wyckoff <pw@osc.edu>
> ---
> drivers/scsi/iscsi_tcp.c | 11 +++++++++++
> 1 files changed, 11 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c
> index 4376840..f48eedd 100644
> --- a/drivers/scsi/iscsi_tcp.c
> +++ b/drivers/scsi/iscsi_tcp.c
> @@ -2132,6 +2132,16 @@ static void iscsi_tcp_session_destroy(struct iscsi_cls_session *cls_session)
> iscsi_session_teardown(cls_session);
> }
>
> +/*
> + * New device attached. Turn off the DMA alignment restriction on
> + * the request queue.
> + */
> +static int iscsi_tcp_slave_configure(struct scsi_device *sdev)
> +{
> + blk_queue_dma_alignment(sdev->request_queue, 0);
> + return 0;
> +}
> +
I think the comments are not needed, but that is not a big deal. I will
put this in my tree and send it to James if he does not pick it up from
linux-scsi.
Thanks for the patch.
Erez, I do not think ib_iser should have any limit either (I only looked
at the code for a little bit though). You may want to do the the same
for iser.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-03-02 22:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-01 22:20 [PATCH] iscsi tcp set queue dma alignment to zero Pete Wyckoff
2007-03-02 22:55 ` Mike Christie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox