Btrfs: optimize extent item search in run_delayed_extent_op
authorFilipe David Borba Manana <fdmanana@gmail.com>
Fri, 18 Oct 2013 14:42:56 +0000 (15:42 +0100)
committerChris Mason <chris.mason@fusionio.com>
Tue, 12 Nov 2013 03:03:53 +0000 (22:03 -0500)
commit55994887082d6e9b3d31b55fc5be158fd97eadbc
treef98021a7c4cb1bc6a9c12aa0f6d1754cabf1e6c2
parentcab45e22da48b523665b3566f43527a2fead1d1e
Btrfs: optimize extent item search in run_delayed_extent_op

Instead of doing another extent tree search if the first search failed
to find a metadata item, check if the previous item in the leaf is an
extent item and use it if it is, otherwise do the second tree search
for an extent item.

Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
fs/btrfs/extent-tree.c