cloud-hypervisor/block_util
Wei Liu e1151482fc block_util: handle synchronized read/write/fsync idiomatically
Previously mutex (semaphore) and file were separated. The code needed to
create artificial scopes to use mutex to protect file.

Rewrite the code to be idiomatic. The file itself is turned into a trait
object and placed inside the mutex. This requires providing a new
ReadWriteSeekFile trait to unify all helper functions.

The rewrite further simplified vhdx_sync code. The original code
contained two mutex'es for no apparent reason.

No functional change intended.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
2021-12-06 09:23:51 +00:00
..
src block_util: handle synchronized read/write/fsync idiomatically 2021-12-06 09:23:51 +00:00
Cargo.toml build: bump libc from 0.2.107 to 0.2.108 2021-11-23 00:05:13 +00:00