summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/inode.c
diff options
context:
space:
mode:
authorGoldwyn Rodrigues2010-06-28 17:04:32 +0200
committerJoel Becker2010-09-10 18:18:15 +0200
commit5e98d492406818e6a94c0ba54c61f59d40cefa4a (patch)
tree9eec0813194dd2192f6ae05d2f344e7839d2ab44 /fs/ocfs2/inode.c
parentocfs2: Cache system inodes of other slots. (diff)
downloadkernel-qcow2-linux-5e98d492406818e6a94c0ba54c61f59d40cefa4a.tar.gz
kernel-qcow2-linux-5e98d492406818e6a94c0ba54c61f59d40cefa4a.tar.xz
kernel-qcow2-linux-5e98d492406818e6a94c0ba54c61f59d40cefa4a.zip
Track negative entries v3
Track negative dentries by recording the generation number of the parent directory in d_fsdata. The generation number for the parent directory is recorded in the inode_info, which increments every time the lock on the directory is dropped. If the generation number of the parent directory and the negative dentry matches, there is no need to perform the revalidate, else a revalidate is forced. This improves performance in situations where nodes look for the same non-existent file multiple times. Thanks Mark for explaining the DLM sequence. Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.de> Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/ocfs2/inode.c')
-rw-r--r--fs/ocfs2/inode.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c
index eece3e05d9d0..f935fd6600dd 100644
--- a/fs/ocfs2/inode.c
+++ b/fs/ocfs2/inode.c
@@ -335,6 +335,7 @@ void ocfs2_populate_inode(struct inode *inode, struct ocfs2_dinode *fe,
else
inode->i_fop = &ocfs2_dops_no_plocks;
i_size_write(inode, le64_to_cpu(fe->i_size));
+ OCFS2_I(inode)->ip_dir_lock_gen = 1;
break;
case S_IFLNK:
if (ocfs2_inode_is_fast_symlink(inode))