aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/virtio-9p.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/virtio-9p.c b/hw/virtio-9p.c
index 6c807953e9..cb6366bcc6 100644
--- a/hw/virtio-9p.c
+++ b/hw/virtio-9p.c
@@ -1704,6 +1704,8 @@ static void v9fs_open_post_lstat(V9fsState *s, V9fsOpenState *vs, int err)
if (s->proto_version == V9FS_PROTO_2000L) {
flags = vs->mode;
flags &= ~(O_NOCTTY | O_ASYNC | O_CREAT);
+ /* Ignore direct disk access hint until the server supports it. */
+ flags &= ~O_DIRECT;
} else {
flags = omode_to_uflags(vs->mode);
}
@@ -1826,6 +1828,9 @@ static void v9fs_lcreate(V9fsState *s, V9fsPDU *pdu)
v9fs_string_sprintf(&vs->fullname, "%s/%s", vs->fidp->path.data,
vs->name.data);
+ /* Ignore direct disk access hint until the server supports it. */
+ flags &= ~O_DIRECT;
+
vs->fidp->fs.fd = v9fs_do_open2(s, vs->fullname.data, vs->fidp->uid,
gid, flags, mode);
v9fs_lcreate_post_do_open2(s, vs, err);