GFS2: Add readahead to sequential directory traversal
This patch adds read-ahead capability to GFS2's directory hash table management. It greatly improves performance for some directory operations. For example: In one of my file systems that has 1000 directories, each of which has 1000 files, time to execute a recursive ls (time ls -fR /mnt/gfs2 > /dev/null) was reduced from 2m2.814s on a stock kernel to 0m45.938s. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
This commit is contained in:

committed by
Steven Whitehouse

parent
20ed0535d3
commit
dfe4d34b39
@@ -105,7 +105,7 @@ static int gfs2_readdir(struct file *file, void *dirent, filldir_t filldir)
|
||||
return error;
|
||||
}
|
||||
|
||||
error = gfs2_dir_read(dir, &offset, dirent, filldir);
|
||||
error = gfs2_dir_read(dir, &offset, dirent, filldir, &file->f_ra);
|
||||
|
||||
gfs2_glock_dq_uninit(&d_gh);
|
||||
|
||||
|
Reference in New Issue
Block a user