Linux NFS development
 help / color / mirror / Atom feed
From: bfields@fieldses.org (J. Bruce Fields)
To: Christoph Hellwig <hch@lst.de>
Cc: Steve Dickson <SteveD@redhat.com>, linux-nfs@vger.kernel.org
Subject: Re: [PATCH] nfs-utils: add support for the "pnfs" export option
Date: Wed, 1 Apr 2015 13:48:09 -0400	[thread overview]
Message-ID: <20150401174808.GB3040@fieldses.org> (raw)
In-Reply-To: <1427876113-27004-1-git-send-email-hch@lst.de>

On Wed, Apr 01, 2015 at 10:15:13AM +0200, Christoph Hellwig wrote:
> This goes along with the patch just sent to Bruce to make pnfs
> support conditional.

Could we get an update of utils/exportfs/exports.man too?

--b.

> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  support/include/nfs/export.h | 1 +
>  support/nfs/exports.c        | 3 +++
>  utils/exportfs/exportfs.c    | 2 ++
>  3 files changed, 6 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..97f9e67 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, "%s", (ep->e_flags & NFSEXP_PNFS)? "pnfs," : "");
>  	if (ep->e_flags & NFSEXP_FSID) {
>  		fprintf(fp, "fsid=%d,", ep->e_fsid);
>  	}
> @@ -581,6 +582,8 @@ 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 (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)
> -- 
> 1.9.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2015-04-01 17:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-01  8:15 [PATCH] nfs-utils: add support for the "pnfs" export option Christoph Hellwig
2015-04-01  8:49 ` Mkrtchyan, Tigran
2015-04-01 17:48 ` J. Bruce Fields [this message]
2015-04-02  8:37   ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150401174808.GB3040@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=SteveD@redhat.com \
    --cc=hch@lst.de \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox