summaryrefslogtreecommitdiff
path: root/disk-io.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2012-02-09 10:38:05 -0500
committerChris Mason <chris.mason@oracle.com>2012-02-09 10:38:05 -0500
commit47b104b7f17b37813244691829daf4302831acf1 (patch)
tree957c640525f493e03640f136860570dee022cdab /disk-io.c
parent0bc5e18aace8d2535adc57cfa95c2481e94d60f7 (diff)
btrfsck: add --init-csum-tree to replace the csum root with an empty one
This will effectively delete all of your crcs, but at least you'll be able to mount the FS with nodatasum. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'disk-io.c')
-rw-r--r--disk-io.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/disk-io.c b/disk-io.c
index 58aec02b..b21a87f8 100644
--- a/disk-io.c
+++ b/disk-io.c
@@ -787,7 +787,8 @@ static struct btrfs_fs_info *__open_ctree_fd(int fp, const char *path,
BTRFS_CSUM_TREE_OBJECTID, csum_root);
if (ret) {
printk("Couldn't setup csum tree\n");
- goto out_failed;
+ if (!partial)
+ goto out_failed;
}
csum_root->track_dirty = 1;