No description
Find a file
Daniel Verkamp 2888ee8671 devices: virtio-blk: retain sparse across resize
Prior to this change, the disk resize operation would unconditionally
allocate disk space if the resize caused the disk to grow, and the disk
was marked as non-sparse.

With this change, the behavior is changed so that the `sparse=` option
specified at block device creation time is never modified; if a disk was
sparse before it was resized, it will remain sparse afterwards. The new
area of the disk image is only allocated if the disk was originally not
sparse.

The promotion to non-sparse when resizing was intended as a transition
mechanism for changing existing sparse disks into fully preallocated
resizable disks in Crostini, but this was never actually implemented.

This partially reverts commit 7673338200 ("devices: block: let resize
convert to non-sparse") [1].

[1]: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2070846

BUG=b:296117425
TEST=Resize Crostini disk image using slider in settings UI

Change-Id: Ibe55b851ef996d9b7ec903f0f2ee7cf5b3434217
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4309988
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Takaya Saeki <takayas@chromium.org>
Reviewed-by: Junichi Uekawa <uekawa@chromium.org>
2023-08-18 20:35:31 +00:00
.cargo clippy: Disallow len_without_is_empty and len_zero 2023-05-22 21:27:21 +00:00
.config Enable test retries in nextest 2023-06-07 17:43:18 +00:00
.devcontainer dev_container: Replace better toml extension 2023-07-27 23:37:15 +00:00
.github Cleanup: Remove old, deprecated and no longer used files 2022-09-20 21:05:57 +00:00
.vscode Document feature flags and introduce new feature sets 2022-10-14 20:31:19 +00:00
aarch64 acpi: x86: add support for ACPI Notify() forwarding 2023-07-27 11:30:18 +00:00
acpi_tables acpi: aml: make the BufferData public 2023-05-05 22:26:02 +00:00
arch x86_64: add SMBIOS serial number option 2023-08-09 21:00:20 +00:00
argh_helpers Update all copyright headers to match new style 2022-09-13 18:41:29 +00:00
audio_streams_conformance_test Move audio_streams_conformance test to workspace 2023-07-26 18:19:15 +00:00
audio_util tree-wide: apply nightly rustfmt 2023-03-27 21:30:45 +00:00
base Cargo.toml: add version to chrono dependencies 2023-08-11 21:02:25 +00:00
bit_field bit_field: suppress clippy cast warnings 2023-04-10 23:41:28 +00:00
broker_ipc crash_report: refactor product specific code 2023-06-09 23:10:04 +00:00
common Replace internal p9 with crates.io versio 2023-08-14 18:34:51 +00:00
cros_async cros_async: epoll: dup FD once per source, instead of per op 2023-08-15 22:13:29 +00:00
cros_fdt clippy fixes for Rust 1.70 and 1.71 2023-07-13 20:29:05 +00:00
cros_tracing devices: replace usb_debug macro with cros_tracing 2023-07-04 04:52:24 +00:00
cros_tracing_types Upstream cros_tracing_types. 2023-05-11 18:08:00 +00:00
crosvm_cli devices: pci: remove AC97 codes 2023-08-11 03:29:31 +00:00
crosvm_control balloon: add optional response to adjust 2023-08-16 04:44:01 +00:00
crosvm_plugin base: tube: send/recv for srteam socket to use io::Result 2023-05-23 10:29:53 +00:00
devices devices: virtio-blk: retain sparse across resize 2023-08-18 20:35:31 +00:00
disk crosvm: Rename to open_file_or_duplicate. 2023-07-24 01:30:27 +00:00
docs/book docs: Add a link to how to run tryjob. 2023-08-18 02:29:55 +00:00
e2e_tests e2e_tests: Allow rootfs to be compressed and/or rw 2023-08-15 23:03:19 +00:00
fuse crosvm: Deprecate DataInit 2023-07-12 21:34:20 +00:00
fuzz Replace internal p9 with crates.io versio 2023-08-14 18:34:51 +00:00
gpu_display gpu_display: delete unused field and method GpuDisplay::is_x 2023-08-18 18:23:25 +00:00
hypervisor hypervisor: whpx: save/restore TSC in snapshots. 2023-08-15 19:35:28 +00:00
infra Roll recipe dependencies (trivial). 2023-08-18 20:30:10 +00:00
io_uring io_uring: update submission metadata after EINTR 2023-06-08 05:42:59 +00:00
jail devices: video: update jail settings to support VAAPI backend 2023-08-08 14:58:10 +00:00
kernel_cmdline Rust 1.65: Fix clippy derive_partial_eq_without_eq lints 2022-12-01 01:32:30 +00:00
kernel_loader kernel_loader: Use Linux UAPI header for bindings 2023-05-30 12:21:18 +00:00
kvm kvm: remove KVM_CAP_IOAPIC_NUM_PINS 2023-07-05 23:10:55 +00:00
kvm_sys kvm: remove KVM_CAP_IOAPIC_NUM_PINS 2023-07-05 23:10:55 +00:00
libcras_stub devices: snd: Use PCM device client_type and stream_type for CRAS 2023-03-02 06:22:40 +00:00
linux_input_sys linux_input_sys: Move event code constants from virtio_input (devices 2023-08-17 21:31:24 +00:00
logo
media clippy fixes for Rust 1.70 and 1.71 2023-07-13 20:29:05 +00:00
metrics Cargo.toml: add version to chrono dependencies 2023-08-11 21:02:25 +00:00
net_sys Fix remaining Chrome/Chromium OS instances 2023-01-03 22:14:30 +00:00
net_util net: Make slirp capture optional even if feature is on 2023-08-14 23:24:19 +00:00
perfetto crosvm: Remove DataInit from windows components 2023-06-15 21:30:12 +00:00
power_monitor Cargo.toml: upgrade protobuf 2.x -> 3.x 2023-04-28 19:32:01 +00:00
prebuilts prebuilds/testvm: Retry downloads 2023-03-09 23:04:20 +00:00
proto_build_tools Cargo.toml: upgrade protobuf 2.x -> 3.x 2023-04-28 19:32:01 +00:00
protos Reland "Reland "balloon: rename WSS to WS"" 2023-08-01 20:26:39 +00:00
qcow_utils qcow_utils: Enable disk/qcow feature 2023-05-11 16:30:19 +00:00
resources resource: system_allocator: introduce GPE allocator 2023-02-06 22:02:37 +00:00
riscv64 riscv64: update generate_pci_root return value 2023-08-01 20:22:56 +00:00
rutabaga_gfx rutabaga_gfx: expand wildcard data_model import 2023-08-16 19:35:38 +00:00
sandbox vhost-user: snd: Implement Windows broker & device setup 2023-02-28 21:34:01 +00:00
serde_keyvalue serde_keyvalue: add tests for outer-braces in arguments 2023-06-09 04:59:54 +00:00
src balloon: add optional response to adjust 2023-08-16 04:44:01 +00:00
swap swap: count resident pages even while vmm-swap is disabled 2023-07-26 01:23:18 +00:00
system_api system_api: Remove UserDataAuth 2023-08-15 11:08:04 +00:00
tests Enable parallel execution of plugin and e2e tests 2023-01-26 20:38:57 +00:00
third_party vmm_vhost: renumber SHARED_MEMORY_REGIONS 2023-08-07 17:41:47 +00:00
tools tools: contrib: Add memstats_chart 2023-08-10 02:17:22 +00:00
tpm2 Add conditional compilation for unix-only crates 2023-01-19 21:21:59 +00:00
tpm2-sys Uprev the libtpm2 to 96017dcdb110 2023-03-07 04:05:49 +00:00
tube_transporter crosvm: Uprev rust toolchain and dev container 2023-02-08 20:26:30 +00:00
usb_sys devices: usb: Support Bulk Streams 2023-08-07 08:39:35 +00:00
usb_util devices: usb: Support Bulk Streams 2023-08-07 08:39:35 +00:00
vendor crash_report: refactor product specific code 2023-06-09 23:10:04 +00:00
vfio_sys acpi: x86: add support for ACPI Notify() forwarding 2023-07-27 11:30:18 +00:00
vhost crosvm: Add vhost scmi support 2023-06-22 23:25:03 +00:00
virtio_sys virtio: vsock: send TRANSPORT_RESET event on restore 2023-07-14 21:27:23 +00:00
vm_control balloon: add optional response to adjust 2023-08-16 04:44:01 +00:00
vm_memory clippy fixes for Rust 1.70 and 1.71 2023-07-13 20:29:05 +00:00
win_audio net_util/win_audio: Do not use cfg conditional compilation in build.rs 2023-05-09 20:27:26 +00:00
win_util metrics: upstream local metrics related changes 2023-06-13 21:57:14 +00:00
x86_64 Cargo.toml: add version to chrono dependencies 2023-08-11 21:02:25 +00:00
.dockerignore
.envrc Automatically register tools/ on PATH 2023-03-03 00:33:15 +00:00
.gitignore Automatically register tools/ on PATH 2023-03-03 00:33:15 +00:00
.gitmodules third_party: Add crosvm/perfetto submodule 2023-07-21 05:01:47 +00:00
.rustfmt.toml
ARCHITECTURE.md docs: book: update architecture docs 2023-06-01 22:37:17 +00:00
Cargo.lock Replace internal p9 with crates.io versio 2023-08-14 18:34:51 +00:00
Cargo.toml Replace internal p9 with crates.io versio 2023-08-14 18:34:51 +00:00
CONTRIBUTING.md CONTRIBUTION.md : update incorrect command in docs 2023-08-03 19:36:52 +00:00
DIR_METADATA DIR_METADATA: Add public buganizer component 2022-09-21 17:43:59 +00:00
LICENSE Update all copyright headers to match new style 2022-09-13 18:41:29 +00:00
mypy.ini
OWNERS OWNERS: Add takayas@ to OWNERS 2023-04-24 11:15:25 +00:00
OWNERS_COUNCIL Require council review for changes to Cargo.lock 2022-12-01 18:50:48 +00:00
PRESUBMIT.cfg Cleanup: Remove old, deprecated and no longer used files 2022-09-20 21:05:57 +00:00
pyproject.toml
README.chromeos.md
README.md Fix remaining Chrome/Chromium OS instances 2023-01-03 22:14:30 +00:00
rust-toolchain Upgrade to 1.68.2: Set default version and rebuild container 2023-05-25 18:30:55 +00:00

crosvm - The ChromeOS Virtual Machine Monitor

crosvm is a virtual machine monitor (VMM) based on Linuxs KVM hypervisor, with a focus on simplicity, security, and speed. crosvm is intended to run Linux guests, originally as a security boundary for running native applications on the ChromeOS platform. Compared to QEMU, crosvm doesnt emulate architectures or real hardware, instead concentrating on paravirtualized devices, such as the virtio standard.

crosvm is currently used to run Linux/Android guests on ChromeOS devices.

Logo