From b4382217f18a27be16f9a960ac3b1327c87297e7 Mon Sep 17 00:00:00 2001 From: Chris Mason Date: Thu, 9 Dec 2010 16:36:29 -0500 Subject: 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 --- disk-io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'disk-io.c') diff --git a/disk-io.c b/disk-io.c index fef3edab..f4368f3d 100644 --- a/disk-io.c +++ b/disk-io.c @@ -829,7 +829,7 @@ int write_dev_supers(struct btrfs_root *root, struct btrfs_super_block *sb, if (root->fs_info->super_bytenr != BTRFS_SUPER_INFO_OFFSET) { btrfs_set_super_bytenr(sb, root->fs_info->super_bytenr); - +printk("speiiiiiiiiiiiiiiiiiiiiiiiiiiiii\n"); crc = ~(u32)0; crc = btrfs_csum_data(NULL, (char *)sb + BTRFS_CSUM_SIZE, crc, BTRFS_SUPER_INFO_SIZE - BTRFS_CSUM_SIZE); -- cgit v1.2.3