mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vhost_user_fs: add a flag to disable extended attributes
Extended attributes (xattr) support has a huge impact on write performance. The reason for this is that, if enabled, FUSE sends a setxattr request after each write operation, and due to the inode locking inside the kernel during said request, the ability to execute the operations in parallel becomes heavily limited. Signed-off-by: Sergio Lopez <slp@redhat.com>
This commit is contained in:
committed by
Rob Bradford
parent
710520e9a1
commit
07cc73bddc
@@ -289,6 +289,11 @@ fn main() {
|
||||
.takes_value(true)
|
||||
.min_values(1),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("disable-xattr")
|
||||
.long("disable-xattr")
|
||||
.help("Disable support for extended attributes"),
|
||||
)
|
||||
.get_matches();
|
||||
|
||||
// Retrieve arguments
|
||||
@@ -302,12 +307,14 @@ fn main() {
|
||||
Some(size) => size.parse().expect("Invalid argument for thread-pool-size"),
|
||||
None => THREAD_POOL_SIZE,
|
||||
};
|
||||
let xattr: bool = !cmd_arguments.is_present("disable-xattr");
|
||||
|
||||
// Convert into appropriate types
|
||||
let sock = String::from(sock);
|
||||
|
||||
let fs_cfg = passthrough::Config {
|
||||
root_dir: shared_dir.to_string(),
|
||||
xattr,
|
||||
..Default::default()
|
||||
};
|
||||
let fs = PassthroughFs::new(fs_cfg).unwrap();
|
||||
|
||||
Reference in New Issue
Block a user