From: Adam Borowski <kilobyte@angband.pl>
To: Graham Cobb <g.btrfs@cobb.uk.net>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: Extents for a particular subvolume
Date: Wed, 3 Aug 2016 22:37:08 +0200 [thread overview]
Message-ID: <20160803203708.GA26505@angband.pl> (raw)
In-Reply-To: <57A24C51.2050302@cobb.uk.net>
On Wed, Aug 03, 2016 at 08:56:01PM +0100, Graham Cobb wrote:
> Are there any btrfs commands (or APIs) to allow a script to create a
> list of all the extents referred to within a particular (mounted)
> subvolume? And is it a reasonably efficient process (i.e. doesn't
> involve backrefs and, preferably, doesn't involve following directory
> trees)?
Since the size of your output is linear to the number of extents which is
between the number of files and sum of their sizes, I see no gain in
trying to avoid following the directory tree.
And that can be done with FIEMAP on any filesystem, not just btrfs.
> I am not looking to relate the extents to files/inodes/paths. My
> particular need, at the moment, is to work out how much of two snapshots
> is shared data, but I can think of other uses for the information.
Thus, unlike the question you asked above, you're not interested in _all_
extents, merely those which changed.
You may want to look at "btrfs subv find-new" and "btrfs send --no-data".
Meow!
--
An imaginary friend squared is a real enemy.
next prev parent reply other threads:[~2016-08-03 20:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-03 19:56 Extents for a particular subvolume Graham Cobb
2016-08-03 20:37 ` Adam Borowski [this message]
2016-08-03 21:55 ` Graham Cobb
2016-08-04 11:34 ` Austin S. Hemmelgarn
2016-08-15 19:18 ` Graham Cobb
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=20160803203708.GA26505@angband.pl \
--to=kilobyte@angband.pl \
--cc=g.btrfs@cobb.uk.net \
--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.