At 06/01/2016 12:01 AM, David Sterba wrote:
On Tue, May 31, 2016 at 03:14:25PM +0800, luke wrote:
@@ -68,6 +68,12 @@ struct meta_cluster {
struct fs_chunk {
u64 logical;
u64 physical;
+ /* physical_dup only store additonal physical for BTRFS_BLOCK_GROUP_DUP
+ * currently restore only support single and dup
+ * TODO: modify this structure and the function related to this
+ * structure for support raid*
What does it do in case of RAID? Can we do runtime checks and report
potential problems? btrfs-image on multiple device was always somehow
tricky so I'll merge the patch.
For multiple device, if the number of target devices equal to the
number of source devices, obviously we can offer the enough disk size
and keep the original offset. However, if restore the multi-device
metadata to one disk, we should remap all chunk and use other profile to
instead of raid*(for example, raid0 -> single, raid1 -> dup). Currently
I have only a rough idea, it may need to refactor a lot of function.
We can report some warnings when we find raid* profile in the restore
process. Should I add these warnings?
Yes please, that's what I was asking for. If you're going to do
intrusive refactorin, please add tests.
OK. When I started to refactor, I'll add these.
Thanks,
Lu
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html