From: Bart Van Assche <bart.vanassche@sandisk.com>
To: Christoph Hellwig <hch@lst.de>,
linux-rdma@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH 1/2] scsi: add a max_segment_size limitation to struct Scsi_Host
Date: Tue, 12 Apr 2016 08:19:20 -0700 [thread overview]
Message-ID: <570D11F8.1080707@sandisk.com> (raw)
In-Reply-To: <1460470405-11673-2-git-send-email-hch@lst.de>
On 04/12/2016 07:13 AM, Christoph Hellwig wrote:
> diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
> index 8106515..ad79372 100644
> --- a/drivers/scsi/scsi_lib.c
> +++ b/drivers/scsi/scsi_lib.c
> @@ -2120,7 +2120,8 @@ static void __scsi_init_queue(struct Scsi_Host *shost, struct request_queue *q)
> blk_queue_segment_boundary(q, shost->dma_boundary);
> dma_set_seg_boundary(dev, shost->dma_boundary);
>
> - blk_queue_max_segment_size(q, dma_get_max_seg_size(dev));
> + blk_queue_max_segment_size(q, min_not_zero(shost->max_segment_size,
> + dma_get_max_seg_size(dev)));
>
> if (!shost->use_clustering)
> q->limits.cluster = 0;
> diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
> index fcfa3d7..f11d3fe 100644
> --- a/include/scsi/scsi_host.h
> +++ b/include/scsi/scsi_host.h
> @@ -621,6 +621,7 @@ struct Scsi_Host {
> short unsigned int sg_tablesize;
> short unsigned int sg_prot_tablesize;
> unsigned int max_sectors;
> + unsigned int max_segment_size;
> unsigned long dma_boundary;
> /*
> * In scsi-mq mode, the number of hardware queues supported by the LLD.
Hello Christoph,
The value zero has another meaning for Scsi_Host.max_segment_size than
for queue_limits.max_segment_size. Shouldn't that be documented somewhere?
Thanks,
Bart.
next prev parent reply other threads:[~2016-04-12 15:19 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-12 14:13 fix large I/O regression with iSER in 4.4+ V2 Christoph Hellwig
[not found] ` <1460470405-11673-1-git-send-email-hch-jcswGhMUV9g@public.gmane.org>
2016-04-12 14:13 ` [PATCH 1/2] scsi: add a max_segment_size limitation to struct Scsi_Host Christoph Hellwig
2016-04-12 15:19 ` Bart Van Assche [this message]
2016-04-12 15:37 ` Laurence Oberman
[not found] ` <1460470405-11673-2-git-send-email-hch-jcswGhMUV9g@public.gmane.org>
2016-04-13 9:39 ` Sagi Grimberg
2016-04-12 14:13 ` [PATCH 2/2] IB/iser: set max_segment_size Christoph Hellwig
2016-04-12 15:34 ` Bart Van Assche
2016-04-12 16:51 ` Christoph Hellwig
[not found] ` <20160412165130.GB9568-jcswGhMUV9g@public.gmane.org>
2016-04-12 18:13 ` Bart Van Assche
[not found] ` <570D3AE0.4040104-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-04-12 18:43 ` Christoph Hellwig
[not found] ` <20160412184309.GA3333-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2016-04-13 14:07 ` Christoph Hellwig
2016-04-13 9:39 ` Sagi Grimberg
[not found] ` <1460470405-11673-3-git-send-email-hch-jcswGhMUV9g@public.gmane.org>
2016-04-28 7:40 ` Or Gerlitz
-- strict thread matches above, loose matches on Subject: below --
2016-04-11 22:47 fix large I/O regression with iSER in 4.4+ Christoph Hellwig
[not found] ` <1460414846-29540-1-git-send-email-hch-jcswGhMUV9g@public.gmane.org>
2016-04-11 22:47 ` [PATCH 1/2] scsi: add a max_segment_size limitation to struct Scsi_Host Christoph Hellwig
2016-04-11 23:22 ` Laurence Oberman
2016-04-11 23:32 ` Bart Van Assche
[not found] ` <570C3400.9080503-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-04-11 23:35 ` Christoph Hellwig
2016-04-11 23:44 ` Laurence Oberman
[not found] ` <1317640777.28365032.1460418264272.JavaMail.zimbra-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-04-12 12:23 ` Laurence Oberman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=570D11F8.1080707@sandisk.com \
--to=bart.vanassche@sandisk.com \
--cc=hch@lst.de \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.