aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorMORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>2013-02-22 12:39:50 +0900
committerStefan Hajnoczi <stefanha@redhat.com>2013-03-04 09:54:17 +0100
commitbf1c852aa9cbe21beeb7c37d03e167c33ac196b2 (patch)
treed1cf6d722d272b1a42d98a8c5704a843e2bf0a9f /block
parent4ef7b8944cc5eae66159c60066b21466e2dc1ee4 (diff)
downloadqemu-bf1c852aa9cbe21beeb7c37d03e167c33ac196b2.zip
qemu-bf1c852aa9cbe21beeb7c37d03e167c33ac196b2.tar.gz
qemu-bf1c852aa9cbe21beeb7c37d03e167c33ac196b2.tar.bz2
move socket_set_nodelay to osdep.c
Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/sheepdog.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/block/sheepdog.c b/block/sheepdog.c
index d466b23..51e75ad 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -787,15 +787,6 @@ static int aio_flush_request(void *opaque)
!QLIST_EMPTY(&s->pending_aio_head);
}
-static int set_nodelay(int fd)
-{
- int ret, opt;
-
- opt = 1;
- ret = setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (char *)&opt, sizeof(opt));
- return ret;
-}
-
/*
* Return a socket discriptor to read/write objects.
*
@@ -814,7 +805,7 @@ static int get_sheep_fd(BDRVSheepdogState *s)
socket_set_nonblock(fd);
- ret = set_nodelay(fd);
+ ret = socket_set_nodelay(fd);
if (ret) {
error_report("%s", strerror(errno));
closesocket(fd);