Skip to content

Commit f3f0333

Browse files
Christoph HellwigJ. Bruce Fields
authored andcommitted
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>
1 parent 7890203 commit f3f0333

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎fs/nfsd/nfs4layouts.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ void nfsd4_setup_layout_type(struct svc_export *exp)
118118
{
119119
struct super_block *sb = exp->ex_path.mnt->mnt_sb;
120120

121-
if (exp->ex_flags & NFSEXP_NOPNFS)
121+
if (!(exp->ex_flags & NFSEXP_PNFS))
122122
return;
123123

124124
if (sb->s_export_op->get_uuid &&

‎include/uapi/linux/nfsd/export.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
* exported filesystem.
4848
*/
4949
#define NFSEXP_V4ROOT 0x10000
50-
#define NFSEXP_NOPNFS 0x20000
50+
#define NFSEXP_PNFS 0x20000
5151

5252
/* All flags that we claim to support. (Note we don't support NOACL.) */
5353
#define NFSEXP_ALLFLAGS 0x3FE7F

0 commit comments

Comments
 (0)