diff options
author | Christoph Hellwig <hch@lst.de> | 2015-03-30 12:46:29 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2015-03-30 16:05:26 -0400 |
commit | f3f03330dee0526d82f2a0fd1a79d207ed1ac439 (patch) | |
tree | 2f7ea57e37e8773da62c159164c0f41ddb0aa766 | |
parent | 7890203da2cb9b861dae9bdb88f882f3e03baec9 (diff) |
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>
-rw-r--r-- | fs/nfsd/nfs4layouts.c | 2 | ||||
-rw-r--r-- | include/uapi/linux/nfsd/export.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfsd/nfs4layouts.c b/fs/nfsd/nfs4layouts.c index 80e236bf79fc..6904213a4363 100644 --- a/fs/nfsd/nfs4layouts.c +++ b/fs/nfsd/nfs4layouts.c | |||
@@ -118,7 +118,7 @@ void nfsd4_setup_layout_type(struct svc_export *exp) | |||
118 | { | 118 | { |
119 | struct super_block *sb = exp->ex_path.mnt->mnt_sb; | 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 | return; | 122 | return; |
123 | 123 | ||
124 | if (sb->s_export_op->get_uuid && | 124 | if (sb->s_export_op->get_uuid && |
diff --git a/include/uapi/linux/nfsd/export.h b/include/uapi/linux/nfsd/export.h index 4742f2cb42f2..d3bd6ffec041 100644 --- a/include/uapi/linux/nfsd/export.h +++ b/include/uapi/linux/nfsd/export.h | |||
@@ -47,7 +47,7 @@ | |||
47 | * exported filesystem. | 47 | * exported filesystem. |
48 | */ | 48 | */ |
49 | #define NFSEXP_V4ROOT 0x10000 | 49 | #define NFSEXP_V4ROOT 0x10000 |
50 | #define NFSEXP_NOPNFS 0x20000 | 50 | #define NFSEXP_PNFS 0x20000 |
51 | 51 | ||
52 | /* All flags that we claim to support. (Note we don't support NOACL.) */ | 52 | /* All flags that we claim to support. (Note we don't support NOACL.) */ |
53 | #define NFSEXP_ALLFLAGS 0x3FE7F | 53 | #define NFSEXP_ALLFLAGS 0x3FE7F |