]> www.infradead.org Git - users/jedix/linux-maple.git/commit
SUNRPC: Transport fault injection
authorChuck Lever <chuck.lever@oracle.com>
Tue, 25 Aug 2015 18:23:55 +0000 (12:23 -0600)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 31 Aug 2015 20:45:55 +0000 (14:45 -0600)
commit80d505b6131baacf524d9c4bb7cf46bf9790a943
tree96f7c2aed8db68c1394b1d36db42a5c3ba93452f
parent16dd25d9c51a7105f97dc805ef6aa0b233b57a0a
SUNRPC: Transport fault injection

[ Upstream commit 4a06825839889cc1756d0dd8a52d6b1071ee0263 ]

It has been exceptionally useful to exercise the logic that handles
local immediate errors and RDMA connection loss.  To enable
developers to test this regularly and repeatably, add logic to
simulate connection loss every so often.

Fault injection is disabled by default. It is enabled with

  $ sudo echo xxx > /sys/kernel/debug/sunrpc/inject_fault/disconnect

where "xxx" is a large positive number of transport method calls
before a disconnect. A value of several thousand is usually a good
number that allows reasonable forward progress while still causing a
lot of connection drops.

These hooks are disabled when SUNRPC_DEBUG is turned off.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
include/linux/sunrpc/xprt.h
net/sunrpc/clnt.c
net/sunrpc/debugfs.c
net/sunrpc/xprt.c
net/sunrpc/xprtrdma/transport.c
net/sunrpc/xprtsock.c