diff options
author | Qu Wenruo <quwenruo@cn.fujitsu.com> | 2017-02-23 15:46:46 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-03-16 17:02:44 +0100 |
commit | 1170ac3079005a99098e48777513e5ab09b64d55 (patch) | |
tree | a87c237da8abecba30181bcdd49996db72fbc612 /cmds-send.c | |
parent | b82b12265b976bdb044a752bfd27b2494edfffbd (diff) |
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>
Diffstat (limited to 'cmds-send.c')
0 files changed, 0 insertions, 0 deletions