]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: don't always do readahead
authorJosef Bacik <josef@redhat.com>
Fri, 13 May 2011 14:32:11 +0000 (10:32 -0400)
committerJosef Bacik <josef@redhat.com>
Mon, 23 May 2011 17:03:14 +0000 (13:03 -0400)
commitbb407861def50bd6e928b6af7d30f612d1fde8b8
treed303bffbd895c307f49286cd90186cf58223dde2
parent4d325c01c8a626bf3362f8720beaeb87fb46379a
Btrfs: don't always do readahead

Our readahead is sort of sloppy, and really isn't always needed.  For example if
ls is doing a stating ls (which is the default) it's going to stat in non-disk
order, so if say you have a directory with a stupid amount of files, readahead
is going to do nothing but waste time in the case of doing the stat.  Taking the
unconditional readahead out made my test go from 57 minutes to 36 minutes.  This
means that everywhere we do loop through the tree we want to make sure we do set
path->reada properly, so I went through and found all of the places where we
loop through the path and set reada to 1.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
fs/btrfs/ctree.c
fs/btrfs/extent-tree.c
fs/btrfs/inode.c
fs/btrfs/relocation.c