non-blocking rpc receive
we already drop the lock between sending and receiving the rpc packets. now making it so that receive doesn't block for too long (ie 100ms) before unlocking the socket. this is needed for the callback. original rpc is sent and it triggers a callback from the server. we fork another thread to handle it, ie it needs to send a deleg_return rpc. if original rpc gets control and blocks on trying to receive its reply, it'll timeout and original rpc will return an error. instead we need to not block for long and allow the deleg_return to go thru so that the server can reply successfully to the original rpc.
This commit is contained in:
parent
d7e438be5e
commit
741e8bf0bf
5 changed files with 77 additions and 62 deletions
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
static enum clnt_stat send_null(CLIENT *client)
|
||||
{
|
||||
struct timeval timeout = {10, 0};
|
||||
struct timeval timeout = {0, 100};
|
||||
|
||||
return clnt_call(client, 0,
|
||||
(xdrproc_t)xdr_void, NULL,
|
||||
|
|
@ -305,7 +305,7 @@ int nfs41_send_compound(
|
|||
IN char *inbuf,
|
||||
OUT char *outbuf)
|
||||
{
|
||||
struct timeval timeout = {10, 0};
|
||||
struct timeval timeout = {0, 100};
|
||||
enum clnt_stat rpc_status;
|
||||
int status, count = 0, one = 1, zero = 0;
|
||||
uint32_t version;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue