aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/inode.c
diff options
context:
space:
mode:
authorMark Fasheh <mark.fasheh@oracle.com>2007-10-18 18:23:46 -0400
committerMark Fasheh <mark.fasheh@oracle.com>2008-01-25 17:45:57 -0500
commitc934a92d05b549dd2f25db72c5fc3cb9dcf1b611 (patch)
tree57150c87d1d465db28fceaa14c9d5b220c7a3954 /fs/ocfs2/inode.c
parentf1f540688eae66c274ff1c1133b5d9c687b28f58 (diff)
ocfs2: Remove data locks
The meta lock now covers both meta data and data, so this just removes the now-redundant data lock. Combining locks saves us a round of lock mastery per inode and one less lock to ping between nodes during read/write. We don't lose much - since meta locks were always held before a data lock (and at the same level) ordered writeout mode (the default) ensured that flushing for the meta data lock also pushed out data anyways. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2/inode.c')
-rw-r--r--fs/ocfs2/inode.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c
index 86cf073996b5..8ff201d3705e 100644
--- a/fs/ocfs2/inode.c
+++ b/fs/ocfs2/inode.c
@@ -332,10 +332,6 @@ int ocfs2_populate_inode(struct inode *inode, struct ocfs2_dinode *fe,
332 OCFS2_LOCK_TYPE_RW, inode->i_generation, 332 OCFS2_LOCK_TYPE_RW, inode->i_generation,
333 inode); 333 inode);
334 334
335 ocfs2_inode_lock_res_init(&OCFS2_I(inode)->ip_data_lockres,
336 OCFS2_LOCK_TYPE_DATA, inode->i_generation,
337 inode);
338
339 ocfs2_set_inode_flags(inode); 335 ocfs2_set_inode_flags(inode);
340 336
341 status = 0; 337 status = 0;
@@ -1014,7 +1010,6 @@ void ocfs2_clear_inode(struct inode *inode)
1014 * the downconvert thread while waiting to destroy the locks. */ 1010 * the downconvert thread while waiting to destroy the locks. */
1015 ocfs2_mark_lockres_freeing(&oi->ip_rw_lockres); 1011 ocfs2_mark_lockres_freeing(&oi->ip_rw_lockres);
1016 ocfs2_mark_lockres_freeing(&oi->ip_meta_lockres); 1012 ocfs2_mark_lockres_freeing(&oi->ip_meta_lockres);
1017 ocfs2_mark_lockres_freeing(&oi->ip_data_lockres);
1018 ocfs2_mark_lockres_freeing(&oi->ip_open_lockres); 1013 ocfs2_mark_lockres_freeing(&oi->ip_open_lockres);
1019 1014
1020 /* We very well may get a clear_inode before all an inodes 1015 /* We very well may get a clear_inode before all an inodes
@@ -1038,7 +1033,6 @@ void ocfs2_clear_inode(struct inode *inode)
1038 1033
1039 ocfs2_lock_res_free(&oi->ip_rw_lockres); 1034 ocfs2_lock_res_free(&oi->ip_rw_lockres);
1040 ocfs2_lock_res_free(&oi->ip_meta_lockres); 1035 ocfs2_lock_res_free(&oi->ip_meta_lockres);
1041 ocfs2_lock_res_free(&oi->ip_data_lockres);
1042 ocfs2_lock_res_free(&oi->ip_open_lockres); 1036 ocfs2_lock_res_free(&oi->ip_open_lockres);
1043 1037
1044 ocfs2_metadata_cache_purge(inode); 1038 ocfs2_metadata_cache_purge(inode);