]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: sort references by byte number during btrfs_inc_ref
authorChris Mason <chris.mason@oracle.com>
Wed, 4 Feb 2009 14:23:45 +0000 (09:23 -0500)
committerChris Mason <chris.mason@oracle.com>
Wed, 4 Feb 2009 14:23:45 +0000 (09:23 -0500)
commit4b4bca2d899822bbfebae850e8189714a02d429c
tree544a1f9ca00af73fd22380610fd2d6961e066218
parent954101f6d3fc812da287346c7e1017a70c707cf8
Btrfs: sort references by byte number during btrfs_inc_ref

When a block goes through cow, we update the reference counts of
everything that block points to.  The internal pointers of the block
can be in just about any order, and it is likely to have clusters of
things that are close together and clusters of things that are not.

To help reduce the seeks that come with updating all of these reference
counts, sort them by byte number before actual updates are done.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/extent-tree.c