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: $ sudo ./btrfs subvolume find-new /.snaps/1h-20101102-020001 2808 | head -5 inode 100399 file offset 2093056 len 4096 disk start 58160975872 offset 0 gen 2901 flags NONE var/log/messages inode 100399 file offset 2097152 len 4096 disk start 58161836032 offset 0 gen 2934 flags NONE var/log/messages inode 100400 file offset 40960 len 4096 disk start 58162188288 offset 0 gen 2941 flags NONE var/log/secure inode 100401 file offset 139264 len 4096 disk start 58155618304 offset 0 gen 2883 flags NONE var/log/maillog inode 100401 file offset 143360 len 8192 disk start 58154278912 offset 0 gen 2930 flags NONE var/log/maillog $ Otherwise, the only way I could figure out to do it was to pass a gen id that was hopefully too big to get the transid line: $ sudo ./btrfs subvolume find-new /.snapshots/1h-20101102-010001 \ 999999999999999 transid marker was 2808 $ Unless I''m missing something... Sean
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 it from the other changes). The patch here makes that change and also adds the man page entries for last-gen and find-new (since last-gen refers to it, but there isn''t any documentation for it). Thanks, Sean