summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorrmacklem <rmacklem@FreeBSD.org>2017-05-22 19:57:20 +0000
committerrmacklem <rmacklem@FreeBSD.org>2017-05-22 19:57:20 +0000
commit59dc9a9bb2a1ec42d4076119e346276be7d6996e (patch)
treeff82444506ee7e6a89485cd2d5467e973427a7d3 /sbin
parent28ad50714a75bd63a1d23824943eb24d2d83d7ba (diff)
downloadFreeBSD-src-59dc9a9bb2a1ec42d4076119e346276be7d6996e.zip
FreeBSD-src-59dc9a9bb2a1ec42d4076119e346276be7d6996e.tar.gz
MFC: r317906
Fix the client side krpc from doing TCP reconnects for ERESTART from sosend(). When sosend() replies ERESTART in the client side krpc, it indicates that the RPC message hasn't yet been sent and that the send queue is full or locked while a signal is posted for the process. Without this patch, this would result in a RPC_CANTSEND reply from clnt_vc_call(), which would cause clnt_reconnect_call() to create a new TCP transport connection. For most NFS servers, this wasn't a serious problem, although it did imply retries of outstanding RPCs, which could possibly have missed the DRC. For an NFSv4.1 mount to AmazonEFS, this caused a serious problem, since AmazonEFS often didn't retain the NFSv4.1 session and would reply with NFS4ERR_BAD_SESSION. This implies to the client a crash/reboot which requires open/lock state recovery. Three options were considered to fix this: - Return the ERESTART all the way up to the system call boundary and then have the system call redone. This is fraught with risk, due to convoluted code paths, asynchronous I/O RPCs etc. cperciva@ worked on this, but it is still a work in prgress and may not be feasible. - Set SB_NOINTR for the socket buffer. This fixes the problem, but makes the sosend() completely non interruptible, which kib@ considered inappropriate. It also would break forced dismount when a thread was blocked in sosend(). - Modify the retry loop in clnt_vc_call(), so that it loops for this case for up to 15sec. Testing showed that the sosend() usually succeeded by the 2nd retry. The extreme case observed was 111 loop iterations, or about 100msec of delay. This third alternative is what is implemented in this patch, since the change is: - localized - straightforward - forced dismount is not broken by it. This patch has been tested by cperciva@ extensively against AmazonEFS.
Diffstat (limited to 'sbin')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud