From: Jeff Cody <jcody@redhat.com>
To: Peter Lieven <pl@kamp.de>
Cc: qemu-block@nongnu.org, ronniesahlberg@gmail.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/2] block/nfs: refuse readahead if cache.direct is on
Date: Wed, 18 May 2016 09:28:01 -0400 [thread overview]
Message-ID: <20160518132801.GB3668@localhost.localdomain> (raw)
In-Reply-To: <1463494315-12578-3-git-send-email-pl@kamp.de>
On Tue, May 17, 2016 at 04:11:55PM +0200, Peter Lieven wrote:
> 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
>
Do we to check for cache mode changes now in nfs_reopen_prepare()?
next prev parent reply other threads:[~2016-05-18 13:28 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 ` [Qemu-devel] [PATCH 2/2] block/nfs: refuse readahead if cache.direct is on Peter Lieven
2016-05-18 13:28 ` Jeff Cody [this message]
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=20160518132801.GB3668@localhost.localdomain \
--to=jcody@redhat.com \
--cc=pl@kamp.de \
--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).