[pnfs] [PATCH 2/4] Set the exchange_id flags returned by the NFSv4.1 server
andros at umich.edu
andros at umich.edu
Thu May 31 10:54:15 EDT 2007
From: Andy Adamson <andros at umich.edu>
Set the minimal exchange_id flags for sessions only (no pnfs).
The NFSv4.1 server MUST set referral flags if referrals are supported, and MUST
set at least one pNFS exchange_id flag.
Signed-off by: Andy Adamson <andros at citi.umich.edu>
---
fs/nfsd/nfs4state.c | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 575c8fb..9815ff3 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -1052,6 +1052,24 @@ void nfsd4_setup_callback_channel(void)
}
#if defined(CONFIG_NFSD_V4_1)
+/*
+ * Set the exchange_id flags returned by the server.
+ */
+void
+nfsd4_set_ex_flags(struct nfs4_client *new, struct nfsd4_exchange_id *clid)
+{
+ /* if sessions only, ignore the wire_flags from client */
+
+ /* Referrals are supported, Migration is not. */
+ new->cl_exchange_flags |= EXCHGID4_FLAG_SUPP_MOVED_REFER;
+
+ /* pNFS is not supported */
+ new->cl_exchange_flags |= EXCHGID4_FLAG_USE_NON_PNFS;
+
+ /* set the wire flags to return to client. */
+ clid->flags = new->cl_exchange_flags;
+}
+
int nfsd4_exchange_id(struct svc_rqst *rqstp, struct nfsd4_exchange_id *clid)
{
struct nfs4_client *unconf, *conf, *new;
@@ -1136,7 +1154,7 @@ out_copy:
clid->clientid.cl_id = new->cl_clientid.cl_id;
new->cl_seqid = clid->seqid = 1;
- new->cl_exchange_flags = clid->flags;
+ nfsd4_set_ex_flags(new, clid);
status = nfs_ok;
--
1.5.0.2
More information about the pNFS
mailing list