[pnfs] [PATCH 04/20] 2.6-latest pnfs client no lease update in nfs41_sequence_done for ds
andros at umich.edu
andros at umich.edu
Wed Nov 28 16:33:05 EST 2007
From: Andy Adamson <andros at umich.edu>
Allow a NULL nfs_client parameter to nfs41_sequence_done.
The data server has no lease to update. There is no way to reference the
data server's struct nfs_client because we don't keep one.
The use of struct nfs_client for data server session creation will
will probably be replaced with a structure with only relevant fields.
Signed-off by: Andy Adamson<andros at umich.edu>
---
fs/nfs/nfs4proc.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 0185cae..594dabc 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -248,6 +248,10 @@ int nfs4_wait_bit_interruptible(void *word)
}
#ifdef CONFIG_NFS_V4_1
+/* For pNFS filelayout data servers:
+ * the nfs_client is NULL - to signal no lease update.
+ * session is the data server.
+ */
static int nfs41_sequence_done(struct nfs_client *clp,
struct nfs4_session *session,
struct nfs41_sequence_res *res, int status)
@@ -256,8 +260,6 @@ static int nfs41_sequence_done(struct nfs_client *clp,
struct nfs4_slot_table *tbl;
struct nfs4_slot *slot;
- BUG_ON(clp == NULL);
-
tbl = &session->fore_channel.slot_table;
slot = res->sr_slot;
@@ -280,6 +282,8 @@ static int nfs41_sequence_done(struct nfs_client *clp,
* The sequence call was successful,
* Update our lease renewal timers
*/
+ if (!clp)
+ goto no_update;
timestamp = res->sr_renewal_time;
spin_lock(&clp->cl_lock);
@@ -287,7 +291,7 @@ static int nfs41_sequence_done(struct nfs_client *clp,
clp->cl_last_renewal = timestamp;
spin_unlock(&clp->cl_lock);
}
-
+no_update:
/* Clear the 'busy' bit on the slot that was used */
smp_mb__before_clear_bit();
clear_bit(NFS4_SLOT_BUSY, &slot->flags);
--
1.5.0.2
More information about the pNFS
mailing list