From: David Brown <btrfs@davidb.org>
To: linux-btrfs@vger.kernel.org
Subject: Odd behavior of subvolume find-new
Date: Mon, 9 Jan 2012 08:08:00 -0800 [thread overview]
Message-ID: <20120109160759.GA973@davidb.org> (raw)
I've been creating some time-based snapshots, e.g.
# btrfs subvolume snapshot @root 2012-01-09-@root
After some changes, I wanted to see what had changed, so I tried:
# btrfs subvolume find-new @root 2012-01-09-@root
transid marker was 37
which doesn't print anything out. Curiously, if I make a snapshot of
the snapshot, then I get output from the delta:
# btrfs subvolume snapshot 2012-01-09-@root tmp
# btrfs subvolume find-new @root tmp
..... lots of output .....
I haven't seen this behavior on other filesystems or subvolumes.
My intent was to filter through the small script below to compute the
size of the delta.
Thanks,
David
#! /usr/bin/perl
# Process the output of btrfs subvolume find-new and print out the
# size used by the new data. Doesn't show delta in metadata, only the
# data itself.
use strict;
my $bytes = 0;
while (<>) {
if (/ len (\d+) /) {
$bytes += $1;
}
}
printf "%d bytes\n", $bytes;
printf "%.1f MByte\n", $bytes / 1024.0 / 1024.0;
printf "%.1f GByte\n", $bytes / 1024.0 / 1024.0 / 1024.0;
reply other threads:[~2012-01-09 16:08 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=20120109160759.GA973@davidb.org \
--to=btrfs@davidb.org \
--cc=linux-btrfs@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.