vhost_user_fs: Implement FileSystem trait for Passthrough

Add a "passthrough" file system implementation that just forwards its
requests to the appropriate system call.

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-10-31 13:09:20 -07:00 committed by Samuel Ortiz
parent 1b76c0a183
commit e33ccb0c95
4 changed files with 1557 additions and 0 deletions

1
Cargo.lock generated
View File

@ -1015,6 +1015,7 @@ version = "0.1.0"
dependencies = [
"bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
"vm-memory 0.1.0 (git+https://github.com/rust-vmm/vm-memory)",
]

View File

@ -7,4 +7,5 @@ edition = "2018"
[dependencies]
bitflags = "1.1.0"
libc = "0.2.65"
log = "0.4.8"
vm-memory = { git = "https://github.com/rust-vmm/vm-memory" }

View File

@ -2,6 +2,10 @@
//
// SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause
#[macro_use]
extern crate log;
pub mod filesystem;
pub mod fuse;
pub mod multikey;
pub mod passthrough;

File diff suppressed because it is too large Load Diff