public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] SQUASHME: Support for cb_layout returning NFS4ERR_DELAY
@ 2010-06-17 16:31 Boaz Harrosh
  2010-06-17 21:56 ` Benny Halevy
  2010-06-28 17:13 ` Boaz Harrosh
  0 siblings, 2 replies; 5+ messages in thread
From: Boaz Harrosh @ 2010-06-17 16:31 UTC (permalink / raw)
  To: Benny Halevy, NFS list


On a recall, a client may return NFS4ERR_DELAY to indicate
that it is busy with the layout and wants to be poled.

TODO: If the client is stuck he would probably be cleaned
      at expire client. But it is possible that the client
      is active/renewing but would not acknowledge the
      recall. We should take a time stamp on first recall
      and expire the client if a lease time has passed.

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
---
 fs/nfsd/nfs4callback.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
index e1faad4..8374ebd 100644
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
@@ -1044,6 +1044,12 @@ static void nfsd4_cb_layout_done(struct rpc_task *task, void *calldata)
 		 */
 		expire_client_lock(clp);
 		break;
+	case -NFS4ERR_DELAY:
+		/* Pole the client until it's done with the layout */
+		rpc_delay(task, HZ/100); /* 10 mili-seconds */
+		task->tk_status = 0;
+		rpc_restart_call(task);
+		break;
 	case -NFS4ERR_NOMATCHING_LAYOUT:
 		nomatching_layout(clr);
 	}
-- 
1.7.0.1


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

end of thread, other threads:[~2010-07-01 18:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-17 16:31 [PATCH] SQUASHME: Support for cb_layout returning NFS4ERR_DELAY Boaz Harrosh
2010-06-17 21:56 ` Benny Halevy
2010-06-28 17:13 ` Boaz Harrosh
2010-06-29 11:36   ` [PATCH] SQUASHME: into [SQUASHME: pnfsd: Support for cb_layout returning NFS4ERR_DELAY] Boaz Harrosh
2010-07-01 18:28     ` Benny Halevy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox