Re: [PATCH v2] btrfs-progs: btrfs: implement 'start-sync' and 'wait-sync' commands

2010-11-03 Thread Goffredo Baroncelli
On Tuesday, 02 November, 2010, you (Sage Weil) wrote: On Tue, 2 Nov 2010, Goffredo Baroncelli wrote: Like the command btrfs subvol snapshot, I think that it is better to add a modifier instead of a new command. btrfs filesystem sync [--async] Sorry if I noticed this too late. But

Patch to provide btrfs subvolume last-gen.

2010-11-03 Thread Sean Reifschneider
Here is a patch to btrfs-progs to provide the command subvolume last-gen: $ sudo ./btrfs subvolume last-gen /.snaps/1h-20101102-010001 transid marker was 2808 $ sudo ./btrfs subvolume last-gen /.snaps/1h-20101102-020001/ transid marker was 2942 $ So we can do something like: $

R: Patch to provide btrfs subvolume last-gen.

2010-11-03 Thread Goffredo Baroncelli kreij...@libero.it
Hello, I suggest to add a -q switch, in order to print only the transaction ID. So it easy to reuse the command in a script. Something like: $ sudo ./btrfs subvolume last-gen /snap transid marker was 2808 $ sudo ./btrfs subvolume last-gen -q /snaps 2808 $ sudo ./btrfs

Re: Patch to provide btrfs subvolume last-gen.

2010-11-03 Thread Sean Reifschneider
Thanks for the feedback Goffredo. I've given it some thought and in the spirit of small programs cooperating, it seems like just having it write out the generation id without the surrounding text makes sense. The text I pulled from the find-new sub-command, where it makes sense (to differentiate

Re: [PATCH v2] btrfs-progs: btrfs: implement 'start-sync' and 'wait-sync' commands

2010-11-03 Thread Hugo Mills
On Tue, Nov 02, 2010 at 07:58:27PM +0100, Goffredo Baroncelli wrote: On Monday, 01 November, 2010, Sage Weil wrote: The 'start-sync' command initiates a sync, but does not wait for it to complete. A transaction is printed that can be fed to 'wait-sync', which will wait for it to commit.