Btrfs: split the global ordered extents mutex
authorMiao Xie <miaox@cn.fujitsu.com>
Thu, 6 Mar 2014 05:55:02 +0000 (13:55 +0800)
committerJosef Bacik <jbacik@fb.com>
Mon, 10 Mar 2014 19:17:28 +0000 (15:17 -0400)
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>
fs/btrfs/ctree.h
fs/btrfs/disk-io.c
fs/btrfs/ordered-data.c

Simple merge
Simple merge
Simple merge