diff options
author | Miao Xie <miaox@cn.fujitsu.com> | 2014-03-06 13:55:02 +0800 |
---|---|---|
committer | Josef Bacik <jbacik@fb.com> | 2014-03-10 15:17:28 -0400 |
commit | 31f3d255c677073f83daa1e0671bbf2157bf8edc (patch) | |
tree | 5a832934a4a886a7f62a21a4cfb1c678e3fab134 /fs/btrfs/disk-io.c | |
parent | 6c255e67cec1c38a0569c7f823eba63f9449ccf8 (diff) | |
download | lwn-31f3d255c677073f83daa1e0671bbf2157bf8edc.tar.gz lwn-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/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 7d09ca48c347..237b5b5a2200 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -1220,6 +1220,7 @@ static void __setup_root(u32 nodesize, u32 leafsize, u32 sectorsize, spin_lock_init(&root->log_extents_lock[1]); mutex_init(&root->objectid_mutex); mutex_init(&root->log_mutex); + mutex_init(&root->ordered_extent_mutex); init_waitqueue_head(&root->log_writer_wait); init_waitqueue_head(&root->log_commit_wait[0]); init_waitqueue_head(&root->log_commit_wait[1]); |