Btrfs-progs: add a btrfs-select-super command to overwrite the super
authorChris Mason <chris.mason@oracle.com>
Thu, 9 Dec 2010 21:36:29 +0000 (16:36 -0500)
committerChris Mason <chris.mason@oracle.com>
Tue, 25 Oct 2011 13:18:31 +0000 (09:18 -0400)
commitb4382217f18a27be16f9a960ac3b1327c87297e7
tree0827570ecbaebaf234026bcec1e6885d0b373d95
parentfe7caa7c4a3bb738d3eb3ac6edaa24c8b38ec95f
Btrfs-progs: add a btrfs-select-super command to overwrite the super

Btrfs stores multiple copies of the superblock, and for common power-failure
crashes where barriers were not in use, one of the super copies is often
valid while the first copy is not.

This adds a btrfs-select-super -s N /dev/xxx command, which can
overwrite all the super blocks with a copy that you have already
determined is valid with btrfsck -s

Signed-off-by: Chris Mason <chris.mason@oracle.com>
Makefile
btrfs-select-super.c [new file with mode: 0644]
disk-io.c
disk-io.h