From: Christoph Hellwig <hch@lst.de>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: linux-nfs@vger.kernel.org, stable@vger.kernel.org
Subject: [PATCH 1/2] nfsd/blocklayout: pretend we can send deviceid notifications
Date: Mon, 27 Apr 2015 14:50:13 +0200 [thread overview]
Message-ID: <1430139014-28013-2-git-send-email-hch@lst.de> (raw)
In-Reply-To: <1430139014-28013-1-git-send-email-hch@lst.de>
Commit df52699e4fcef ("NFSv4.1: Don't cache deviceids that have no
notifications") causes the Linux NFS client stop caching deviceid
unless a server pretends to support deviceid notifications. While
this behavior is stupid and the language around this area in rfc5661
is a mess carified by an errata that I submittted, Trond insists
on this behavior. Not caching deviceids degrades block layout
performance massively as a GETDEVICEINFO is fairly expensive.
So add this hack to make the Linux client happy again.
Cc: stable@vger.kernel.org
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
fs/nfsd/blocklayout.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/fs/nfsd/blocklayout.c b/fs/nfsd/blocklayout.c
index 03d647b..cdefaa3 100644
--- a/fs/nfsd/blocklayout.c
+++ b/fs/nfsd/blocklayout.c
@@ -181,6 +181,17 @@ nfsd4_block_proc_layoutcommit(struct inode *inode,
}
const struct nfsd4_layout_ops bl_layout_ops = {
+ /*
+ * Pretend that we send notification to the client. This is a blatant
+ * lie to force recent Linux clients to cache our device IDs.
+ * We rarely ever change the device ID, so the harm of leaking deviceids
+ * for a while isn't too bad. Unfortunately RFC5661 is a complete mess
+ * in this regard, but I filed errata 4119 for this a while ago, and
+ * hopefully the Linux client will eventually start caching deviceids
+ * without this again.
+ */
+ .notify_types =
+ NOTIFY_DEVICEID4_DELETE | NOTIFY_DEVICEID4_CHANGE,
.proc_getdeviceinfo = nfsd4_block_proc_getdeviceinfo,
.encode_getdeviceinfo = nfsd4_block_encode_getdeviceinfo,
.proc_layoutget = nfsd4_block_proc_layoutget,
--
1.9.1
next prev parent reply other threads:[~2015-04-27 12:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-27 12:50 two pNFS server fixes for 4.1, V2 Christoph Hellwig
2015-04-27 12:50 ` Christoph Hellwig [this message]
2015-04-27 20:36 ` [PATCH 1/2] nfsd/blocklayout: pretend we can send deviceid notifications J. Bruce Fields
2015-04-27 12:50 ` [PATCH 2/2] nfsd: fix pNFS return on close semantics Christoph Hellwig
2015-04-27 20:39 ` J. Bruce Fields
2015-04-27 23:30 ` Jeff Layton
2015-04-28 8:14 ` Christoph Hellwig
2015-04-28 16:03 ` J. Bruce Fields
2015-04-28 17:49 ` Christoph Hellwig
2015-04-28 17:54 ` Trond Myklebust
2015-04-28 18:11 ` Christoph Hellwig
2015-04-28 15:51 ` J. Bruce Fields
-- strict thread matches above, loose matches on Subject: below --
2015-04-26 15:48 two pNFS server fixes for 4.1 Christoph Hellwig
2015-04-26 15:48 ` [PATCH 1/2] nfsd/blocklayout: pretend we can send deviceid notifications Christoph Hellwig
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=1430139014-28013-2-git-send-email-hch@lst.de \
--to=hch@lst.de \
--cc=bfields@fieldses.org \
--cc=linux-nfs@vger.kernel.org \
--cc=stable@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.