mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vhost_user_fs: Add support for FOPEN_CACHE_DIR
Add support for FOPEN_CACHE_DIR, a flag that allows us to tell the guest that it's safe to cache a directory, introduced in FUSE 7.28. Signed-off-by: Sergio Lopez <slp@redhat.com>
This commit is contained in:
committed by
Rob Bradford
parent
97e2d5d266
commit
5eb903a509
@@ -558,7 +558,13 @@ impl PassthroughFs {
|
||||
OpenOptions::DIRECT_IO,
|
||||
flags & (libc::O_DIRECTORY as u32) == 0,
|
||||
),
|
||||
CachePolicy::Always => opts |= OpenOptions::KEEP_CACHE,
|
||||
CachePolicy::Always => {
|
||||
if flags & (libc::O_DIRECTORY as u32) == 0 {
|
||||
opts |= OpenOptions::KEEP_CACHE;
|
||||
} else {
|
||||
opts |= OpenOptions::CACHE_DIR;
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user