]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: flush out and clean up any block device pages during mount
authorChris Mason <chris.mason@oracle.com>
Tue, 27 Mar 2012 22:56:56 +0000 (18:56 -0400)
committerChris Mason <chris.mason@oracle.com>
Thu, 29 Mar 2012 00:33:58 +0000 (20:33 -0400)
commit1ef4ba926323f532f28856f7802ba04966c1dab8
tree7a20f6ff0f6ec4dd9f0d7a51d787f2f65d89aa74
parent22a2b2c8cac1a42b273cb82ffa47d562e277faf1
Btrfs: flush out and clean up any block device pages during mount

Btrfs puts the filesystem metadata into its own address space, and
somehow the block device address space isn't getting onto disk properly
before a mount.  The end result is that a loop of mkfs and mounting the
filesystem will sometimes find stale or incorrect data.

This commit should fix it by sprinkling fdatawrites and invalidate_bdev
calls around.  This is a short term measure to make sure it is fixed.
The block devices really should be flushed and cleaned up higher in the
stack.

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