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>
This commit is contained in:
@@ -1747,6 +1747,7 @@ static int ocfs2_initialize_super(struct super_block *sb,
|
||||
INIT_LIST_HEAD(&osb->blocked_lock_list);
|
||||
osb->blocked_lock_count = 0;
|
||||
spin_lock_init(&osb->osb_lock);
|
||||
spin_lock_init(&osb->osb_xattr_lock);
|
||||
ocfs2_init_inode_steal_slot(osb);
|
||||
|
||||
atomic_set(&osb->alloc_stats.moves, 0);
|
||||
|
Reference in New Issue
Block a user