Re: Aggregating discard requests in the filesystem

Brad Boyer
2008-11-11T00:12:36Z

On Mon, Nov 10, 2008 at 01:39:15PM -0700, Matthew Wilcox wrote:
> 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?

I suspect how hard it is depends somewhat on exactly what you mean by
"all the adjacent free space" and what is expected of the file system.
My concern would particularly be around cluster file systems, which may
not have perfect local knowledge of exactly what is happening. My guess
is that it would be easy to know about some given range within some
larger aggregation of blocks, but not always across the entire device.

The other question is how this translates through software raid or
other non-simple block layers.

Brad Boyer
flar@allandria.com