Btrfs-progs: add function to map subvol ID to path
authorStefan Behrens <sbehrens@giantdisaster.de>
Tue, 23 Apr 2013 10:18:55 +0000 (12:18 +0200)
committerDavid Sterba <dsterba@suse.cz>
Tue, 23 Apr 2013 17:16:25 +0000 (19:16 +0200)
commit6d26357f8e7d73d802e8025407fe17542a18164b
treeabef033343ba9e957b2264dad8d3046310c07c9b
parent6b76570652e2f5a1f776848f330ca01e418a186c
Btrfs-progs: add function to map subvol ID to path

Several tools like btrfs-send and btrfs-receive need to map a
subvolume ID to a filesystem path. The so far existing methods
in btrfs-list.c cause a horrible effort when performing this
operation (and the effort is dependent on the number of
existing subvolumes with quadratic effort). This commit adds a
function that is able to map a subvolume ID to a filesystem path
with an effort that is independent of the number of existing
subvolumes.

In addition to this function, a command line frontend is added as well:
btrfs inspect-internal subvolid-resolve <subvolid> <path>

Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
cmds-inspect.c
man/btrfs.8.in
send-utils.c
send-utils.h