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>
This commit is contained in:
committed by
Joel Becker
parent
b4d693fcc5
commit
5e98d49240
@@ -3635,10 +3635,18 @@ static int ocfs2_data_convert_worker(struct ocfs2_lock_res *lockres,
|
||||
{
|
||||
struct inode *inode;
|
||||
struct address_space *mapping;
|
||||
struct ocfs2_inode_info *oi;
|
||||
|
||||
inode = ocfs2_lock_res_inode(lockres);
|
||||
mapping = inode->i_mapping;
|
||||
|
||||
if (S_ISDIR(inode->i_mode)) {
|
||||
oi = OCFS2_I(inode);
|
||||
oi->ip_dir_lock_gen++;
|
||||
mlog(0, "generation: %u\n", oi->ip_dir_lock_gen);
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (!S_ISREG(inode->i_mode))
|
||||
goto out;
|
||||
|
||||
|
Reference in New Issue
Block a user