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;
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs"
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html