summaryrefslogtreecommitdiff
path: root/mm/quicklist.c
diff options
context:
space:
mode:
authorliubo <liubo2009@cn.fujitsu.com>2011-03-26 08:01:12 -0400
committerroot <Chris Mason chris.mason@oracle.com>2011-03-28 05:37:48 -0400
commitc622ae6085d0c6ad834213bbf1477eb311359078 (patch)
tree27e12a77c1759d17102c702606d535e78d7c3003 /mm/quicklist.c
parentf7039b1d5c32241f87a513e33120db36bf30264d (diff)
btrfs: make inode ref log recovery faster
When we recover from crash via write-ahead log tree and process the inode refs, for each btrfs_inode_ref item, we will 1) check if we already have a perfect match in fs/file tree, if we have, then we're done. 2) search the corresponding back reference in fs/file tree, and check all the names in this back reference to see if they are also in the log to avoid conflict corners. 3) recover the logged inode refs to fs/file tree. In current btrfs, however, - for 2)'s check, once is enough, since the checked back reference will remain unchanged after processing all the inode refs belonged to the key. - it has no need to do another 1) between 2) and 3). I've made a small test to show how it improves, $dd if=/dev/zero of=foobar bs=4K count=1 $sync $make 100 hard links continuously, like ln foobar link_i $fsync foobar $echo b > /proc/sysrq-trigger after reboot $time mount DEV PATH without patch: real 0m0.285s user 0m0.001s sys 0m0.009s with patch: real 0m0.123s user 0m0.000s sys 0m0.010s Changelog v1->v2: - fix double free - pointed by David Sterba Changelog v2->v3: - adjust free order Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'mm/quicklist.c')
0 files changed, 0 insertions, 0 deletions