Btrfs: optimize function btrfs_read_chunk_tree
authorFilipe David Borba Manana <fdmanana@gmail.com>
Tue, 30 Jul 2013 11:03:04 +0000 (12:03 +0100)
committerChris Mason <chris.mason@fusionio.com>
Sun, 1 Sep 2013 12:04:43 +0000 (08:04 -0400)
commit395927a9d8e64af518c2ccdbfbbdf9184b558315
treea42f503f5b3258b42069fa917db6aedb3def97a9
parent6596a9281995a3c7dee8ca6666bd169fffc928e1
Btrfs: optimize function btrfs_read_chunk_tree

After reading all device items from the chunk tree, don't
exit the loop and then navigate down the tree again to find
the chunk items. Instead just read all device items and
chunk items with a single tree search. This is possible
because all device items are found before any chunk item in
the chunks tree.

Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com>
Reviewed-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
fs/btrfs/volumes.c