diff options
author | Stefan Behrens <sbehrens@giantdisaster.de> | 2013-04-23 12:18:55 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2013-04-23 19:16:25 +0200 |
commit | 6d26357f8e7d73d802e8025407fe17542a18164b (patch) | |
tree | abef033343ba9e957b2264dad8d3046310c07c9b /send-utils.h | |
parent | 6b76570652e2f5a1f776848f330ca01e418a186c (diff) |
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>
Diffstat (limited to 'send-utils.h')
-rw-r--r-- | send-utils.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/send-utils.h b/send-utils.h index 78abf944..06af75f3 100644 --- a/send-utils.h +++ b/send-utils.h @@ -70,7 +70,7 @@ struct subvol_info *subvol_uuid_search(struct subvol_uuid_search *s, void subvol_uuid_search_add(struct subvol_uuid_search *s, struct subvol_info *si); - +int btrfs_subvolid_resolve(int fd, char *path, size_t path_len, u64 subvol_id); char *path_cat(const char *p1, const char *p2); char *path_cat3(const char *p1, const char *p2, const char *p3); |