summaryrefslogtreecommitdiff
path: root/src/basic/btrfs-util.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-11-16 15:25:42 +0100
committerLennart Poettering <lennart@poettering.net>2015-11-16 15:25:42 +0100
commit2904e949f23aeb17b7e21a2a0f8c43f959a07f98 (patch)
tree741b948bb870113c5bdd21783cc3948555b609d7 /src/basic/btrfs-util.h
parentab32771aa0c2c2ab70248e7e0a4be92fd73512ad (diff)
tmpfiles: create subvolumes for "v", "q", and "Q" only if / is a subvolume
It's not a good idea to create subvolumes for parts of the OS tree (such as /home, or /var) if the root directory is not a subvolume too. We shouldn't assume control of "heavier" objects such as subvolumes, if the originating object (the root directory) is a "light-weight" object, i.e. a plain directory. Effectively this means that chroot() environments that are run on a plain directory do not have to deal with problems around systemd creating subvolumes that cannot be removed with a simple "rm" anymore. However, if the chroot manager creates a proper subvolume for such an environment it will also get further subvolumes placed in there, under the assumption that the manager understands the concept of subvolumes in that case.
Diffstat (limited to 'src/basic/btrfs-util.h')
-rw-r--r--src/basic/btrfs-util.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/basic/btrfs-util.h b/src/basic/btrfs-util.h
index fc9efd72d5..8c11ce35d2 100644
--- a/src/basic/btrfs-util.h
+++ b/src/basic/btrfs-util.h
@@ -56,7 +56,9 @@ typedef enum BtrfsRemoveFlags {
} BtrfsRemoveFlags;
int btrfs_is_filesystem(int fd);
-int btrfs_is_subvol(int fd);
+
+int btrfs_is_subvol_fd(int fd);
+int btrfs_is_subvol(const char *path);
int btrfs_reflink(int infd, int outfd);
int btrfs_clone_range(int infd, uint64_t in_offset, int ofd, uint64_t out_offset, uint64_t sz);