linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] nfs-utils: add support for the "pnfs" export option
@ 2015-04-02  8:43 Christoph Hellwig
  2015-04-02 17:22 ` Steve Dickson
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2015-04-02  8:43 UTC (permalink / raw)
  To: Steve Dickson; +Cc: linux-nfs

This goes along with the patch just sent to Bruce to make pnfs
support conditional.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 support/include/nfs/export.h | 1 +
 support/nfs/exports.c        | 5 +++++
 utils/exportfs/exportfs.c    | 2 ++
 utils/exportfs/exports.man   | 9 +++++++++
 4 files changed, 17 insertions(+)

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);
diff --git a/utils/exportfs/exportfs.c b/utils/exportfs/exportfs.c
index 48eac00..8758231 100644
--- a/utils/exportfs/exportfs.c
+++ b/utils/exportfs/exportfs.c
@@ -821,6 +821,8 @@ dump(int verbose, int export_format)
 				c = dumpopt(c, "nordirplus");
 			if (ep->e_flags & NFSEXP_NOACL)
 				c = dumpopt(c, "no_acl");
+			if (ep->e_flags & NFSEXP_PNFS)
+				c = dumpopt(c, "pnfs");
 			if (ep->e_flags & NFSEXP_FSID)
 				c = dumpopt(c, "fsid=%d", ep->e_fsid);
 			if (ep->e_uuid)
diff --git a/utils/exportfs/exports.man b/utils/exportfs/exports.man
index 88d9fbe..9309246 100644
--- a/utils/exportfs/exports.man
+++ b/utils/exportfs/exports.man
@@ -408,6 +408,15 @@ If the client asks for alternative locations for the export point, it
 will be given this list of alternatives. (Note that actual replication
 of the filesystem must be handled elsewhere.)
 
+.TP
+.IR pnfs
+This option allows enables the use of pNFS extension if protocol level
+is NFSv4.1 or higher, and the filesystem supports pNFS exports.  With
+pNFS clients can bypass the server and perform I/O directly to storage
+devices. The default can be explicitly requested with the
+.I no_pnfs
+option.
+
 .SS User ID Mapping
 .PP
 .B nfsd
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v3] nfs-utils: add support for the "pnfs" export option
  2015-04-02  8:43 [PATCH v3] nfs-utils: add support for the "pnfs" export option Christoph Hellwig
@ 2015-04-02 17:22 ` Steve Dickson
  0 siblings, 0 replies; 2+ messages in thread
From: Steve Dickson @ 2015-04-02 17:22 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-nfs



On 04/02/2015 04:43 AM, Christoph Hellwig wrote:
> This goes along with the patch just sent to Bruce to make pnfs
> support conditional.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Committed.. 

steved.

> ---
>  support/include/nfs/export.h | 1 +
>  support/nfs/exports.c        | 5 +++++
>  utils/exportfs/exportfs.c    | 2 ++
>  utils/exportfs/exports.man   | 9 +++++++++
>  4 files changed, 17 insertions(+)
> 
> 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);
> diff --git a/utils/exportfs/exportfs.c b/utils/exportfs/exportfs.c
> index 48eac00..8758231 100644
> --- a/utils/exportfs/exportfs.c
> +++ b/utils/exportfs/exportfs.c
> @@ -821,6 +821,8 @@ dump(int verbose, int export_format)
>  				c = dumpopt(c, "nordirplus");
>  			if (ep->e_flags & NFSEXP_NOACL)
>  				c = dumpopt(c, "no_acl");
> +			if (ep->e_flags & NFSEXP_PNFS)
> +				c = dumpopt(c, "pnfs");
>  			if (ep->e_flags & NFSEXP_FSID)
>  				c = dumpopt(c, "fsid=%d", ep->e_fsid);
>  			if (ep->e_uuid)
> diff --git a/utils/exportfs/exports.man b/utils/exportfs/exports.man
> index 88d9fbe..9309246 100644
> --- a/utils/exportfs/exports.man
> +++ b/utils/exportfs/exports.man
> @@ -408,6 +408,15 @@ If the client asks for alternative locations for the export point, it
>  will be given this list of alternatives. (Note that actual replication
>  of the filesystem must be handled elsewhere.)
>  
> +.TP
> +.IR pnfs
> +This option allows enables the use of pNFS extension if protocol level
> +is NFSv4.1 or higher, and the filesystem supports pNFS exports.  With
> +pNFS clients can bypass the server and perform I/O directly to storage
> +devices. The default can be explicitly requested with the
> +.I no_pnfs
> +option.
> +
>  .SS User ID Mapping
>  .PP
>  .B nfsd
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-04-02 17:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-02  8:43 [PATCH v3] nfs-utils: add support for the "pnfs" export option Christoph Hellwig
2015-04-02 17:22 ` Steve Dickson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).