summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorStefan Behrens2013-08-15 17:11:21 +0200
committerChris Mason2013-09-01 14:15:56 +0200
commit803b2f54fb4faf6d76fca43e59bcc555d9713cd4 (patch)
treef5e5c56d186aa1829aaedb652756ec8f4644e05b /fs/btrfs/ctree.h
parentBtrfs: maintain subvolume items in the UUID tree (diff)
downloadkernel-qcow2-linux-803b2f54fb4faf6d76fca43e59bcc555d9713cd4.tar.gz
kernel-qcow2-linux-803b2f54fb4faf6d76fca43e59bcc555d9713cd4.tar.xz
kernel-qcow2-linux-803b2f54fb4faf6d76fca43e59bcc555d9713cd4.zip
Btrfs: fill UUID tree initially
When the UUID tree is initially created, a task is spawned that walks through the root tree. For each found subvolume root_item, the uuid and received_uuid entries in the UUID tree are added. This is such a quick operation so that in case somebody wants to unmount the filesystem while the task is still running, the unmount is delayed until the UUID tree building task is finished. Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de> Signed-off-by: Josef Bacik <jbacik@fusionio.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index bdc8498d6f03..df2b9c22b4cf 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -23,6 +23,7 @@
#include <linux/highmem.h>
#include <linux/fs.h>
#include <linux/rwsem.h>
+#include <linux/semaphore.h>
#include <linux/completion.h>
#include <linux/backing-dev.h>
#include <linux/wait.h>
@@ -1654,6 +1655,8 @@ struct btrfs_fs_info {
struct btrfs_dev_replace dev_replace;
atomic_t mutually_exclusive_operation_running;
+
+ struct semaphore uuid_tree_rescan_sem;
};
/*