aboutsummaryrefslogtreecommitdiffstats
path: root/btrfs-image.c
diff options
context:
space:
mode:
authorLu Fengqi <lufq.fnst@cn.fujitsu.com>2016-03-07 12:57:41 +0800
committerDavid Sterba <dsterba@suse.com>2016-03-14 13:42:47 +0100
commit05640939ea24c609c7c2badc76ebba9ec6a4896d (patch)
tree1ee641f486db5a5767aa52d8f2603eae73451b10 /btrfs-image.c
parentda3ae9c69ab4e557e625cabe8894e442def60b62 (diff)
downloadbtrfs-progs-05640939ea24c609c7c2badc76ebba9ec6a4896d.tar.gz
btrfs-progs-05640939ea24c609c7c2badc76ebba9ec6a4896d.tar.xz
btrfs-progs-05640939ea24c609c7c2badc76ebba9ec6a4896d.zip
btrfs-progs: Add new option for specify chunk root bytenr
Add new btrfsck option, '--chunk-root', to specify chunk root bytenr. And allow open_ctree_fs_info() function accept chunk_root_bytenr to override the bytenr in superblock. This will be mainly used when chunk tree corruption. Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'btrfs-image.c')
-rw-r--r--btrfs-image.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/btrfs-image.c b/btrfs-image.c
index 33966fd..eba0e29 100644
--- a/btrfs-image.c
+++ b/btrfs-image.c
@@ -2471,7 +2471,7 @@ static int restore_metadump(const char *input, FILE *out, int old_restore,
/* NOTE: open with write mode */
if (fixup_offset) {
BUG_ON(!target);
- info = open_ctree_fs_info(target, 0, 0,
+ info = open_ctree_fs_info(target, 0, 0, 0,
OPEN_CTREE_WRITES |
OPEN_CTREE_RESTORE |
OPEN_CTREE_PARTIAL);
@@ -2817,7 +2817,7 @@ int main(int argc, char *argv[])
u64 total_devs;
int i;
- info = open_ctree_fs_info(target, 0, 0,
+ info = open_ctree_fs_info(target, 0, 0, 0,
OPEN_CTREE_PARTIAL |
OPEN_CTREE_RESTORE);
if (!info) {