diff options
author | Josef Bacik <josef@redhat.com> | 2012-01-13 12:09:22 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2012-01-16 15:29:43 -0500 |
commit | f248679e86fead40cc78e724c7181d6bec1a2046 (patch) | |
tree | 88abeee0b2a87c0f0377509525c92d3c9ec15a15 /fs/btrfs/btrfs_inode.h | |
parent | 8c2a3ca20f6233677ac3222c6506174010eb414f (diff) |
Btrfs: add a delalloc mutex to inodes for delalloc reservations
I was using i_mutex for this, but we're getting bogus lockdep warnings by doing
that and theres no real way to get rid of those, so just stop using i_mutex to
protect delalloc metadata reservations and use a delalloc mutex instead. This
shouldn't be contended often at all, only if you are writing and mmap writing to
the file at the same time. Thanks,
Signed-off-by: Josef Bacik <josef@redhat.com>
Diffstat (limited to 'fs/btrfs/btrfs_inode.h')
-rw-r--r-- | fs/btrfs/btrfs_inode.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h index 634608d2a6d..9b9b15fd520 100644 --- a/fs/btrfs/btrfs_inode.h +++ b/fs/btrfs/btrfs_inode.h | |||
@@ -51,6 +51,9 @@ struct btrfs_inode { | |||
51 | /* held while logging the inode in tree-log.c */ | 51 | /* held while logging the inode in tree-log.c */ |
52 | struct mutex log_mutex; | 52 | struct mutex log_mutex; |
53 | 53 | ||
54 | /* held while doing delalloc reservations */ | ||
55 | struct mutex delalloc_mutex; | ||
56 | |||
54 | /* used to order data wrt metadata */ | 57 | /* used to order data wrt metadata */ |
55 | struct btrfs_ordered_inode_tree ordered_tree; | 58 | struct btrfs_ordered_inode_tree ordered_tree; |
56 | 59 | ||