]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: avoid heavy operations in btrfs_commit_super
authorLiu Bo <bo.li.liu@oracle.com>
Tue, 5 Nov 2013 03:45:53 +0000 (11:45 +0800)
committerChris Mason <chris.mason@fusionio.com>
Thu, 21 Nov 2013 01:42:16 +0000 (20:42 -0500)
commit840c3e155586b021f3a9278f3bbf7ddf943ae013
tree2698bcd9e7271f268834108e20ecbc985d188805
parent6d5ab5df654b715aedafbcc5f98990c1dcd7fe20
Btrfs: avoid heavy operations in btrfs_commit_super

The 'git blame' history shows that, the old transaction commit code has to do
twice to ensure roots are updated and we have to flush metadata and super block
manually, however, right now all of these can be handled well inside
the transaction commit code without extra efforts.

And the error handling part remains same with the current code, -- 'return to
caller once we get error'.

This saves us a transaction commit and a flush of super block, which are both
heavy operations according to ftrace output analysis.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
fs/btrfs/disk-io.c