Btrfs: make send's file extent item search more efficient
authorFilipe David Borba Manana <fdmanana@gmail.com>
Fri, 24 Jan 2014 17:42:09 +0000 (17:42 +0000)
committerChris Mason <clm@fb.com>
Wed, 29 Jan 2014 15:06:24 +0000 (07:06 -0800)
commit7fdd29d02e0ab595a857fe9c7b71e752ff665372
treed4b38218d7c8ae8ee3a97e89b3025e2cef824eca
parent95def2ede1a9dd12b164932eaf5fefb67aefc41c
Btrfs: make send's file extent item search more efficient

Instead of looking for a file extent item, process it, release the path
and do a btree search for the next file extent item, just process all
file extent items in a leaf without intermediate btree searches. This way
we save cpu and we're not blocking other tasks or affecting concurrency on
the btree, because send's paths use the commit root and skip btree node/leaf
locking.

Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com>
Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/send.c