]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: make sure all dirty blocks are written at commit time
authorYan Zheng <zheng.yan@oracle.com>
Wed, 22 Jul 2009 14:07:05 +0000 (10:07 -0400)
committerChris Mason <chris.mason@oracle.com>
Wed, 22 Jul 2009 14:07:05 +0000 (10:07 -0400)
commitc6243596cc71e5ca9dbd605e2b31299d2929f673
treed3d099197e5ddc94f737dbad273810b902b05307
parentbbe3e1cfef8e578564c7b9602687bef530d574a2
Btrfs: make sure all dirty blocks are written at commit time

Write dirty block groups may allocate new block, and so may add new delayed
back ref. btrfs_run_delayed_refs may make some block groups dirty.

commit_cowonly_roots does not handle the recursion properly, and some dirty
blocks can be left unwritten at commit time. This patch moves
btrfs_run_delayed_refs into the loop that writes dirty block groups, and makes
the code not break out of the loop until there are no dirty block groups or
delayed back refs.

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