All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nfsd: clear NFSEXP_PNFS flags if not supports pnfs in kernel
@ 2015-04-05 15:13 Kinglong Mee
  2015-04-06 12:02 ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Kinglong Mee @ 2015-04-05 15:13 UTC (permalink / raw)
  To: J. Bruce Fields; +Cc: linux-nfs@vger.kernel.org, Christoph Hellwig, kinglongmee

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-04-06 19:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-05 15:13 [PATCH] nfsd: clear NFSEXP_PNFS flags if not supports pnfs in kernel Kinglong Mee
2015-04-06 12:02 ` Christoph Hellwig
2015-04-06 19:51   ` J. Bruce Fields

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.