From: Andrew Deason Date: Mon, 7 Mar 2011 17:08:26 +0000 (-0600) Subject: RX: Avoid timing out non-kernel busy channels X-Git-Tag: upstream/1.6.1.pre2^2~3 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=afce83a96799220f661e090fb5fcc7fe42f75797;p=packages%2Fo%2Fopenafs.git RX: Avoid timing out non-kernel busy channels When we encounter a "busy" call channel (indicated by receiving RX_PACKET_TYPE_BUSY packets), we can error out a call with RX_CALL_TIMEOUT to try and get the application code to retry the call. However, many RX applications are not aware of this, and will just fail with an error upon receiving a single busy packet. So instead, make this behavior optional, and only do it if the application tells us what specific error it expects to receive when a busy call channel is detected. Enable this behavior for the Unix cache manager, as it can cope with receiving an RX_CALL_TIMEOUT error in this scenario. (cherry picked from commit eddcee3ad518dff9fbfda790640c5bfd2e97ef5a) Reviewed-on: http://gerrit.openafs.org/4159 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear Change-Id: I3938e79ab009f14f5421a4a45e2a099276c49f24 Reviewed-on: http://gerrit.openafs.org/6611 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- diff --git a/src/afs/afs_call.c b/src/afs/afs_call.c index 83dfd37a7..561ad6f7a 100644 --- a/src/afs/afs_call.c +++ b/src/afs/afs_call.c @@ -115,6 +115,8 @@ afs_InitSetup(int preallocs) memset(afs_zeros, 0, AFS_ZEROS); + rx_SetBusyChannelError(RX_CALL_TIMEOUT); + /* start RX */ if(!afscall_set_rxpck_received) rx_extraPackets = AFS_NRXPACKETS; /* smaller # of packets */ diff --git a/src/afs/afs_pag_call.c b/src/afs/afs_pag_call.c index a0bf09642..d61a91c7e 100644 --- a/src/afs/afs_pag_call.c +++ b/src/afs/afs_pag_call.c @@ -98,6 +98,7 @@ afspag_Init(afs_int32 nfs_server_addr) AFS_GLOCK(); afs_InitStats(); + rx_SetBusyChannelError(RX_CALL_TIMEOUT); rx_Init(htons(7001)); AFS_STATCNT(afs_ResourceInit);