summaryrefslogtreecommitdiff
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-06-25 16:01:30 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:03 -0400
commit5cd57b2cbbb06a350df2698314e4e6a80805fc2f (patch)
treecd20c904dd016ab031af582dadfbd6e04bf4df9e /fs/btrfs/ctree.h
parent168fd7d271d9d8e81ff0b03eb08c36d82670c8a9 (diff)
downloadlwn-5cd57b2cbbb06a350df2698314e4e6a80805fc2f.tar.gz
lwn-5cd57b2cbbb06a350df2698314e4e6a80805fc2f.zip
Btrfs: Add a skip_locking parameter to struct path, and make various funcs honor it
Allocations may need to read in block groups from the extent allocation tree, which will require a tree search and take locks on the extent allocation tree. But, those locks might already be held in other places, leading to deadlocks. Since the alloc_mutex serializes everything right now, it is safe to skip the btree locking while caching block groups. A better fix will be to either create a recursive lock or find a way to back off existing locks while caching block groups. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 9ea12d42741c..e9bbb53eda63 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -335,6 +335,7 @@ struct btrfs_path {
int reada;
/* keep some upper locks as we walk down */
int keep_locks;
+ int skip_locking;
int lowest_level;
};