public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Boaz Harrosh <bharrosh@panasas.com>
To: Benny Halevy <bhalevy@panasas.com>, NFS list <linux-nfs@vger.kernel.org>
Subject: [PATCH] SQUASHME: Support for cb_layout returning NFS4ERR_DELAY
Date: Thu, 17 Jun 2010 12:31:41 -0400	[thread overview]
Message-ID: <4C1A4DED.50702@panasas.com> (raw)


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


             reply	other threads:[~2010-06-17 16:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-17 16:31 Boaz Harrosh [this message]
2010-06-17 21:56 ` [PATCH] SQUASHME: Support for cb_layout returning NFS4ERR_DELAY 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

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=4C1A4DED.50702@panasas.com \
    --to=bharrosh@panasas.com \
    --cc=bhalevy@panasas.com \
    --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