lockd: Try to reconnect if statd has moved (Closes: #767219)
svn path=/dists/sid/linux/; revision=21988
This commit is contained in:
parent
1a074496b0
commit
23e9316c6b
|
@ -121,6 +121,7 @@ linux (3.16.7-1) UNRELEASED; urgency=medium
|
||||||
* Add '.0' to the kernel version string (Closes: #742226, #745984)
|
* Add '.0' to the kernel version string (Closes: #742226, #745984)
|
||||||
* vfs,fuse: Change iov_iter_get_pages() to take both maxsize and maxpages
|
* vfs,fuse: Change iov_iter_get_pages() to take both maxsize and maxpages
|
||||||
parameters (Closes: #764285)
|
parameters (Closes: #764285)
|
||||||
|
* lockd: Try to reconnect if statd has moved (Closes: #767219)
|
||||||
|
|
||||||
[ Mauricio Faria de Oliveira ]
|
[ Mauricio Faria de Oliveira ]
|
||||||
* [ppc64el] Disable CONFIG_CMDLINE{,_BOOL} usage for setting consoles
|
* [ppc64el] Disable CONFIG_CMDLINE{,_BOOL} usage for setting consoles
|
||||||
|
|
52
debian/patches/bugfix/all/SUNRPC-Don-t-wake-tasks-during-connection-abort.patch
vendored
Normal file
52
debian/patches/bugfix/all/SUNRPC-Don-t-wake-tasks-during-connection-abort.patch
vendored
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
From: Benjamin Coddington <bcodding@redhat.com>
|
||||||
|
Date: Tue, 23 Sep 2014 12:26:19 -0400
|
||||||
|
Subject: [1/2] SUNRPC: Don't wake tasks during connection abort
|
||||||
|
Origin: https://git.kernel.org/linus/a743419f420a64d442280845c0377a915b76644f
|
||||||
|
Bug-Debian: https://bugs.debian.org/767219
|
||||||
|
|
||||||
|
When aborting a connection to preserve source ports, don't wake the task in
|
||||||
|
xs_error_report. This allows tasks with RPC_TASK_SOFTCONN to succeed if the
|
||||||
|
connection needs to be re-established since it preserves the task's status
|
||||||
|
instead of setting it to the status of the aborting kernel_connect().
|
||||||
|
|
||||||
|
This may also avoid a potential conflict on the socket's lock.
|
||||||
|
|
||||||
|
Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
|
||||||
|
Cc: stable@vger.kernel.org # 3.14+
|
||||||
|
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
|
||||||
|
---
|
||||||
|
include/linux/sunrpc/xprt.h | 1 +
|
||||||
|
net/sunrpc/xprtsock.c | 4 ++++
|
||||||
|
2 files changed, 5 insertions(+)
|
||||||
|
|
||||||
|
--- a/include/linux/sunrpc/xprt.h
|
||||||
|
+++ b/include/linux/sunrpc/xprt.h
|
||||||
|
@@ -357,6 +357,7 @@ int xs_swapper(struct rpc_xprt *xprt,
|
||||||
|
#define XPRT_CONNECTION_ABORT (7)
|
||||||
|
#define XPRT_CONNECTION_CLOSE (8)
|
||||||
|
#define XPRT_CONGESTED (9)
|
||||||
|
+#define XPRT_CONNECTION_REUSE (10)
|
||||||
|
|
||||||
|
static inline void xprt_set_connected(struct rpc_xprt *xprt)
|
||||||
|
{
|
||||||
|
--- a/net/sunrpc/xprtsock.c
|
||||||
|
+++ b/net/sunrpc/xprtsock.c
|
||||||
|
@@ -842,6 +842,8 @@ static void xs_error_report(struct sock
|
||||||
|
dprintk("RPC: xs_error_report client %p, error=%d...\n",
|
||||||
|
xprt, -err);
|
||||||
|
trace_rpc_socket_error(xprt, sk->sk_socket, err);
|
||||||
|
+ if (test_bit(XPRT_CONNECTION_REUSE, &xprt->state))
|
||||||
|
+ goto out;
|
||||||
|
xprt_wake_pending_tasks(xprt, err);
|
||||||
|
out:
|
||||||
|
read_unlock_bh(&sk->sk_callback_lock);
|
||||||
|
@@ -2241,7 +2243,9 @@ static void xs_tcp_setup_socket(struct w
|
||||||
|
abort_and_exit = test_and_clear_bit(XPRT_CONNECTION_ABORT,
|
||||||
|
&xprt->state);
|
||||||
|
/* "close" the socket, preserving the local port */
|
||||||
|
+ set_bit(XPRT_CONNECTION_REUSE, &xprt->state);
|
||||||
|
xs_tcp_reuse_connection(transport);
|
||||||
|
+ clear_bit(XPRT_CONNECTION_REUSE, &xprt->state);
|
||||||
|
|
||||||
|
if (abort_and_exit)
|
||||||
|
goto out_eagain;
|
|
@ -0,0 +1,34 @@
|
||||||
|
From: Benjamin Coddington <bcodding@redhat.com>
|
||||||
|
Date: Tue, 23 Sep 2014 12:26:20 -0400
|
||||||
|
Subject: [2/2] lockd: Try to reconnect if statd has moved
|
||||||
|
Origin: https://git.kernel.org/linus/173b3afceebe76fa2205b2c8808682d5b541fe3c
|
||||||
|
Bug-Debian: https://bugs.debian.org/767219
|
||||||
|
|
||||||
|
If rpc.statd is restarted, upcalls to monitor hosts can fail with
|
||||||
|
ECONNREFUSED. In that case force a lookup of statd's new port and retry the
|
||||||
|
upcall.
|
||||||
|
|
||||||
|
Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
|
||||||
|
Cc: stable@vger.kernel.org
|
||||||
|
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
|
||||||
|
---
|
||||||
|
fs/lockd/mon.c | 6 ++++++
|
||||||
|
1 file changed, 6 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/fs/lockd/mon.c b/fs/lockd/mon.c
|
||||||
|
index daa8e75..9106f42 100644
|
||||||
|
--- a/fs/lockd/mon.c
|
||||||
|
+++ b/fs/lockd/mon.c
|
||||||
|
@@ -159,6 +159,12 @@ static int nsm_mon_unmon(struct nsm_handle *nsm, u32 proc, struct nsm_res *res,
|
||||||
|
|
||||||
|
msg.rpc_proc = &clnt->cl_procinfo[proc];
|
||||||
|
status = rpc_call_sync(clnt, &msg, RPC_TASK_SOFTCONN);
|
||||||
|
+ if (status == -ECONNREFUSED) {
|
||||||
|
+ dprintk("lockd: NSM upcall RPC failed, status=%d, forcing rebind\n",
|
||||||
|
+ status);
|
||||||
|
+ rpc_force_rebind(clnt);
|
||||||
|
+ status = rpc_call_sync(clnt, &msg, RPC_TASK_SOFTCONN);
|
||||||
|
+ }
|
||||||
|
if (status < 0)
|
||||||
|
dprintk("lockd: NSM upcall RPC failed, status=%d\n",
|
||||||
|
status);
|
|
@ -395,3 +395,5 @@ bugfix/all/rtsx_usb_ms-use-msleep_interruptible-in-polling-loop.patch
|
||||||
bugfix/mips/MIPS-increase-MAX-PHYSMEM-BITS-on-Loongson-3-only.patch
|
bugfix/mips/MIPS-increase-MAX-PHYSMEM-BITS-on-Loongson-3-only.patch
|
||||||
bugfix/all/switch-iov_iter_get_pages-to-passing-maximal-number-.patch
|
bugfix/all/switch-iov_iter_get_pages-to-passing-maximal-number-.patch
|
||||||
bugfix/all/fuse-honour-max_read-and-max_write-in-direct_io-mode.patch
|
bugfix/all/fuse-honour-max_read-and-max_write-in-direct_io-mode.patch
|
||||||
|
bugfix/all/SUNRPC-Don-t-wake-tasks-during-connection-abort.patch
|
||||||
|
bugfix/all/lockd-Try-to-reconnect-if-statd-has-moved.patch
|
||||||
|
|
Loading…
Reference in New Issue