btrfs-progs/image
Qu Wenruo 73dd4e3c87 btrfs-progs: image: Don't modify the chunk and device tree if the source dump is single device
Btrfs-image -r doesn't always create exactly the same fs of the original
fs, this is because btrfs-image can create dump from multi-device, and
restore it to single device.

Thus we need some special modification to chunk and device tree. This
behavior is mostly to handle the old behavior where we always restore
the metadata into SINGLE profile no matter what.

However this is not needed if the source fs only has one device, in that
case, we can use all the metadata as is, no need to modify the fs at
all, resulting an exact copy of metadata.

This patch will do extra check when doing restore, to avoid modify the
restored fs if the source is also single device.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2020-05-29 12:42:49 +02:00
..
main.c btrfs-progs: image: Don't modify the chunk and device tree if the source dump is single device 2020-05-29 12:42:49 +02:00
Makefile btrfs-progs: build: add stub makefile to image and mkfs 2019-07-04 15:36:01 +02:00
metadump.h btrfs-progs: image: Use SZ_* to replace intermediate size 2019-06-14 17:39:22 +02:00
sanitize.c btrfs-progs: move crc32c implementation to crypto/ 2019-11-18 19:20:02 +01:00
sanitize.h btrfs-progs: image: move sanitization to new file 2017-11-14 15:59:00 +01:00