[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [dm-devel] Discard support for dm-snap



On Thu, Sep 02 2010 at  4:05am -0400,
Hannes Reinecke <hare suse de> wrote:

> Hi all,
> 
> now that we've got discard support in the block layer, are there plans
> to update dm-snap to actually implement discard?
> Looks like a valid addendum here; we could be freeing up unused blocks
> thus freeing up space.
> Especially helpful when using dm-snap to create a sparse device;
> cf
> http://www.mjmwired.net/kernel/Documentation/device-mapper/zero.txt
> 
> Thoughts?

>From https://www.redhat.com/archives/dm-devel/2010-July/msg00149.html

"The snapshot and crypt targets will not have discard support.

Snapshots must preserve any data that is deleted so the value of
discard is negligible.  Discard support for the origin target may be
considered in the future (could be especially useful if origin and COW
are different devices and origin is a thinly provisioned LUN)."

The snapshot target must always preserve changes (in the form of
exceptions in the COW store).  Even though you'd be removing files
through the snapshot device as far as the snapshot is concerned it must
track that change (relative to the origin).  Simply put: the current
snapshot store format doesn't easily allow for what you're asking for.

The new shared snapshot target that is in development may provide an
opportunity for adding more intelligence to account for this use-case.

Mikulas and/or Joe may have more insight here.

Mike


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]