OSDN Git Service

Btrfs: optimize reada_for_balance
authorJosef Bacik <jbacik@fusionio.com>
Mon, 17 Jun 2013 18:23:02 +0000 (14:23 -0400)
committerJosef Bacik <jbacik@fusionio.com>
Mon, 1 Jul 2013 12:52:32 +0000 (08:52 -0400)
commit0b08851fdaa5f9f74357345d7be44ea584665d5f
tree87c77c227f9c104ee7ed15a59ad28fd8bebe704d
parentbdf7c00e8f56386dd1df545b37cf59d55ce4216d
Btrfs: optimize reada_for_balance

This patch does two things.  First we no longer explicitly read in the blocks
we're trying to readahead.  For things like balance_level we may never actually
use the blocks so this just adds uneeded latency, and balance_level and
split_node will both read in the blocks they care about explicitly so if the
blocks need to be waited on it will be done there.  Secondly we no longer drop
the path if we do readahead, we just set the path blocking before we call
reada_for_balance() and then we're good to go.  Hopefully this will cut down on
the number of re-searches.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/ctree.c