From: "Goffredo Baroncelli <kreijack@libero.it>" <kreijack@libero.it>
To: <sean@support.tummy.com>
Cc: linux-btrfs@vger.kernel.org
Subject: R: Patch to provide "btrfs subvolume last-gen".
Date: Wed, 3 Nov 2010 11:27:58 +0100 (CET) [thread overview]
Message-ID: <29406019.291621288780078238.JavaMail.defaultUser@defaultHost> (raw)
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 subvolume find-new /snaps \
$( sudo ./btrfs subvolume last-gen -q /snaps ) | \
head -5
Please, update the man page (man/btrfs.8.in) too.
Regards
G.Baroncelli
>----Messaggio originale----
>Da: sean@support.tummy.com
>Data: 03/11/2010 10.23
>A: <linux-btrfs@vger.kernel.org>
>Ogg: Patch to provide "btrfs subvolume last-gen".
>
>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
>
reply other threads:[~2010-11-03 10:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=29406019.291621288780078238.JavaMail.defaultUser@defaultHost \
--to=kreijack@libero.it \
--cc=linux-btrfs@vger.kernel.org \
--cc=sean@support.tummy.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).