diff options
author | Shehjar Tikoo <shehjart@gluster.com> | 2011-03-15 01:57:13 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2011-03-31 04:19:27 -0700 |
commit | a54e0358b1d66c04448b22c1a01e076b5a527008 (patch) | |
tree | 1393f0ea4b441752cc647cc3a8e677746fb41597 /xlators/nfs/lib/src/rpc-socket.c | |
parent | 325ee7aeab629a7435922d9e61d04fd3418ec6d7 (diff) |
nfs-rpc: Exit txbuf transmission loop on EAGAIN
..instead of looping till the buffer is completely transmitted.
Signed-off-by: Shehjar Tikoo <shehjart@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 2491 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2491
Diffstat (limited to 'xlators/nfs/lib/src/rpc-socket.c')
-rw-r--r-- | xlators/nfs/lib/src/rpc-socket.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/xlators/nfs/lib/src/rpc-socket.c b/xlators/nfs/lib/src/rpc-socket.c index 6c399d904..ec56f3fc4 100644 --- a/xlators/nfs/lib/src/rpc-socket.c +++ b/xlators/nfs/lib/src/rpc-socket.c @@ -226,7 +226,7 @@ nfs_rpcsvc_socket_read (int sockfd, char *readaddr, size_t readsize) ssize_t -nfs_rpcsvc_socket_write (int sockfd, char *buffer, size_t size) +nfs_rpcsvc_socket_write (int sockfd, char *buffer, size_t size, int *eagain) { size_t writelen = -1; ssize_t written = 0; @@ -240,8 +240,10 @@ nfs_rpcsvc_socket_write (int sockfd, char *buffer, size_t size) if (errno != EAGAIN) { written = -1; break; - } else + } else { + *eagain = 1; break; + } } else if (writelen == 0) break; |