]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
Btrfs: limit balancing work while flushing delayed refs
authorChris Mason <chris.mason@oracle.com>
Mon, 16 Mar 2009 14:59:57 +0000 (10:59 -0400)
committerChris Mason <chris.mason@oracle.com>
Tue, 24 Mar 2009 20:14:51 +0000 (16:14 -0400)
commita4b6e07d1a8a9b907e82b9acbf51a026fbb9301c
treefb93f38d01812a6f8af8dbefd4f769460afc997e
parent5d13a98f3bf5afc1113f7db184c627a44659bc29
Btrfs: limit balancing work while flushing delayed refs

The delayed reference mechanism is responsible for all updates to the
extent allocation trees, including those updates created while processing
the delayed references.

This commit tries to limit the amount of work that gets created during
the final run of delayed refs before a commit.  It avoids cowing new blocks
unless it is required to finish the commit, and so it avoids new allocations
that were not really required.

The goal is to avoid infinite loops where we are always making more work
on the final run of delayed refs.  Over the long term we'll make a
special log for the last delayed ref updates as well.

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