Avoid tree of tree root cow when committing a clean FS
authorChris Mason <chris.mason@oracle.com>
Thu, 30 Oct 2008 15:11:39 +0000 (11:11 -0400)
committerChris Mason <chris.mason@oracle.com>
Thu, 30 Oct 2008 15:11:39 +0000 (11:11 -0400)
commit0a7869d69df44b5993f7c5d6bbf9cce217561aff
tree5b24849645fe8b48105dcf3a2bc4f2b81dffd99c
parent712c1dea5e5a7a37b66b94b4a0f21830dd6f69fb
Avoid tree of tree root cow when committing a clean FS

The root node generation number code made commit_tree_root look like the
kernel code.  It forces a cow of the tree of tree roots even when
the FS hasn't changed.

This causes errors during fsck and other readonly operations.  This adds
a check to see if commit_tree_root is going to trigger writes to the
tree of tree roots, and bails if none are pending.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
disk-io.c