From: jiangyiwen <jiangyiwen@huawei.com>
To: aneesh.kumar@linux.vnet.ibm.com, groug@kaod.org, qemu-devel@nongnu.org
Cc: sochin.jiang@huawei.com, Eduard.Shishkin@huawei.com
Subject: [Qemu-devel] [PATCH] Don't ignore O_DIRECT flag in the 9pfs server
Date: Fri, 17 Nov 2017 16:23:45 +0800 [thread overview]
Message-ID: <5A0E9C91.4050108@huawei.com> (raw)
Now v9fs in linux has already supported O_DIRECT(v9fs_direct_IO),
when guest user open file with O_DIRECT flag and return success,
so user hopes data doesn't pass through page cache, but 9pfs in
qemu ignore direct disk access and use host page cache, it is not
match to DIRECT_IO semantic, so we should not ignore O_DIRECT in
9pfs unless v9fs in linux don't support DIRECT_IO.
And if server fs don't support O_DIRECT, user will receive -EINVAL
and know the filesystem don't support O_DIRECT.
So in order to ensure semantic consistency, don't ignore direct
disk access in 9pfs.
Signed-off-by: Yiwen Jiang <jiangyiwen@huawei.com>
---
hw/9pfs/9p.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
index 52d4663..5ea01c4 100644
--- a/hw/9pfs/9p.c
+++ b/hw/9pfs/9p.c
@@ -155,10 +155,6 @@ static int get_dotl_openflags(V9fsState *s, int oflags)
*/
flags = dotl_to_open_flags(oflags);
flags &= ~(O_NOCTTY | O_ASYNC | O_CREAT);
- /*
- * Ignore direct disk access hint until the server supports it.
- */
- flags &= ~O_DIRECT;
return flags;
}
--
1.8.3.1
reply other threads:[~2017-11-17 8:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5A0E9C91.4050108@huawei.com \
--to=jiangyiwen@huawei.com \
--cc=Eduard.Shishkin@huawei.com \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=groug@kaod.org \
--cc=qemu-devel@nongnu.org \
--cc=sochin.jiang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).