From: Peter Lieven <pl@kamp.de>
To: qemu-block@nongnu.org
Cc: ronniesahlberg@gmail.com, jcody@redhat.com,
qemu-devel@nongnu.org, Peter Lieven <pl@kamp.de>
Subject: [Qemu-devel] [PATCH 2/2] block/nfs: refuse readahead if cache.direct is on
Date: Tue, 17 May 2016 16:11:55 +0200 [thread overview]
Message-ID: <1463494315-12578-3-git-send-email-pl@kamp.de> (raw)
In-Reply-To: <1463494315-12578-1-git-send-email-pl@kamp.de>
Signed-off-by: Peter Lieven <pl@kamp.de>
---
block/nfs.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/block/nfs.c b/block/nfs.c
index 975510f..8b73a35 100644
--- a/block/nfs.c
+++ b/block/nfs.c
@@ -331,6 +331,11 @@ static int64_t nfs_client_open(NFSClient *client, const char *filename,
nfs_set_tcp_syncnt(client->context, val);
#ifdef LIBNFS_FEATURE_READAHEAD
} else if (!strcmp(qp->p[i].name, "readahead")) {
+ if (open_flags & BDRV_O_NOCACHE) {
+ error_setg(errp, "Cannot enable NFS readahead "
+ "if cache.direct = on");
+ goto fail;
+ }
if (val > QEMU_NFS_MAX_READAHEAD_SIZE) {
error_report("NFS Warning: Truncating NFS readahead"
" size to %d", QEMU_NFS_MAX_READAHEAD_SIZE);
--
1.9.1
next prev parent reply other threads:[~2016-05-18 5:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-17 14:11 [Qemu-devel] [PATCH 0/2] block/nfs: add support for libnfs pagecache Peter Lieven
2016-05-17 14:11 ` [Qemu-devel] [PATCH 1/2] " Peter Lieven
2016-05-17 14:11 ` Peter Lieven [this message]
2016-05-18 13:28 ` [Qemu-devel] [PATCH 2/2] block/nfs: refuse readahead if cache.direct is on Jeff Cody
2016-05-19 6:03 ` Peter Lieven
2016-05-18 7:45 ` [Qemu-devel] [PATCH 0/2] block/nfs: add support for libnfs pagecache Fam Zheng
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=1463494315-12578-3-git-send-email-pl@kamp.de \
--to=pl@kamp.de \
--cc=jcody@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=ronniesahlberg@gmail.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).