Default already includes Sized, so the ?Sized is not useful.
Fixes a clippy warning in Rust 1.81.
BUG=b:365852007
Change-Id: I32a78e65153e63779cdafed4a35a542e22dd699e
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5852615
Reviewed-by: Frederick Mayle <fmayle@google.com>
Reviewed-by: Richard Zhang <rizhang@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Some doc comments were being incorrectly interpreted due to missing
indentation (for intentional line contintuations) or line breaks (for
new lines that were intended to be separate paragraphs).
Clippy warns about these as of Rust 1.80:
<https://rust-lang.github.io/rust-clippy/master/index.html#/doc_lazy_continuation>
Fix them along with some other nearby minor formatting cleanups.
TEST=tools/cargo-doc
TEST=tools/clippy # with rust-toolchain 1.80
Change-Id: Ice0b7cc3bd75d9ab08c10107a13f95ca9f87a0a3
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5758934
Auto-Submit: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Frederick Mayle <fmayle@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
With create_overlapped becoming a "must create" open call, the misuse of
it in a test where the file already existed became a hard failure. This
CL fixes that issue by moving to open_overlapped (as it should have been
before).
BUG=b:346381109
TEST=tested downstream
Change-Id: Id49739b8b32a23eabe78e8173d8c397a0b4607e2
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5630351
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Noah Gold <nkgold@google.com>
Ensure that every Cargo.toml dependency on a third-party crates.io crate
specifies at least a major version, or a minor version for 0.x crates,
to ensure that if a new major version is published, it cannot cause API
breaks.
The versions are selected to match the ones already in Cargo.lock, so
this should have no functional change, but it will help prevent new "*"
versions from being introduced via copy-and-paste.
For rationale, see the Cargo FAQ:
<https://doc.rust-lang.org/cargo/faq.html#can-libraries-use--as-a-version-for-their-dependencies>
`minijail`, `audio_streams`, and `cras` are left as "*" for now, since
they have unusual situations (imported from a submodule and/or replaced
at build time with ebuild magic).
BUG=None
TEST=tools/dev_container tools/presubmit
TEST=verify Cargo.lock is unchanged
Change-Id: Ifa18199f812f01d2d10bfb4146b3353c1a76527c
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5555656
Reviewed-by: Frederick Mayle <fmayle@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Those traits use RawDescriptor, which isn't useable directly in Windows
and so the users have to assume it is an Event undernearth and coerce it
back, usually using `EventAsync::clone_raw_without_reset`.
BUG=b:338274203
Change-Id: I2fbaa38e58cbd1ee154078f8d74e33c4dc61f0b9
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5539776
Reviewed-by: Noah Gold <nkgold@google.com>
Commit-Queue: Frederick Mayle <fmayle@google.com>
This functionality will also be used by a pure Tokio library for crosvm.
The API is now a single async function and is named to match the
underlying Windows API. The unit tests have been rewritten to not
require an async executor and should have a bit more test coverage.
BUG=b:338274203
Change-Id: Iff65ca088c74ce5c5ce396fdf7dcd9f1550ea545
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5536313
Commit-Queue: Frederick Mayle <fmayle@google.com>
Reviewed-by: Noah Gold <nkgold@google.com>
Was only needed for QcowFile, which can now use its internal mutex.
BUG=b:338274203
Change-Id: Iff684f5a25b0f488b006e05eebe913f92f404a2b
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5507756
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Frederick Mayle <fmayle@google.com>
See prior comment thread:
https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5454793/6..9//COMMIT_MSG#b12
`TimerTrait::reset` offers a very similar API to the `timerfd_settime`
system call, but in practice is almost used to set either a one-shot
timer, or a repeating timer with an initial timeout the same as the
repeating timeout.
`kqueue`'s timer functionality only supports the cases that are actually
used in practice. This change aligns the API with the way it is used,
and makes the distinction between the behavior of the arguments more
obvious.
Test: tools/presubmit
Test: cargo test -p base timer -- --ignored
Bug: 335486579
Change-Id: I1873ab9cccaf7a4b988431839964b1c253f76a34
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5463100
Commit-Queue: Cody Schuffelen <schuffelen@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
ChromeOS only has tokio version 1.29.1 vendored currently, so switch the
required version in Cargo.toml and update Cargo.lock to ensure we can
build against that version.
Since this is only a difference in minor version, newer versions of
tokio should also work for other downstream crosvm users.
The Cargo.lock update was done by:
cargo update -p tokio --precise 1.29.1
BUG=b:334109381
TEST=emerge-$BOARD
Change-Id: I5f67367258cd51145a1ff74246cb4e0f02f6a8be
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5450247
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Frederick Mayle <fmayle@google.com>
This uses tokio's utilities to re-schedule IO that would fail with a
"would block" error. The `IoSource` is chosen by the Executor based
on whether the file descriptor can be successfully added to the internal
epoll scheduler.
Specifically, AsyncFd::async_io is used for system calls that can fail
with EWOULDBLOCK, and spawn_blocking is used for system calls that will
always block.
Bug: b/320603688
Test: tools/presubmit
Test: cargo build --features=cros_async/tokio --target=x86_64-unknown-linux-gnu
Change-Id: Ibafbbe65d67cb88b5fcd0f18b00f504430c785c6
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5174967
Reviewed-by: Frederick Mayle <fmayle@google.com>
Commit-Queue: Cody Schuffelen <schuffelen@google.com>
Reviewed-by: Noah Gold <nkgold@google.com>
This is selectable with a new ExecutorKind. Rather than using the
common_executor backend, it uses tokio as the backend.
Bug: b/320603688
Test: tools/presubmit
Test: cargo build --features=cros_async/tokio --target=x86_64-unknown-linux-gnu
Change-Id: Ibf65b17077048f4ed1cce07fa985787b1eb1b6a3
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5174966
Commit-Queue: Cody Schuffelen <schuffelen@google.com>
Reviewed-by: Frederick Mayle <fmayle@google.com>
`Executor::with_kind_and_concurrency` exists only for the benefit of the
`ExecutorKindSys::Overlapped` enum variant, it's not used outside of
windows code and not used for `ExecutorKindSys::Handle`.
`DiskOption`'s `io_concurrency` value is used to override the
concurrency setting in the `ExecutorKind`.
Test: tools/presubmit
Change-Id: Idd59d78283038ab6f986953f846cd70ef25d4324
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5315960
Reviewed-by: Frederick Mayle <fmayle@google.com>
Commit-Queue: Cody Schuffelen <schuffelen@google.com>
Reviewed-by: Noah Gold <nkgold@google.com>
Instead of a dispatch enum defined for windows and a dispatch enum
defined for linux, there is now one dispatch enum with branches defined
for the two platforms. This makes it so defining the tokio executor
later only has to be added in one place.
Bug: b/320603688
Test: tools/dev_container tools/presubmit
Test: tools/dev_container tools/presubmit clippy
Change-Id: I6eaf46710bbb54a9684cb1622da36c3026906a5c
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5208332
Commit-Queue: Cody Schuffelen <schuffelen@google.com>
Reviewed-by: Frederick Mayle <fmayle@google.com>
ExecutorTrait is not object safe, but this still forces some type
signature alignment.
Bug: b/320603688
Test: tools/presubmit && tools/presubmit clippy
Change-Id: I241d61b8c519aaf01264c1b82de3d496d0e1626f
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5251105
Commit-Queue: Cody Schuffelen <schuffelen@google.com>
Reviewed-by: Frederick Mayle <fmayle@google.com>
ExecutorTrait is not object safe, but it can be used together with a
library like enum_dispatch to still have a kind of polymorphism.
Bug: b/320603688
Test: tools/presubmit
Change-Id: Ied449fcc497426e4d9fb0381f9f800a70d884f49
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5251104
Reviewed-by: Frederick Mayle <fmayle@google.com>
Commit-Queue: Cody Schuffelen <schuffelen@google.com>
This follows the pattern used for IoSource to define a dispatch enum
that selects between implementations which may be on different
platforms.
Bug: b/320603688
Test: tools/presubmit
Change-Id: I8c0b1ddadb17d7f3f5dd45734333a9f6ef596cab
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5207890
Commit-Queue: Cody Schuffelen <schuffelen@google.com>
Reviewed-by: Frederick Mayle <fmayle@google.com>
Before the sequence was something like
1. take lock
2. compute a condition
3. release lock
4. check the condition
5. take lock again
6. wait on condvar
Between steps 3 and 5 someone else could take the lock and send a
notification that would then never be seen by step 6, potentially
resulting a deadlock.
BUG=b:321975174
Change-Id: I1bd329d3de43bf9b68feae80c5b87c9b0eb9aef4
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5320156
Reviewed-by: Noah Gold <nkgold@google.com>
Reviewed-by: Richard Zhang <rizhang@google.com>
Commit-Queue: Frederick Mayle <fmayle@google.com>
Until the tokio executor is implemented, there are only
platform-specific executors.
Bug: b/320603688
Test: tools/presubmit
Change-Id: I380a6b61f6f6a0cca2fbd3e89d63a2c9c8d051ef
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5201658
Reviewed-by: Noah Gold <nkgold@google.com>
Commit-Queue: Cody Schuffelen <schuffelen@google.com>
Every caller passes `true`. If a hypothetical future caller wants pipe
descriptors that are not O_CLOEXEC, then they can use `pipe()` plus
`clear_descriptor_cloexec()`.
BUG=None
TEST=tools/dev_container tools/presubmit
Change-Id: If9aa62653e00a163824157819ddd2fce849fe348
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5251099
Reviewed-by: Frederick Mayle <fmayle@google.com>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
I don't know if the relaxed ops are wrong, but they aren't clearly
correct.
Change-Id: Ie67b8ea3b4913e91182f6863514a5d47beb1615e
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5246698
Commit-Queue: Frederick Mayle <fmayle@google.com>
Reviewed-by: Noah Gold <nkgold@google.com>
This will fix a bug where the block device on Windows will panic when the CrosVm is being shutdown.
Bug=b:319154589
TEST=tested downstream, verified there is no panic
Change-Id: I73d9a63d51a1d8d7c9fe44a8bb85488f5f4304dd
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5214790
Reviewed-by: Frederick Mayle <fmayle@google.com>
Commit-Queue: Richard Zhang <rizhang@google.com>
CancellableBlockingPool's Drop already did the same thing, except it
didn't print the error.
This allows changing `source: Option<T>` to `source: T`.
BUG=b:319154589
Change-Id: I66b1edd0f04c9bca31d4535ae33bed00c3e131dc
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5207539
Reviewed-by: Noah Gold <nkgold@google.com>
Commit-Queue: Frederick Mayle <fmayle@google.com>
Reviewed-by: Richard Zhang <rizhang@google.com>
multi-handle feature
Without the "into_source" implementation, the blk device will crash
for Windows.
BUG=b:319154589
TEST=tested downstream to verify this works on Windows
Change-Id: Ida383104e7a05f0f891f4ee99b3ce322e7eda64d
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5201258
Commit-Queue: Richard Zhang <rizhang@google.com>
Reviewed-by: Noah Gold <nkgold@google.com>
Nothing needs an IO future to be `Send` at the moment, but that is
mostly a legacy of cros_async not supporting it until recently. This
compile time test will keep it from regressing.
BUG=b:271297810
Change-Id: Ib966740e1c563e675982326edd3bc055363b193f
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5124626
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Frederick Mayle <fmayle@google.com>
https://crrev.com/c/5019243 added a `once_cell::unsync::OnceCell` to
`IoSource`, making it `!Sync`, which, by definition, makes `&IoSource`
`!Send` and so (nearly) any future that does IO will be `!Send`.
This commit removes the `OnceCell` from `IoSource`, making it `Sync`
again. Instead, we eagerly check whether a backing file is a block
device when the file is converted to an `AsyncDisk` so that the result
is a plain `bool` and move the branch into `SingleDiskFile::punch_hole`.
The other `AsyncDisk` implementors don't need this logic.
"android_sparse" is read-only (i.e. you can't punch a hole).
"composite_disk" delegates hole punching to the backing disk.
"qcow" might benefit from it, but it doesn't use async yet, so
there is no regression.
BUG=b:271297810
Change-Id: Ifd1d2361adabfd4db1b48e71d3a3a31e57a0cfb1
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5086673
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Futures that use `IoSource` methods can't be sent across threads because
they might be backed by an overlapped op, which contains raw pointers.
This makes `Executor::spawn` virtually unusable.
`OVERLAPPED` creation has been moved into `OverlappedOperation::new` so
that it is harder to keep one on the stack of an async function (and
inadvertently make it `!Send`).
A new type, `BoxedOverlapped`, is has been added as a workaround to mark
`OVERLAPPED` as `Send` and `Sync`. The `Pin` wasn't needed and has been
removed.
There is a similar issue on the linux side. I'll add a test after it is
fixed.
BUG=b:271297810
Change-Id: Ibfb5a9a47bdf731e0647d4813c7bb2f4a3db8299
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5086672
Commit-Queue: Frederick Mayle <fmayle@google.com>
Reviewed-by: Vikram Auradkar <auradkar@google.com>
All the fields are `Send`, so `EventAsync` is implicitly `Send`.
This was probably added originally because the predecessor to `IoSource`
was always `!Send` even when the underlying type was `Send`.
BUG=b:271297810
Change-Id: If72de71c6f37c72f5b791391c657d1234d9f765f
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5086674
Commit-Queue: Frederick Mayle <fmayle@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
IoBuf is defined in a platform-specific way (it is either iovec on unix
or WSABUF for windows), so it fits into the mission statement of the
base crate, which is meant to be *the* platform abstraction layer in
crosvm.
IoBufMut and VolatileMemory/VolatileSlice are defined in terms of IoBuf,
so they are also moved into base for consistency. Every crate that uses
these types already depended on base, so no extra dependencies are
added, and a few can be removed.
BUG=b:312312646
TEST=tools/dev_container tools/presubmit
Change-Id: I4dddc55d46906dfc55b88e8e6a967d7e1c1922dd
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5046605
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
`AsRawDescriptor` is preferred over `AsRawFd` everywhere. This commit
replaces `AsRawFd` of the file related helpers in base except functions
which explicitly intend to handle FDs such as `validate_raw_fd` or
`get_fd_flags`.
BUG=None
TEST=./tools/presubmit
Change-Id: Ia0f1b149bf281a97dfe754fd20e3d9d898539df1
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5020382
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Takaya Saeki <takayas@chromium.org>
Currently, `punch_hole` operation is translated to
`fallocate(PUNCH_HOLE|KEEP_SIZE)`. However, this does not work as
expected if the target file is a block device file such as an LVM
partition block file. It does not succeed and the area will not be
reclaimed, which is causing a problem on ARCVM.
The right way to punch-hole a block device file is calling
`ioctl(BLKDISCARD)`. This change fixes `PollSource`, `UringSource`,
and the default implementation of `PunchHole` trait.
BUG=b:302437024
TEST=./tools/presubmit
TEST=`strace -f -e ioctl crosvm run ... --block \
path=/dev/glinux_20230808/test_lv kernel` and `blkdiscard /dev/vda`
inside, then confirmed BLKDISCARD with epoll and io_uring
Change-Id: Ibedecd2c401bbb9ab25d7f0bfe18a3334f79ea85
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5019243
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Takaya Saeki <takayas@chromium.org>
Currently, cros_async's async IO source provides async `fallocate`
function, and `punch_hole` and `write_zeroes_at` are delegated to
`fallocate`. However, this design has three rooms for improvements.
1. Actually, no one calls async `fallocate`.
2. We have duplicated `fallocate` and `AllocateMode` implementations in
`base::sys`.
3. Windows has to pretend to have `fallocate` to provide `punch_hole`
and `write_zeroes_at`
So, this change removes `fallocate` and `AllocateMode`, which no one
actually calls, from `IoSource` and deletegate it to `base::sys`. With
this, we don't have to maintain `fallocate` implementation in
cros_async.
This will also enable us to call a non-`fallocate` systemcall in
`punch_hole` implementation which will be necessary to correctly support
block files.
BUG=b:302437024
TEST=./tools/presubmit
Change-Id: I8e7fcd94380da980cc52e6f751b134fa325d7b39
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5019241
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Noah Gold <nkgold@google.com>
Commit-Queue: Takaya Saeki <takayas@chromium.org>
Remove pointer casts where the target type is the same as the original.
Change-Id: Ibb7bda2e4afcb5df2cd7c0bd9a075d0288b69f67
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5005512
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Windows needs N threads to poll to complete N IOs concurrently.
The patch createn 'n' concurrent threads that are passed as DiskOption
Bug: 303249046
Test: Ran tests downstream to verify that N ios are running in parallel
Change-Id: I9c1c101993e6ecbf99213218341cc77544fbd6bc
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4985161
Auto-Submit: Vikram Auradkar <auradkar@google.com>
Reviewed-by: Noah Gold <nkgold@google.com>
Commit-Queue: Vikram Auradkar <auradkar@google.com>
The timeout for all pool shutdowns was set to 100 ms in a previous
change in order to make the tests run faster:
<https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4004299>
However, this can lead to flakiness if the system is under load while
the tests are executing. This change makes some more careful timeout
choices to improve reliability without extending the overall time it
takes to run the tests.
Most of the shutdown_with_timeout(100ms) calls are replaced with the
normal shutdown() function, which uses a 5-second timeout. These
shutdown() calls are expected to return immediately (either because of a
non-timeout error condition or because all pool tasks are already
finished), and we can be sure that this 5-second timeout is never
relevant because all of the cros_async tests execute in under 5 seconds.
This should fix a flaky test that was observed in practice where the
disarm_with_pending_work() test would not finish shutting down in the
(rather short) 100 ms timeout previously allowed.
The shutdown_with_blocked_work timeout is reduced from the original 100
ms to 1 ms, since it should not affect the correctness of the test and
will help it run even faster. This test is also renamed to match the
actual behavior - it used to mention "panic", but the shutdown function
simply returns an error and does not panic.
Finally, the shutdown_in_progress() test now uses two different
timeouts. This test spawns a thread that waits until shutdown is in
progress, then calls the normal shutdown() function to ensure it returns
the correct error; this shutdown() call should return immediately, so
again the 5-second timeout is not relevant. The main thread of the test
now uses a timeout of 200 ms, which should be sufficient to ensure the
other thread has time to start up and reach the shutdown() call while
observing the shutdown_in_progress flag. This extends the test time
somewhat relative to the previous 100 ms timeout, but that is mostly
traded off with the timeout reduction in the blocked work test, so the
overall test time should be about the same as before. This is probably
the most likely test to be flaky going forward, since it relies on OS
thread scheduling behavior; if any problems are observed, we can
consider making the timeout longer, although this will slow down the
tests.
BUG=b:306726068
TEST=tools/dev_container tools/presubmit
TEST=time cargo test -p cros_async
Change-Id: Ic6ec117d616ae7c99a8e3c5a4fe6dd1169c72286
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4961353
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Updates are made to source and documentation.
This more accurately represents the currently supported platforms of
Android/Linux and Windows, without unexpectedly including other
unix-like operating systems.
Command to reproduce:
$ find . -type f -not -path '*/\.git/*' | xargs -I {} sed -i 's/cfg(unix)/cfg(any(target_os = "android", target_os = "linux"))/g' {}
$ cargo fmt
md files manually updated to fix line lengths.
Renaming `unix` modules to `linux` will be done in a later CL.
Test: ./tools/dev_container ./tools/presubmit
Bug: b/298269162
Change-Id: I42c1bf0abf80b9a0df25551613910293217c7295
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4909059
Commit-Queue: Cody Schuffelen <schuffelen@google.com>
Reviewed-by: Frederick Mayle <fmayle@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Noah Gold <nkgold@google.com>
As usual, some unsorted and grouped imports have appeared.
Change-Id: I79b51e4c52cee38f5b8c238e46dfe3193c753554
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4847980
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
There will be fewer `fctl` and `close` syscalls when performing IO,
which might help performance, but a simple FIO benchmark didn't reveal
any gains. The strace output looks cleaner.
Change-Id: I11b2cde23d7951c209a48c19194fd0de15d43f8f
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4722169
Commit-Queue: Frederick Mayle <fmayle@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>