]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: introduce a head ref rbtree
authorLiu Bo <bo.li.liu@oracle.com>
Mon, 14 Oct 2013 04:59:45 +0000 (12:59 +0800)
committerChris Mason <clm@fb.com>
Tue, 28 Jan 2014 21:19:22 +0000 (13:19 -0800)
commitebe14e35b54f778e63d357aa6a4523e4b748997d
tree7aa114c1a78e1834950a34524c8ada82569af50b
parent7edc1c2a303027f64c0e911915ab3cfc0f10a2b4
Btrfs: introduce a head ref rbtree

The way how we process delayed refs is
1) get a bunch of head refs,
2) pick up one head ref,
3) go one node back for any delayed ref updates.

The head ref is also linked in the same rbtree as the delayed ref is,
so in 1) stage, we have to walk one by one including not only head refs, but
delayed refs.

When we have a great number of delayed refs pending to process,
this'll cost time a lot.

Here we introduce a head ref specific rbtree, it only has head refs, so troubles
go away.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/delayed-ref.c
fs/btrfs/delayed-ref.h
fs/btrfs/disk-io.c
fs/btrfs/extent-tree.c
fs/btrfs/transaction.c