From: Christoph Hellwig <hch@lst.de>
To: axboe@kernel.dk
Cc: linux@roeck-us.net, James.Bottomley@HansenPartnership.com,
linux-block@vger.kernel.org
Subject: Re: [PATCH] block: fix max segment size handling in blk_queue_virt_boundary
Date: Fri, 26 Jul 2019 09:35:18 +0200 [thread overview]
Message-ID: <20190726073518.GA23993@lst.de> (raw)
In-Reply-To: <20190724162656.3967-1-hch@lst.de>
Jens, can you take a look? This fixes a boot regression hitting
various people.
On Wed, Jul 24, 2019 at 06:26:56PM +0200, Christoph Hellwig wrote:
> We should only set the max segment size to unlimited if we actually
> have a virt boundary. Otherwise we accidentally clear that limit
> when called from the SCSI midlayer, which always calls
> blk_queue_virt_boundary, even if that mask is 0.
>
> Fixes: 7ad388d8e4c7 ("scsi: core: add a host / host template field for the virt boundary")
> Reported-by: Guenter Roeck <linux@roeck-us.net>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> block/blk-settings.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/block/blk-settings.c b/block/blk-settings.c
> index 2ae348c101a0..2c1831207a8f 100644
> --- a/block/blk-settings.c
> +++ b/block/blk-settings.c
> @@ -752,7 +752,8 @@ void blk_queue_virt_boundary(struct request_queue *q, unsigned long mask)
> * page (which might not be idential to the Linux PAGE_SIZE). Because
> * of that they are not limited by our notion of "segment size".
> */
> - q->limits.max_segment_size = UINT_MAX;
> + if (mask)
> + q->limits.max_segment_size = UINT_MAX;
> }
> EXPORT_SYMBOL(blk_queue_virt_boundary);
>
> --
> 2.20.1
---end quoted text---
next prev parent reply other threads:[~2019-07-26 7:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-24 16:26 [PATCH] block: fix max segment size handling in blk_queue_virt_boundary Christoph Hellwig
2019-07-25 0:31 ` Bob Liu
2019-07-26 7:35 ` Christoph Hellwig [this message]
2019-07-26 18:52 ` Jens Axboe
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=20190726073518.GA23993@lst.de \
--to=hch@lst.de \
--cc=James.Bottomley@HansenPartnership.com \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=linux@roeck-us.net \
/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).