[PATCH 2/6] rpc: timeout patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Olga Kornievskaia <aglo@xxxxxxxxxxxxxx>

When a client gss upcall times out, we currently give a mesage reminding
the user to check whether gssd is running.

Currently gssd only listens on pipes under nfs/.  We expect to modify it
so it treats all clients the same regardless of protocol (as it probably
should have before), and new functionality may depend on that.  So
people may need to upgrade gssd to get such new functionality.

So it would be helpful if the error message specified which pipe exactly
the upcall was failing on, and suggested that the problem could be due
to an outdated gssd (not just a non-existant gssd).

Signed-off-by: J. Bruce Fields <bfields@xxxxxxxxxxxxxx>
---
 net/sunrpc/auth_gss/auth_gss.c |   42 +++++++++++++++++++++++++--------------
 1 files changed, 27 insertions(+), 15 deletions(-)

diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c
index cc12d5f..c3ca6f0 100644
--- a/net/sunrpc/auth_gss/auth_gss.c
+++ b/net/sunrpc/auth_gss/auth_gss.c
@@ -584,22 +584,34 @@ gss_pipe_destroy_msg(struct rpc_pipe_msg *msg)
 {
 	struct gss_upcall_msg *gss_msg = container_of(msg, struct gss_upcall_msg, msg);
 	static unsigned long ratelimit;
+	unsigned long now = jiffies;
+	struct path path = {
+		.dentry = gss_msg->auth->dentry,
+		.mnt = gss_msg->auth->client->cl_vfsmnt,
+	};
+	char name[128], *p;
 
-	if (msg->errno < 0) {
-		dprintk("RPC:       gss_pipe_destroy_msg releasing msg %p\n",
-				gss_msg);
-		atomic_inc(&gss_msg->count);
-		gss_unhash_msg(gss_msg);
-		if (msg->errno == -ETIMEDOUT) {
-			unsigned long now = jiffies;
-			if (time_after(now, ratelimit)) {
-				printk(KERN_WARNING "RPC: AUTH_GSS upcall timed out.\n"
-						    "Please check user daemon is running!\n");
-				ratelimit = now + 15*HZ;
-			}
-		}
-		gss_release_msg(gss_msg);
-	}
+	if (msg->errno >= 0)
+		return;
+
+	dprintk("RPC:       gss_pipe_destroy_msg releasing msg %p\n", gss_msg);
+	atomic_inc(&gss_msg->count);
+	gss_unhash_msg(gss_msg);
+
+	if (msg->errno != -ETIMEDOUT)
+		goto out;
+
+	if (!time_after(now, ratelimit))
+		goto out;
+
+	p = d_path(&path, name, 128);
+	printk(KERN_WARNING "RPC: AUTH_GSS upcall to <rpc_pipefs_dir>%s "
+			    "timed out.\n Please check user daemon is "
+			    "up-to-date and running!\n", p ? p : "<null>");
+	ratelimit = now + 15*HZ;
+
+out:
+	gss_release_msg(gss_msg);
 }
 
 /*
-- 
1.5.5.rc1

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux