]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
Btrfs: improve async block group caching
authorYan Zheng <zheng.yan@oracle.com>
Fri, 11 Sep 2009 20:11:19 +0000 (16:11 -0400)
committerChris Mason <chris.mason@oracle.com>
Thu, 17 Sep 2009 19:47:36 +0000 (15:47 -0400)
This patch gets rid of two limitations of async block group caching.
The old code delays handling pinned extents when block group is in
caching. To allocate logged file extents, the old code need wait
until block group is fully cached. To get rid of the limitations,
This patch introduces a data structure to track the progress of
caching. Base on the caching progress, we know which extents should
be added to the free space cache when handling the pinned extents.
The logged file extents are also handled in a similar way.

This patch also changes how pinned extents are tracked. The old
code uses one tree to track pinned extents, and copy the pinned
extents tree at transaction commit time. This patch makes it use
two trees to track pinned extents. One tree for extents that are
pinned in the running transaction, one tree for extents that can
be unpinned. At transaction commit time, we swap the two trees.

Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>

No differences found