crosvm/disk
Daniel Verkamp e539372226 devices: virtio: block: impl DiskOption::open for Windows
Move the logic for locking and DiskFile creation into an implementation
of DiskOption::open(), matching the sys::unix structure. This will
allow future consolidation of the vhost-user devices.

For now, the Windows variant of DiskOption::open() only knows how to
create a SingleFileDisk (not qcow, composite, etc.); switching to
create_disk_file() is left as future work.

This also makes a few tweaks to the creation of the BlockAsync instance
in order to make the unix and windows versions more similar - compare:
- devices/src/virtio/vhost/user/device/block/sys/windows.rs
- devices/src/virtio/vhost/user/device/block/sys/unix.rs

No functional change intended.

BUG=None
TEST=tools/presubmit --all

Change-Id: Iadb1a8913a7445d7c091d0e359c7d8792704c35a
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3892136
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Noah Gold <nkgold@google.com>
2022-09-20 03:42:20 +00:00
..
src devices: virtio: block: impl DiskOption::open for Windows 2022-09-20 03:42:20 +00:00
Cargo.toml disk: Turn Android Sparse format into a feature 2022-09-05 15:36:23 +00:00