[sheepdog] [PATCH] sheepfs/volume: remove set_nodelay in function setup_socket_pool

Ruoyu liangry at ucweb.com
Tue May 20 05:24:18 CEST 2014


because connect_to() is called in the function, and it already calls
set_nodelay()

Signed-off-by: Ruoyu <liangry at ucweb.com>
---
 sheepfs/volume.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/sheepfs/volume.c b/sheepfs/volume.c
index b904b6c..88a5a94 100644
--- a/sheepfs/volume.c
+++ b/sheepfs/volume.c
@@ -359,7 +359,7 @@ static void destroy_socket_pool(int array[], int len)
 
 static int setup_socket_pool(int array[], int len)
 {
-	int fd, i, ret;
+	int fd, i;
 
 	for (i = 0; i < len; i++) {
 		fd = connect_to(sdhost, sdport);
@@ -369,13 +369,6 @@ static int setup_socket_pool(int array[], int len)
 			return -1;
 		}
 
-		ret = set_nodelay(fd);
-		if (ret) {
-			sheepfs_pr("%m\n");
-			destroy_socket_pool(array, i);
-			return -1;
-		}
-
 		array[i] = fd;
 	}
 
-- 
1.8.3.2





More information about the sheepdog mailing list