diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2011-10-12 19:11:23 +0530 |
---|---|---|
committer | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2011-10-12 19:11:23 +0530 |
commit | d3ab98e6919e9491f8ed7ffe37af73d35a55e1ca (patch) | |
tree | 0e805d6c9a58229dbc51f92b3ff3ee9d430e1c02 /vl.c | |
parent | 5745e38afeaa15153c2209674fe37e1cbdd65707 (diff) | |
download | qemu-d3ab98e6919e9491f8ed7ffe37af73d35a55e1ca.zip qemu-d3ab98e6919e9491f8ed7ffe37af73d35a55e1ca.tar.gz qemu-d3ab98e6919e9491f8ed7ffe37af73d35a55e1ca.tar.bz2 |
hw/9pfs: Add new virtfs option writeout=immediate skip host page cache
writeout=immediate implies the after pwritev we do a sync_file_range.
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -2785,6 +2785,7 @@ int main(int argc, char **argv, char **envp) case QEMU_OPTION_virtfs: { QemuOpts *fsdev; QemuOpts *device; + const char *writeout; olist = qemu_find_opts("virtfs"); if (!olist) { @@ -2814,6 +2815,17 @@ int main(int argc, char **argv, char **envp) qemu_opt_get(opts, "mount_tag")); exit(1); } + + writeout = qemu_opt_get(opts, "writeout"); + if (writeout) { +#ifdef CONFIG_SYNC_FILE_RANGE + qemu_opt_set(fsdev, "writeout", writeout); +#else + fprintf(stderr, "writeout=immediate not supported on " + "this platform\n"); + exit(1); +#endif + } qemu_opt_set(fsdev, "fstype", qemu_opt_get(opts, "fstype")); qemu_opt_set(fsdev, "path", qemu_opt_get(opts, "path")); qemu_opt_set(fsdev, "security_model", |