Re: Aggregating discard requests in the filesystem

Chris Mason
2008-11-10T20:44:23Z

On Mon, 2008-11-10 at 13:39 -0700, Matthew Wilcox wrote:
> On Thu, Nov 06, 2008 at 09:43:23AM -0500, Ric Wheeler wrote:
> > I have been thinking about whether or not we can (and should) do
> > anything more than our current best effort to send down large chunks
> > (note that the "chunk" size can range from reasonable sizes like 8KB or
> > so up to close to 1MB!).
>
> One of the proposals in this thread (that has got buried somewhere) was
> to expand any discard request sent down from the filesystem to encompass
> all the adjacent free space. I've checked with our SSD people and
> they're fine with this idea.
>
> dwmw2 says "it isn't actually that hard in FAT" and then interjects some
> personal opinion about this solution ;-)
>
> Is it hard in XFS? btrfs? ext2? Does anyone have a problem with this
> as a solution?
>

Btrfs needs some extra checking to make sure the extents really are free
(and won't magically reappear after a crash), but it is at least
possible.

-chris