lkml.org 
[lkml]   [2014]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] block: Force sector and nr_sects to device alignment and granularity.
From
Date
On Tue, 2014-03-11 at 11:15 -0400, Jeff Moyer wrote:
> Frank Mayhar <fmayhar@google.com> writes:
>
> > block: Force sector and nr_sects to device alignment and granularity.
> >
> > In blkdev_issue_discard(), rather than sending an improperly-
> > aligned discard to the device (where it may get an error),
> > adjust the start and length to the block device alignment and
> > granularity. Don't fail if this leaves nothing to discard.
> >
> > Without this change, certain flash drivers can report invalid
> > trim parameters (and will fail the command). Per tytso, "given
> > that discards are advisory, any part of the storage stack is
> > free to drop discard requests silently."
>
> And how do you get here with misaligned discards?

I don't understand the question.

The case that we were seeing was with an SSD that required TRIM on 8k
boundaries and with an 8k granularity. Since the file system was trying
to do discards based on 4k alignment the driver complained mightily.
--
Frank Mayhar
310-460-4042



\
 
 \ /
  Last update: 2014-03-11 18:02    [W:0.086 / U:0.816 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site