mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Jinpu Wang <jinpu.wang@profitbricks.com>
Cc: Jens Axboe <axboe@fb.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCHv2]brd: set max_discard_sectors properly
Date: Fri, 15 Apr 2016 18:50:21 -0700	[thread overview]
Message-ID: <20160416015021.GA3694@infradead.org> (raw)
In-Reply-To: <CAMGffEmzO9nxs6cgcVYyKr-c1gW4oeQqVkn0oj1J5GiEWPy2PA@mail.gmail.com>

> -	blk_queue_max_discard_sectors(brd->brd_queue, UINT_MAX);
> +	blk_queue_max_discard_sectors(brd->brd_queue, UINT_MAX >> 9);

Shouldn't we fix the issue by capping to UINT_MAX >> 9 inside
blk_queue_max_discard_sectors?  That way we'll prevent against having
issues like this in any other driver as well.

  reply	other threads:[~2016-04-16  1:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-15 14:24 Jinpu Wang
2016-04-16  1:50 ` Christoph Hellwig [this message]
2016-04-18  8:34   ` Jinpu Wang
2016-04-18 13:55     ` Jinpu Wang

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=20160416015021.GA3694@infradead.org \
    --to=hch@infradead.org \
    --cc=axboe@fb.com \
    --cc=jinpu.wang@profitbricks.com \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®