]> git.baikalelectronics.ru Git - kernel.git/commit
SUNRPC: Transport fault injection
authorChuck Lever <chuck.lever@oracle.com>
Mon, 11 May 2015 18:02:25 +0000 (14:02 -0400)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Wed, 10 Jun 2015 22:37:26 +0000 (18:37 -0400)
commit19763369ab7a1e67711bf7e5b3685048ac4a2d55
treeca49cf2fe5a77018dc473a261f8a5c243530c761
parent9a8152a45d0d1ece44b3acbb054536a681c43419
SUNRPC: Transport fault injection

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