Skip to content

Commit

Permalink
nfsd: require an explicit option to enable pNFS
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: J. Bruce Fields <[email protected]>
  • Loading branch information
Christoph Hellwig authored and J. Bruce Fields committed Mar 30, 2015
1 parent 7890203 commit f3f0333
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fs/nfsd/nfs4layouts.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ void nfsd4_setup_layout_type(struct svc_export *exp)
{
struct super_block *sb = exp->ex_path.mnt->mnt_sb;

if (exp->ex_flags & NFSEXP_NOPNFS)
if (!(exp->ex_flags & NFSEXP_PNFS))
return;

if (sb->s_export_op->get_uuid &&
Expand Down
2 changes: 1 addition & 1 deletion include/uapi/linux/nfsd/export.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
* exported filesystem.
*/
#define NFSEXP_V4ROOT 0x10000
#define NFSEXP_NOPNFS 0x20000
#define NFSEXP_PNFS 0x20000

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

0 comments on commit f3f0333

Please sign in to comment.