Btrfs: Leaf reference cache update
authorChris Mason <chris.mason@oracle.com>
Mon, 28 Jul 2008 19:32:51 +0000 (15:32 -0400)
committerChris Mason <chris.mason@oracle.com>
Thu, 25 Sep 2008 15:04:05 +0000 (11:04 -0400)
This changes the reference cache to make a single cache per root
instead of one cache per transaction, and to key by the byte number
of the disk block instead of the keys inside.

This makes it much less likely to have cache misses if a snapshot
or something has an extra reference on a higher node or a leaf while
the first transaction that added the leaf into the cache is dropping.

Some throttling is added to functions that free blocks heavily so they
wait for old transactions to drop.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/ctree.h
fs/btrfs/disk-io.c
fs/btrfs/extent-tree.c
fs/btrfs/file.c
fs/btrfs/inode.c
fs/btrfs/ref-cache.c
fs/btrfs/ref-cache.h
fs/btrfs/transaction.c

Simple merge
Simple merge
Simple merge
diff --cc fs/btrfs/file.c
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge