diff options
author | Tao Ma <tao.ma@oracle.com> | 2009-02-24 20:40:26 -0500 |
---|---|---|
committer | Mark Fasheh <mfasheh@suse.com> | 2009-02-26 14:51:11 -0500 |
commit | c8b9cf9a7cd25ba65166116d0a958f0bc709f0a7 (patch) | |
tree | 81ab9d6d0be93e57bcb17130abed3516574b3752 /fs/ocfs2/super.c | |
parent | 89a907afe073b8971a83d0ad54f391542b64d327 (diff) |
ocfs2: lock the metaecc process for xattr bucket
For other metadata in ocfs2, metaecc is checked in ocfs2_read_blocks
with io_mutex held. While for xattr bucket, it is calculated by
the whole buckets. So we have to add a spin_lock to prevent multiple
processes calculating metaecc.
Signed-off-by: Tao Ma <tao.ma@oracle.com>
Tested-by: Tristan Ye <tristan.ye@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2/super.c')
-rw-r--r-- | fs/ocfs2/super.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index b1cb38fbe807..1c3acc4654d8 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c | |||
@@ -1747,6 +1747,7 @@ static int ocfs2_initialize_super(struct super_block *sb, | |||
1747 | INIT_LIST_HEAD(&osb->blocked_lock_list); | 1747 | INIT_LIST_HEAD(&osb->blocked_lock_list); |
1748 | osb->blocked_lock_count = 0; | 1748 | osb->blocked_lock_count = 0; |
1749 | spin_lock_init(&osb->osb_lock); | 1749 | spin_lock_init(&osb->osb_lock); |
1750 | spin_lock_init(&osb->osb_xattr_lock); | ||
1750 | ocfs2_init_inode_steal_slot(osb); | 1751 | ocfs2_init_inode_steal_slot(osb); |
1751 | 1752 | ||
1752 | atomic_set(&osb->alloc_stats.moves, 0); | 1753 | atomic_set(&osb->alloc_stats.moves, 0); |