lkml.org 
[lkml]   [2015]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] block: Don't allow illegal discard requests
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


\
 
 \ /
  Last update: 2015-11-04 15:41    [W:0.054 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site