From f9b035d50c431c2a544ad1cb91ca5121165ae7aa Mon Sep 17 00:00:00 2001 From: Cody Schuffelen Date: Mon, 8 Jul 2019 16:14:24 -0700 Subject: Support composite disks. This adds a new disk file type next to raw files and qcow images that represent an indirection to further raw disk files. The disk file itself is a proto file with references to file paths for other disks to open and their virtual offsets and lengths. The intention is to make it easy to assemble a single virtual hard disk out of several distinct partition files. In the particular case of Cuttlefish running Android in a VM, this is relevant as the Android build system distributes partitions as separate raw files. While the simple solution is to pass each partition as a separate raw disk, some functionality (like the bootloader) assumes there is a partition table with multiple distinct partitions on a single disk. Implementing composite disk support in the VMM bridges this gap through supporting the general-purpose case of a disk built out of multiple component files. If desired, this can be extended to support qcow files to support unusual configurations like a mixed qcow/raw disk. Enabled with the "composite-disk" feature. Bug: b/133432409 Change-Id: I2b0c47d92fab13b5dc0ca5a960c7cfd2b7145b87 Signed-off-by: Cody Schuffelen Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1667767 Reviewed-by: Daniel Verkamp Commit-Queue: Daniel Verkamp Tested-by: kokoro --- Cargo.lock | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Cargo.lock') diff --git a/Cargo.lock b/Cargo.lock index 8017a34..b20bee3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -171,7 +171,10 @@ dependencies = [ name = "disk" version = "0.1.0" dependencies = [ + "data_model 0.1.0", "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "protos 0.1.0", "qcow 0.1.0", "remain 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "sys_util 0.1.0", -- cgit 1.4.1