[Sheepdog] [PATCH 5/7] avoid non-blocking in worker threads

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Thu Apr 7 02:56:21 CEST 2011


In worker threads, all I/Os are retried when EAGAIN is returned, so it
is better not to set O_NONBLOCKING.

Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 sheep/sdnet.c |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/sheep/sdnet.c b/sheep/sdnet.c
index a172a4f..d37e75f 100644
--- a/sheep/sdnet.c
+++ b/sheep/sdnet.c
@@ -804,13 +804,6 @@ int get_sheep_fd(uint8_t *addr, uint16_t port, int node_idx,
 	if (fd < 0)
 		return -1;
 
-	ret = set_nonblocking(fd);
-	if (ret) {
-		eprintf("%m\n");
-		close(fd);
-		return -1;
-	}
-
 	ret = set_nodelay(fd);
 	if (ret) {
 		eprintf("%m\n");
-- 
1.5.6.5




More information about the sheepdog mailing list