2009-01-14 10:53:54

by Tarkan Erimer

[permalink] [raw]
Subject: Btrfs Snapshot Removal And General Project Status

Hi Chris,

For the last few days, I was playing with btrfs. It looks really very
promising and fantastic! :-)
Thanks for everybody who involved with this amazing file system project!
;-) Now, I play with snapshots. Creating snapshot is a breeze.
Recovering from snapshots work very well without any problems as far as
I tried. But; when I tried to remove the snapshot directories, I got an
error message that says : "cannot remove directory `snap1': Directory
not empty". But actually, it is empty. After that, I googled a bit and
found at "http://btrfs.wiki.kernel.org/index.php/Project_ideas" at
"Removal Snapshots" section, it states that it needs to be implement.
But, it's unclear which state this feature is now.

It could be perfect to prepare a document that shows the current status
(completed, blah-blah % completed etc.) of the features,general status
of the project and maybe deadlines of feature implementions. Like :
"next release will have blah-blah features" etc.


BTW, is there any temporary way to remove these snapshot directories
before this "Remove Snapshot" feature implemented ? ;-)

Tarkan ERIMER


2009-01-16 15:17:19

by Chris Mason

[permalink] [raw]
Subject: Re: Btrfs Snapshot Removal And General Project Status

On Wed, 2009-01-14 at 12:43 +0200, Tarkan Erimer wrote:
> Hi Chris,
>

Sorry for the delay, I missed this one somehow.

> For the last few days, I was playing with btrfs. It looks really very
> promising and fantastic! :-)

Glad to hear it worked.

> Thanks for everybody who involved with this amazing file system project!
> ;-) Now, I play with snapshots. Creating snapshot is a breeze.
> Recovering from snapshots work very well without any problems as far as
> I tried. But; when I tried to remove the snapshot directories, I got an
> error message that says : "cannot remove directory `snap1': Directory
> not empty". But actually, it is empty. After that, I googled a bit and
> found at "http://btrfs.wiki.kernel.org/index.php/Project_ideas" at
> "Removal Snapshots" section, it states that it needs to be implement.
> But, it's unclear which state this feature is now.
>

That's right. You did rm -rf dir, which is actually the slowest
possible way to remove the snapshot ;) A much more optimized version is
possible, and already implemented as part of transaction commit.

But, the fast version is basically the same as unlinking a directory
that may or may not be in use. We need to implement code to do that
properly wrt the VFS.

> It could be perfect to prepare a document that shows the current status
> (completed, blah-blah % completed etc.) of the features,general status
> of the project and maybe deadlines of feature implementions. Like :
> "next release will have blah-blah features" etc.
>

A very good point, I'm in the process of documenting this better.

>
> BTW, is there any temporary way to remove these snapshot directories
> before this "Remove Snapshot" feature implemented ? ;-)
>

Unfortunately not, sorry.

-chris

2009-01-16 16:19:25

by Tarkan Erimer

[permalink] [raw]
Subject: Re: Btrfs Snapshot Removal And General Project Status

Chris Mason wrote:
> Sorry for the delay, I missed this one somehow.
Oh,it's really no problem. ;-) All we know that you're too busy
nowadays, cause of btrfs' mainline inclusion. :-)
> That's right. You did rm -rf dir, which is actually the slowest
> possible way to remove the snapshot ;) A much more optimized version is
> possible, and already implemented as part of transaction commit.
>
>
Thanks for pointing ;-)

> A very good point, I'm in the process of documenting this better.
>
>
Good luck! :-)


Tarkan ERIMER