From: Kinglong Mee <kinglongmee@gmail.com>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: "linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
Christoph Hellwig <hch@infradead.org>,
kinglongmee@gmail.com
Subject: [PATCH] nfsd: clear NFSEXP_PNFS flags if not supports pnfs in kernel
Date: Sun, 05 Apr 2015 23:13:27 +0800 [thread overview]
Message-ID: <55215117.2050504@gmail.com> (raw)
nfsd should not show "pnfs" flag in proc file if the filesystem
does not support pnfs.
# cat /proc/fs/nfsd/exports
# Version 1.1
# Path Client(Flags) # IPs
/testfs *(rw,insecure,no_root_squash,sync,wdelay,no_subtree_check,pnfs,fsid=0,uuid=37b07525:dc5e4203:99cc71b0:3df9dfa5,sec=1)
Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
---
fs/nfsd/nfs4layouts.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/nfsd/nfs4layouts.c b/fs/nfsd/nfs4layouts.c
index 6904213..f4c9bf3 100644
--- a/fs/nfsd/nfs4layouts.c
+++ b/fs/nfsd/nfs4layouts.c
@@ -125,6 +125,8 @@ void nfsd4_setup_layout_type(struct svc_export *exp)
sb->s_export_op->map_blocks &&
sb->s_export_op->commit_blocks)
exp->ex_layout_type = LAYOUT_BLOCK_VOLUME;
+ else
+ exp->ex_flags &= ~NFSEXP_PNFS;
}
static void
--
2.3.4
next reply other threads:[~2015-04-05 15:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-05 15:13 Kinglong Mee [this message]
2015-04-06 12:02 ` [PATCH] nfsd: clear NFSEXP_PNFS flags if not supports pnfs in kernel Christoph Hellwig
2015-04-06 19:51 ` J. Bruce Fields
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=55215117.2050504@gmail.com \
--to=kinglongmee@gmail.com \
--cc=bfields@fieldses.org \
--cc=hch@infradead.org \
--cc=linux-nfs@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.