From 90578cbd71812c0f1b6d151c708cb00bbb359053 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 15 Jun 2015 17:53:50 +0200 Subject: 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 --- src/basic/btrfs-util.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/basic/btrfs-util.h') 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); -- cgit v1.2.3-54-g00ecf