summaryrefslogtreecommitdiff
path: root/src/basic/btrfs-util.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-06-15 17:53:50 +0200
committerLennart Poettering <lennart@poettering.net>2015-06-15 18:11:11 +0200
commit90578cbd71812c0f1b6d151c708cb00bbb359053 (patch)
treef66c6c9254ea001a2199776f668f65b98e8931f8 /src/basic/btrfs-util.h
parent0c33502bed83f2775d77c992fe621ec85e75ab2a (diff)
btrfs-util: when snapshotting make sure we don't descent into subvolumes we just created
We already had a safety check in place that we don't end up descending to the original subvolume again, but we also should avoid descending in the newly created one. This is particularly important if we make a snapshot below its source, like we do in "systemd-nspawn --ephemeral -D /". Closes https://bugs.freedesktop.org/show_bug.cgi?id=90803
Diffstat (limited to 'src/basic/btrfs-util.h')
-rw-r--r--src/basic/btrfs-util.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/basic/btrfs-util.h b/src/basic/btrfs-util.h
index a7eb895c93..8632c3638c 100644
--- a/src/basic/btrfs-util.h
+++ b/src/basic/btrfs-util.h
@@ -61,6 +61,7 @@ int btrfs_subvol_snapshot(const char *old_path, const char *new_path, BtrfsSnaps
int btrfs_subvol_set_read_only_fd(int fd, bool b);
int btrfs_subvol_set_read_only(const char *path, bool b);
int btrfs_subvol_get_read_only_fd(int fd);
+int btrfs_subvol_get_id(int fd, const char *subvolume, uint64_t *ret);
int btrfs_subvol_get_id_fd(int fd, uint64_t *ret);
int btrfs_subvol_get_info_fd(int fd, BtrfsSubvolInfo *info);
int btrfs_subvol_get_quota_fd(int fd, BtrfsQuotaInfo *quota);