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/ocfs2.h | |
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/ocfs2.h')
-rw-r--r-- | fs/ocfs2/ocfs2.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ocfs2/ocfs2.h b/fs/ocfs2/ocfs2.h index 077384135f4e..946d3c34b90b 100644 --- a/fs/ocfs2/ocfs2.h +++ b/fs/ocfs2/ocfs2.h | |||
@@ -341,6 +341,9 @@ struct ocfs2_super | |||
341 | struct ocfs2_node_map osb_recovering_orphan_dirs; | 341 | struct ocfs2_node_map osb_recovering_orphan_dirs; |
342 | unsigned int *osb_orphan_wipes; | 342 | unsigned int *osb_orphan_wipes; |
343 | wait_queue_head_t osb_wipe_event; | 343 | wait_queue_head_t osb_wipe_event; |
344 | |||
345 | /* used to protect metaecc calculation check of xattr. */ | ||
346 | spinlock_t osb_xattr_lock; | ||
344 | }; | 347 | }; |
345 | 348 | ||
346 | #define OCFS2_SB(sb) ((struct ocfs2_super *)(sb)->s_fs_info) | 349 | #define OCFS2_SB(sb) ((struct ocfs2_super *)(sb)->s_fs_info) |