summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendrabhat@gluster.com>2011-11-04 14:51:04 +0530
committerVijay Bellur <vijay@gluster.com>2011-11-04 05:37:17 -0700
commit02b4de3c1a33dd6a37c62d0edc8307adb52638b7 (patch)
tree89b53baa6630d064027a5661da48d3866b642215
parent62704943d42e81b7b5a5aec6e248abb90af11010 (diff)
nfs: do not return -1 (error), if the transmission buffer list is empty
In the rpc implementation of nfs suppose the transmission buffer list is empty for the nfs server, -1 is being returned which is treated as an error and the socket fd is closed to handle it. Because of this the reply submission of the server will be failed. Thus if the transmission buffer list is empty error should not be returned. Change-Id: I42d0dada8fe0473daf4db085da10681d4926e1ae BUG: 3765 Reviewed-on: http://review.gluster.com/671 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
-rw-r--r--xlators/nfs/lib/src/rpcsvc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/xlators/nfs/lib/src/rpcsvc.c b/xlators/nfs/lib/src/rpcsvc.c
index 5798aa66934..1767db0ba03 100644
--- a/xlators/nfs/lib/src/rpcsvc.c
+++ b/xlators/nfs/lib/src/rpcsvc.c
@@ -2576,6 +2576,13 @@ __nfs_rpcsvc_conn_data_poll_out (rpcsvc_conn_t *conn)
if (!conn)
return -1;
+ /* If the transmission buffer list is empty, do not return -1 */
+ if (list_empty (&conn->txbufs)) {
+ gf_log (GF_RPCSVC, GF_LOG_DEBUG, "transmission buffer list for "
+ "the connection %p is empty. Returning 0", conn);
+ written = 0;
+ }
+
/* Attempt transmission of each of the pending buffers */
list_for_each_entry_safe (txbuf, tmp, &conn->txbufs, txlist) {
tx_remaining: