crosvm/disk/src
Takaya Saeki 205297ef95 disk: add try_clone method to DiskFile trait
Introduce `try_clone` method to `DiskFile` trait. This allows callers to
create DiskFile instances which share the same underlying file
descriptors, which enables you to manipulate them in multiple threads in
parallel. virtio-blk requires this change to run multiple worker threads
in parallel.

Note `try_clone` is introduced as a method of `DiskFile`, not as a
standalone `TryClone`, since such `TryClone` trait is not an object-safe
and thus cannot be defined actually.

BUG=b:267716786
TEST=build passes

Change-Id: I8aae4ee08992de2649b7157b8dfe7328751208b5
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4281742
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Takaya Saeki <takayas@chromium.org>
2023-03-02 08:52:56 +00:00
..
qcow disk: add try_clone method to DiskFile trait 2023-03-02 08:52:56 +00:00
sys devices: virtio: block: impl DiskOption::open for Windows 2022-09-20 03:42:20 +00:00
android_sparse.rs disk: add try_clone method to DiskFile trait 2023-03-02 08:52:56 +00:00
asynchronous.rs disk: add PunchHoleMut trait 2023-02-22 01:53:38 +00:00
composite.rs disk: add try_clone method to DiskFile trait 2023-03-02 08:52:56 +00:00
disk.rs disk: add try_clone method to DiskFile trait 2023-03-02 08:52:56 +00:00
gpt.rs Update all copyright headers to match new style 2022-09-13 18:41:29 +00:00
sys.rs Update all copyright headers to match new style 2022-09-13 18:41:29 +00:00