All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Christoph Hellwig <hch@infradead.org>
Cc: Jan Kara <jack@suse.com>,
	axboe@kernel.dk, LKML <linux-kernel@vger.kernel.org>,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] block: Don't allow illegal discard requests
Date: Wed, 4 Nov 2015 15:17:15 +0100	[thread overview]
Message-ID: <20151104141715.GB10124@quack.suse.cz> (raw)
In-Reply-To: <20151104113019.GA24128@infradead.org>

On Wed 04-11-15 03:30:19, Christoph Hellwig wrote:
> On Wed, Nov 04, 2015 at 10:18:41AM +0100, Jan Kara wrote:
> > Currently blkdev_issue_discard() doesn't check that submitted discard
> > request matches granularity required by the underlying device.
> > Submitting such requests to the device can have unexpected consequences
> > (e.g. brd driver just discards more / less data depending on how exactly
> > the request is aligned). So test that submitted discard request has the
> > granularity required by the driver.
> 
> How is this going to work with stacked drivers?  I think brd needs to
> be fixed to take care of the granularity itself, just like we did for
> request based drivers.

So you mean that a stacked driver would split a discard request so that it
is no longer of the required granularity? OK, makes sense. I'll add the
check directly into brd itself.

								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

      reply	other threads:[~2015-11-04 14:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-04  9:18 [PATCH] block: Don't allow illegal discard requests Jan Kara
2015-11-04 10:46 ` kbuild test robot
2015-11-04 10:48 ` kbuild test robot
2015-11-04 10:53 ` kbuild test robot
2015-11-04 11:30 ` Christoph Hellwig
2015-11-04 14:17   ` Jan Kara [this message]

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=20151104141715.GB10124@quack.suse.cz \
    --to=jack@suse.cz \
    --cc=axboe@kernel.dk \
    --cc=hch@infradead.org \
    --cc=jack@suse.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --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 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.