vhost_user_fs: Add file traits to handle writing volatile memory

The vm_memory implementation for VolatileSlice is able to read and write
to a source or destination which implements a Read or Write trait.

Unfortunately, this is not enough for this specific use case as we need
to be able to write to a file at a specific offset, which is not
provided by the Read or Write trait.

This code has been ported over from crosvm commit
961461350c0b6824e5f20655031bf6c6bf6b7c30.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf
2019-11-01 09:56:06 -07:00
committed by Samuel Ortiz
parent e33ccb0c95
commit 5f7935f8e0
2 changed files with 410 additions and 0 deletions

View File

@@ -5,6 +5,7 @@
#[macro_use]
extern crate log;
pub mod file_traits;
pub mod filesystem;
pub mod fuse;
pub mod multikey;