]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Btrfs: skip looking for delalloc if we don't have ->fill_delalloc
authorJosef Bacik <josef@redhat.com>
Mon, 1 Aug 2011 16:08:18 +0000 (12:08 -0400)
committerChris Mason <chris.mason@oracle.com>
Wed, 16 Nov 2011 02:20:11 +0000 (21:20 -0500)
commit1a3eded8882b3a70ad73666b2ff5609e4530a649
tree5621fd15ecccebd10cc6124444ba5771457299c8
parent489259c54b0de651c09e58295d8b2032c0fb6274
Btrfs: skip looking for delalloc if we don't have ->fill_delalloc

We always look for delalloc bytes in our io_tree so we can fill in delalloc.
This is fine in most cases, but if we're writing out the btree_inode this is
just a superfluous tree search on the io_tree, and if we have a lot of metadata
dirty this could be an expensive check.  So instead check to see if our io_tree
has a ->fill_delalloc op, and if not don't even bother doing the lookup.
Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
(cherry picked from commit 9e4871070b5f070cacf26525389d56e0345ba156)
fs/btrfs/extent_io.c