Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

nfsd: require an explicit option to enable pNFS

Turns out sending out layouts to any client is a bad idea if they
can't get at the storage device, so require explicit admin action
to enable pNFS.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>

authored by

Christoph Hellwig and committed by
J. Bruce Fields
f3f03330 7890203d

+2 -2
+1 -1
fs/nfsd/nfs4layouts.c
··· 118 118 { 119 119 struct super_block *sb = exp->ex_path.mnt->mnt_sb; 120 120 121 - if (exp->ex_flags & NFSEXP_NOPNFS) 121 + if (!(exp->ex_flags & NFSEXP_PNFS)) 122 122 return; 123 123 124 124 if (sb->s_export_op->get_uuid &&
+1 -1
include/uapi/linux/nfsd/export.h
··· 47 47 * exported filesystem. 48 48 */ 49 49 #define NFSEXP_V4ROOT 0x10000 50 - #define NFSEXP_NOPNFS 0x20000 50 + #define NFSEXP_PNFS 0x20000 51 51 52 52 /* All flags that we claim to support. (Note we don't support NOACL.) */ 53 53 #define NFSEXP_ALLFLAGS 0x3FE7F