summaryrefslogtreecommitdiffstats
path: root/support
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2015-04-02 11:49:42 -0400
committerSteve Dickson <steved@redhat.com>2015-04-02 11:57:36 -0400
commitcdd16bef988a36868a7105c14d4665a53c1c5481 (patch)
treeb2c392078a100cf0b82b1f33c7e9c7097a92302b /support
parentd1f6583a5ff32711a1da1d4a13a29a5700f63504 (diff)
downloadnfs-utils-cdd16bef988a36868a7105c14d4665a53c1c5481.tar.gz
nfs-utils-cdd16bef988a36868a7105c14d4665a53c1c5481.tar.xz
nfs-utils-cdd16bef988a36868a7105c14d4665a53c1c5481.zip
nfs-utils: add support for the "pnfs" export option
This goes along with the patch just sent to Bruce to make pnfs support conditional. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'support')
-rw-r--r--support/include/nfs/export.h1
-rw-r--r--support/nfs/exports.c5
2 files changed, 6 insertions, 0 deletions
diff --git a/support/include/nfs/export.h b/support/include/nfs/export.h
index 2f59e6a..1194255 100644
--- a/support/include/nfs/export.h
+++ b/support/include/nfs/export.h
@@ -26,6 +26,7 @@
#define NFSEXP_CROSSMOUNT 0x4000
#define NFSEXP_NOACL 0x8000 /* reserved for possible ACL related use */
#define NFSEXP_V4ROOT 0x10000
+#define NFSEXP_PNFS 0x20000
/*
* All flags supported by the kernel before addition of the
* export_features interface:
diff --git a/support/nfs/exports.c b/support/nfs/exports.c
index 4b17d3c..9b325b9 100644
--- a/support/nfs/exports.c
+++ b/support/nfs/exports.c
@@ -275,6 +275,7 @@ putexportent(struct exportent *ep)
"no_" : "");
if (ep->e_flags & NFSEXP_NOREADDIRPLUS)
fprintf(fp, "nordirplus,");
+ fprintf(fp, "%spnfs", (ep->e_flags & NFSEXP_PNFS)? "" : "no_");
if (ep->e_flags & NFSEXP_FSID) {
fprintf(fp, "fsid=%d,", ep->e_fsid);
}
@@ -581,6 +582,10 @@ parseopts(char *cp, struct exportent *ep, int warn, int *had_subtree_opt_ptr)
clearflags(NFSEXP_NOACL, active, ep);
else if (strcmp(opt, "no_acl") == 0)
setflags(NFSEXP_NOACL, active, ep);
+ else if (!strcmp(opt, "pnfs"))
+ setflags(NFSEXP_PNFS, active, ep);
+ else if (!strcmp(opt, "no_pnfs"))
+ clearflags(NFSEXP_PNFS, active, ep);
else if (strncmp(opt, "anonuid=", 8) == 0) {
char *oe;
ep->e_anonuid = strtol(opt+8, &oe, 10);