diff options
author | MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp> | 2013-02-22 12:39:50 +0900 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2013-03-04 09:54:17 +0100 |
commit | bf1c852aa9cbe21beeb7c37d03e167c33ac196b2 (patch) | |
tree | d1cf6d722d272b1a42d98a8c5704a843e2bf0a9f /block | |
parent | 4ef7b8944cc5eae66159c60066b21466e2dc1ee4 (diff) |
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.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/block/sheepdog.c b/block/sheepdog.c index d466b232d7..51e75ad7a1 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); |