linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laurence Oberman <loberman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
Cc: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 1/2] scsi: add a max_segment_size limitation to struct Scsi_Host
Date: Mon, 11 Apr 2016 19:44:24 -0400 (EDT)	[thread overview]
Message-ID: <1317640777.28365032.1460418264272.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <570C3400.9080503-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>

Thanks Bart
Good catch, I completely missed it.

Laurence Oberman
Principal Software Maintenance Engineer
Red Hat Global Support Services

----- Original Message -----
From: "Bart Van Assche" <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
To: "Christoph Hellwig" <hch-jcswGhMUV9g@public.gmane.org>, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Sent: Monday, April 11, 2016 7:32:16 PM
Subject: Re: [PATCH 1/2] scsi: add a max_segment_size limitation to struct Scsi_Host

On 04/11/2016 03:47 PM, Christoph Hellwig wrote:
> diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
> index 8106515..04c660d 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(shost->max_segment_size, dma_get_max_seg_size(dev)));
>
>   	if (!shost->use_clustering)
>   		q->limits.cluster = 0;

Hello Christoph,

Since Scsi_Host.max_segment_size is initialized to zero, shouldn't min() 
be changed into min_not_zero()?

Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2016-04-11 23:44 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
     [not found]           ` <1317640777.28365032.1460418264272.JavaMail.zimbra-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-04-12 12:23             ` Laurence Oberman
2016-04-11 22:47 ` [PATCH 2/2] IB/iser: set max_segment_size Christoph Hellwig
2016-04-12 10:48   ` Sagi Grimberg
     [not found]     ` <570CD26E.70502-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
2016-04-12 14:27       ` James Bottomley
     [not found]         ` <1460471256.2338.5.camel-d9PhHud1JfjCXq6kfMZ53/egYHeGw8Jk@public.gmane.org>
2016-04-12 15:27           ` Christoph Hellwig
2016-04-13  8:01           ` Sagi Grimberg
  -- strict thread matches above, loose matches on Subject: below --
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
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

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=1317640777.28365032.1460418264272.JavaMail.zimbra@redhat.com \
    --to=loberman-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org \
    --cc=hch-jcswGhMUV9g@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).