diff options
author | Chris Mason <chris.mason@oracle.com> | 2010-12-09 16:36:29 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-10-25 09:18:31 -0400 |
commit | b4382217f18a27be16f9a960ac3b1327c87297e7 (patch) | |
tree | 0827570ecbaebaf234026bcec1e6885d0b373d95 /disk-io.h | |
parent | fe7caa7c4a3bb738d3eb3ac6edaa24c8b38ec95f (diff) |
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>
Diffstat (limited to 'disk-io.h')
-rw-r--r-- | disk-io.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -47,6 +47,7 @@ struct btrfs_root *open_ctree(const char *filename, u64 sb_bytenr, int writes); struct btrfs_root *open_ctree_fd(int fp, const char *path, u64 sb_bytenr, int writes); int close_ctree(struct btrfs_root *root); +int write_all_supers(struct btrfs_root *root); int write_ctree_super(struct btrfs_trans_handle *trans, struct btrfs_root *root); int btrfs_read_dev_super(int fd, struct btrfs_super_block *sb, u64 sb_bytenr); |