From: " J. Bruce Fields" <bfields@citi.umich.edu>
To: Benny Halevy <bhalevy@panasas.com>
Cc: linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org,
pnfs@linux-nfs.org
Subject: Re: [PATCH 2/3] SQUASHME: pnfsd: always set both MDS and DS exchangeid capability flags
Date: Wed, 9 Dec 2009 13:54:03 -0500 [thread overview]
Message-ID: <20091209185403.GB23234@fieldses.org> (raw)
In-Reply-To: <1260354440-12073-1-git-send-email-bhalevy@panasas.com>
On Wed, Dec 09, 2009 at 12:27:20PM +0200, Benny Halevy wrote:
> We always support both modes when CONFIG_PNFSD is enabled.
> The client needs to remember what the session is used for
> if it cares to distiguish between DSs and MDSs.
OK, thanks.
>
> Signed-off-by: Benny Halevy <bhalevy@panasas.com>
> ---
> fs/nfsd/nfs4state.c | 15 ++-------------
> 1 files changed, 2 insertions(+), 13 deletions(-)
>
> diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
> index 108cb3e..aa2e9c2 100644
> --- a/fs/nfsd/nfs4state.c
> +++ b/fs/nfsd/nfs4state.c
> @@ -1103,20 +1103,9 @@ static void
> nfsd4_set_ex_flags(struct nfs4_client *new, struct nfsd4_exchange_id *clid)
> {
> #if defined(CONFIG_PNFSD)
> - int mds_and_ds = EXCHGID4_FLAG_USE_PNFS_MDS | EXCHGID4_FLAG_USE_PNFS_DS;
> - int mds_or_ds = 0;
> -
> - /* Save the client's MDS or DS flags, or set them both.
> - * XXX We currently do not have a method of determining
> - * what a server supports prior to receiving a filehandle
> - * e.g. at exchange id time. */
> - mds_or_ds = clid->flags & mds_and_ds;
> - if (mds_or_ds)
> - new->cl_exchange_flags |= mds_or_ds;
> - else
> - new->cl_exchange_flags |= mds_and_ds;
> + new->cl_exchange_flags |= EXCHGID4_FLAG_USE_PNFS_MDS |
> + EXCHGID4_FLAG_USE_PNFS_DS;
> #else /* CONFIG_PNFSD */
> - /* pNFS is not supported */
> new->cl_exchange_flags |= EXCHGID4_FLAG_USE_NON_PNFS;
> #endif /* CONFIG_PNFSD */
As usual, let's also hide the ifdef's e.g.:
new->cl_exchange_flags |= PNFS_EXCHGID_FLAGS
with the define conditional on CONFIG_PNFSD.
--b.
next prev parent reply other threads:[~2009-12-09 18:54 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-07 9:26 [PATCH v2 0/35] Initial pnfsd file layout support Benny Halevy
2009-12-07 9:29 ` [PATCH v2 01/35] pnfsd: Define CONFIG_PNFSD Benny Halevy
2009-12-07 9:30 ` [PATCH v2 02/35] pnfsd: define NFSDDBG_PNFS Benny Halevy
2009-12-07 9:30 ` [PATCH v2 03/35] pnfsd, pnfs: protocol level pnfs constants Benny Halevy
2009-12-07 19:25 ` J. Bruce Fields
2009-12-08 14:31 ` Benny Halevy
2009-12-07 9:30 ` [PATCH v2 04/35] pnfsd: return pnfs flags on exchange_id Benny Halevy
2009-12-07 19:51 ` J. Bruce Fields
2009-12-08 14:46 ` Benny Halevy
2009-12-07 9:30 ` [PATCH v2 05/35] pnfsd: don't set up back channel on create_session for ds Benny Halevy
2009-12-07 20:10 ` J. Bruce Fields
2009-12-08 14:50 ` Benny Halevy
2009-12-07 9:31 ` [PATCH v2 06/35] pnfsd: introduce pnfsd header files Benny Halevy
2009-12-07 9:31 ` [PATCH v2 07/35] pnfsd: define pnfs_export_operations Benny Halevy
2009-12-07 9:31 ` [PATCH v2 08/35] pnfsd: add pnfs export option Benny Halevy
2009-12-07 9:31 ` [PATCH v2 09/35] pnfsd: layout verify Benny Halevy
2009-12-07 9:31 ` [PATCH v2 10/35] pnfsd: introduce exp_xdr.h Benny Halevy
2009-12-07 9:32 ` [PATCH v2 11/35] pnfsd: get device list/info Benny Halevy
2009-12-10 17:30 ` J. Bruce Fields
2009-12-10 18:53 ` Benny Halevy
2009-12-10 19:04 ` J. Bruce Fields
2009-12-10 19:21 ` Benny Halevy
2009-12-10 19:43 ` J. Bruce Fields
2009-12-07 9:32 ` [PATCH v2 12/35] pnfsd: filelayout: " Benny Halevy
2009-12-07 9:32 ` [PATCH v2 13/35] pnfsd: layout get Benny Halevy
2009-12-07 9:32 ` [PATCH v2 14/35] pnfsd: filelayout: layout encoding Benny Halevy
2009-12-07 9:33 ` [PATCH v2 15/35] pnfsd: Helper functions for layout stateid processing Benny Halevy
2009-12-07 9:33 ` [PATCH v2 16/35] pnfsd: helper function for stateid checking Benny Halevy
2009-12-07 9:33 ` [PATCH v2 17/35] pnfsd: process the layout stateid Benny Halevy
2009-12-07 9:33 ` [PATCH v2 18/35] pnfsd: add helper functions for identifying DS stateids Benny Halevy
2009-12-07 9:33 ` [PATCH v2 19/35] pnfsd: accept all ds stateids Benny Halevy
2009-12-07 9:34 ` [PATCH v2 20/35] pnfsd: LAYOUTGET layout stateid processing Benny Halevy
2009-12-07 9:34 ` [PATCH v2 21/35] pnfsd: destroy layout on expire_client Benny Halevy
2009-12-07 9:34 ` [PATCH v2 22/35] pnfsd: support layout_type attribute Benny Halevy
2009-12-07 9:34 ` [PATCH v2 23/35] pnfsd: per block device dlm data server list cache Benny Halevy
2009-12-07 9:35 ` [PATCH v2 24/35] pnfsd: new nfsd filesystem file: pnfs_dlm_device Benny Halevy
2009-12-07 9:35 ` [PATCH v2 25/35] pnfsd: nfsd4_pnfs_dlm_getdeviter Benny Halevy
2009-12-07 9:35 ` [PATCH v2 26/35] pnfsd: nfsd4_pnfs_dlm_getdevinfo Benny Halevy
2009-12-07 9:35 ` [PATCH v2 27/35] pnfsd: nfsd4_pnfs_dlm_layoutget Benny Halevy
2009-12-07 9:36 ` [PATCH v2 28/35] pnfsd: add dlm file layout layout-type Benny Halevy
2009-12-07 9:36 ` [PATCH v2 29/35] pnfsd: dlm pnfs_export_operations Benny Halevy
2009-12-07 9:36 ` [PATCH v2 30/35] pnfsd: gfs2: use generic file layout pnfs operations vector Benny Halevy
2009-12-07 9:36 ` [PATCH v2 31/35] posix_acl: resolve compile dependency in posix_acl.h Benny Halevy
2009-12-07 9:36 ` [PATCH v2 32/35] nfs: resolve compile dependency in nfs_xdr.h Benny Halevy
2009-12-07 9:37 ` [PATCH v2 33/35] pnfsd: layout commit Benny Halevy
2009-12-07 9:37 ` [PATCH v2 34/35] pnfsd: layout return Benny Halevy
2009-12-07 9:37 ` [PATCH v2 35/35] pnfsd: layoutreturn stateid processing Benny Halevy
2009-12-07 9:54 ` [pnfs] [PATCH v2 0/35] Initial pnfsd file layout support Benny Halevy
2009-12-09 10:24 ` [PATCH 0/9] fixes to Initial pnfsd file layout support v2, comments {3,4,5}/35 Benny Halevy
2009-12-09 10:27 ` [PATCH 1/3] SQUASHME: pnfsd: unify enum pnfs_layout{return,recall}_type Benny Halevy
2009-12-09 10:27 ` [PATCH 2/3] SQUASHME: pnfsd: always set both MDS and DS exchangeid capability flags Benny Halevy
2009-12-09 18:54 ` J. Bruce Fields [this message]
2009-12-09 10:27 ` [PATCH 3/3] SQUASHME: pnfsd: define a is_ds_only_session helper Benny Halevy
2009-12-09 10:27 ` [PATCH 4/4] SQUASHME: pnfsd: use only RETURN_* constants Benny Halevy
2009-12-09 10:27 ` [PATCH 5/5] SQUASHME: spnfs: " Benny Halevy
2009-12-09 10:28 ` [PATCH 6/6] SQUASHME: spnfs-block: " Benny Halevy
2009-12-09 10:28 ` [PATCH 7/7] SQUASHME: pnfsd-exofs: use only pnfs_layoutreturn_type Benny Halevy
2009-12-09 10:28 ` [PATCH 8/9] SQUASHME: pnfs: " Benny Halevy
2009-12-09 10:28 ` [PATCH 9/9] SQUASHME: pnfs: filelayout: mask out server's MDS capability flag for DSs Benny Halevy
2009-12-09 22:21 ` [pnfs] " Benny Halevy
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=20091209185403.GB23234@fieldses.org \
--to=bfields@citi.umich.edu \
--cc=bhalevy@panasas.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=pnfs@linux-nfs.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