]> git.karo-electronics.de Git - karo-tx-linux.git/commit
Btrfs: cache extent state when writing out dirty metadata pages
authorJosef Bacik <jbacik@fusionio.com>
Thu, 27 Sep 2012 21:07:30 +0000 (17:07 -0400)
committerChris Mason <chris.mason@fusionio.com>
Thu, 4 Oct 2012 13:40:08 +0000 (09:40 -0400)
commita5f9920d651ce35ffdc3b4e705ac672edfd727da
tree02023974443d3dcd04273d8600fb5e6ed66c6c0d
parentc4f39c7450af1f618a551d5eb9061841052095c5
Btrfs: cache extent state when writing out dirty metadata pages

Everytime we write out dirty pages we search for an offset in the tree,
convert the bits in the state, and then when we wait we search for the
offset again and clear the bits.  So for every dirty range in the io tree we
are doing 4 rb searches, which is suboptimal.  With this patch we are only
doing 2 searches for every cycle (modulo weird things happening).  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/disk-io.c
fs/btrfs/extent-tree.c
fs/btrfs/extent_io.c
fs/btrfs/extent_io.h
fs/btrfs/free-space-cache.c
fs/btrfs/relocation.c
fs/btrfs/transaction.c
fs/btrfs/tree-log.c