btrfs-progs/convert
Qu Wenruo 1170ac3079 btrfs-progs: convert: Introduce function to check if convert image is able to be rolled back
Introduce a function, check_convert_image() to check if that image is
rollback-able.

This means all file extents except one of the btrfs reserved ranges, must
be mapped 1:1 on disk.

1:1 mapped file extents must match the following conditions:

1) Their file_offset(key.offset) matches its disk_bytenr
2) The corresponding chunk must be mapped 1:1 on disk
   That's to say, it's a SINGLE chunk, and chunk logical matches with
   stripe physical.

Above 2 conditions ensured that file extent lies the exactly the same
position as in the old filesystem.

For data in reserved ranges of btrfs, they are relocated to new places,
and in that case, we use btrfs_read_file() to read out the content for
later rollback use.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
2017-03-16 17:02:44 +01:00
..
common.c btrfs-progs: remove unused argument from btrfs_csum_data 2017-03-08 13:00:47 +01:00
common.h btrfs-progs: convert: rename members that clash with other functions 2017-03-08 13:00:46 +01:00
main.c btrfs-progs: convert: Introduce function to check if convert image is able to be rolled back 2017-03-16 17:02:44 +01:00
Makefile btrfs-progs: build: add stub makefile to convert 2017-03-08 13:00:46 +01:00
source-ext2.c btrfs-progs: convert: rename members that clash with other functions 2017-03-08 13:00:46 +01:00
source-ext2.h btrfs-progs: convert: move ext2 definitions out of main 2017-03-08 13:00:45 +01:00
source-fs.c btrfs-progs: convert: Introduce simple range structure for convert reserved ranges 2017-03-16 17:02:44 +01:00
source-fs.h btrfs-progs: convert: Introduce simple range structure for convert reserved ranges 2017-03-16 17:02:44 +01:00