Re: block discard.

Chris Mason
2008-08-08T14:13:09Z

On Fri, 2008-08-08 at 15:10 +0100, David Woodhouse wrote:
> On Fri, 2008-08-08 at 15:05 +0100, David Woodhouse wrote:
> > On Fri, 2008-08-08 at 09:56 -0400, Chris Mason wrote:
> > > So you mkfs ; dd large file ; rm large file ; look for discards?
> > >
> > > Try rm large file ; sync ; sync; look for discards
> >
> > Yeah, I did that. The actual data extent isn't getting removed.
>
> Oh, you really did mean _two_ syncs. And then yes, I see why it isn't
> working; mea culpa.
>

The first sync commits the transaction and writes out the data. The
second sync does the same thing, but this time it finds the old snapshot
pending deletion and deletes it.

-chris