summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/file.c
diff options
context:
space:
mode:
authorFilipe Manana <fdmanana@suse.com>2018-11-09 10:43:08 +0000
committerDavid Sterba <dsterba@suse.com>2018-12-17 14:51:31 +0100
commit59b0713a8a6c0f72ab468507dcd6b866869b900a (patch)
tree820947c4c6f93f6261100f75d02bf9a7cf1bbd01 /fs/btrfs/file.c
parent46cc775e29c55d6ae9f4dbb733ec066ff56d3922 (diff)
downloadlinux-59b0713a8a6c0f72ab468507dcd6b866869b900a.tar.gz
linux-59b0713a8a6c0f72ab468507dcd6b866869b900a.tar.bz2
linux-59b0713a8a6c0f72ab468507dcd6b866869b900a.zip
Btrfs: simpler and more efficient cleanup of a log tree's extent io tree
We currently are in a loop finding each range (corresponding to a btree node/leaf) in a log root's extent io tree and then clean it up. This is a waste of time since we are traversing the extent io tree's rb_tree more times then needed (one for a range lookup and another for cleaning it up) without any good reason. We free the log trees when we are in the critical section of a transaction commit (the transaction state is set to TRANS_STATE_COMMIT_DOING), so it's of great convenience to do everything as fast as possible in order to reduce the time we block other tasks from starting a new transaction. So fix this by traversing the extent io tree once and cleaning up all its records in one go while traversing it. Reviewed-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/file.c')
0 files changed, 0 insertions, 0 deletions