mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-25 05:03:05 +00:00
5767987e5f
This CL makes the following fundamental changes to cros_async: 1. Removes PollOrRing and replaces it with IoSourceExt, and the subtraits ReadAsync & WriteAsync. The blanket implementation of IoSourceExt has been dropped, and replaced with source specific implementations of the trait. Those implementations are where the code from PollOrRing has been moved. 2. Pinning for IoSource has been dropped from UringSource & the uring futures. This appears to be safe because the IoSource doesn't contain any self refs, or perform any operations beyond forwarding to the RegisteredSource. (The FD is duped before being passed to RingWakerState by RegisteredSource, so there doesn't seem to be any data which would require pinning.) 3. U64Source was replaced by EventAsync. It also switches all Error enums to use thiserror, which reduces boilerplate. BUG=None TEST=cargo test -p cros_async Cq-Depend: chromium:2421742 Change-Id: Ie1dd958da2e1f8dec1ae1fd8c0b4e754223d330d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2416996 Reviewed-by: Chirantan Ekbote <chirantan@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Noah Gold <nkgold@google.com>
27 lines
561 B
TOML
27 lines
561 B
TOML
[package]
|
|
name = "disk"
|
|
version = "0.1.0"
|
|
authors = ["The Chromium OS Authors"]
|
|
edition = "2018"
|
|
|
|
[lib]
|
|
path = "src/disk.rs"
|
|
|
|
[features]
|
|
composite-disk = ["protos", "protobuf"]
|
|
|
|
[dependencies]
|
|
async-trait = "0.1.36"
|
|
base = { path = "../base" }
|
|
libc = "*"
|
|
protobuf = { version = "2.3", optional = true }
|
|
remain = "*"
|
|
tempfile = "*"
|
|
cros_async = { path = "../cros_async" }
|
|
data_model = { path = "../data_model" }
|
|
protos = { path = "../protos", optional = true }
|
|
vm_memory = { path = "../vm_memory" }
|
|
|
|
[dependencies.futures]
|
|
version = "*"
|
|
default-features = false
|