Skip to content

Commit

Permalink
Set 9pfs mount cache option to mmap
Browse files Browse the repository at this point in the history
cache=loose or cache=fscache currently do not validate via host, which means that a file modified on the host does not mirror back in the guest without doing some deletion dance....

https://lore.kernel.org/lkml/CAFkjPTmVbyuA0jEAjYhsOsg-SE99yXgehmjqUZb4_uWS_L-ZTQ@mail.gmail.com/ 

mmap mode seems to be needed for `mmap` to actually work per https://wiki.qemu.org/Documentation/9p_root_fs#Boot_the_9p_Root_FS_System

Fixes #61
  • Loading branch information
chantra authored Feb 2, 2024
1 parent a7ace39 commit b21aaa1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/qemu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const SHARED_9P_FS_MOUNT_TAG: &str = "vmtest-shared";
const COMMAND_OUTPUT_PORT_NAME: &str = "org.qemu.virtio_serial.0";

const SHARED_9P_FS_MOUNT_PATH: &str = "/mnt/vmtest";
const MOUNT_OPTS_9P_FS: &str = "trans=virtio,cache=loose,msize=1048576";
const MOUNT_OPTS_9P_FS: &str = "trans=virtio,cache=mmap,msize=1048576";
const OVMF_PATHS: &[&str] = &[
// Fedora
"/usr/share/edk2/ovmf/OVMF_CODE.fd",
Expand Down

0 comments on commit b21aaa1

Please sign in to comment.