summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorMiao Xie2014-03-06 06:55:02 +0100
committerJosef Bacik2014-03-10 20:17:28 +0100
commit31f3d255c677073f83daa1e0671bbf2157bf8edc (patch)
tree5a832934a4a886a7f62a21a4cfb1c678e3fab134 /fs/btrfs/ctree.h
parentBtrfs: don't flush all delalloc inodes when we doesn't get s_umount lock (diff)
downloadkernel-qcow2-linux-31f3d255c677073f83daa1e0671bbf2157bf8edc.tar.gz
kernel-qcow2-linux-31f3d255c677073f83daa1e0671bbf2157bf8edc.tar.xz
kernel-qcow2-linux-31f3d255c677073f83daa1e0671bbf2157bf8edc.zip
Btrfs: split the global ordered extents mutex
When we create a snapshot, we just need wait the ordered extents in the source fs/file root, but because we use the global mutex to protect this ordered extents list of the source fs/file root to avoid accessing a empty list, if someone got the mutex to access the ordered extents list of the other fs/file root, we had to wait. This patch splits the above global mutex, now every fs/file root has its own mutex to protect its own list. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Josef Bacik <jbacik@fb.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 5a800986f416..5f4921554f0a 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -1814,6 +1814,8 @@ struct btrfs_root {
struct list_head delalloc_inodes;
struct list_head delalloc_root;
u64 nr_delalloc_inodes;
+
+ struct mutex ordered_extent_mutex;
/*
* this is used by the balancing code to wait for all the pending
* ordered extents