Revision 0d6db300
b/block/sheepdog.c | ||
---|---|---|
468 | 468 |
if (err != NULL) { |
469 | 469 |
qerror_report_err(err); |
470 | 470 |
error_free(err); |
471 |
} else { |
|
472 |
socket_set_nonblock(fd); |
|
471 | 473 |
} |
472 | 474 |
|
473 | 475 |
return fd; |
... | ... | |
523 | 525 |
co = qemu_coroutine_self(); |
524 | 526 |
qemu_aio_set_fd_handler(sockfd, NULL, restart_co_req, NULL, co); |
525 | 527 |
|
526 |
socket_set_block(sockfd); |
|
527 | 528 |
ret = send_co_req(sockfd, hdr, data, wlen); |
528 | 529 |
if (ret < 0) { |
529 | 530 |
goto out; |
... | ... | |
553 | 554 |
ret = 0; |
554 | 555 |
out: |
555 | 556 |
qemu_aio_set_fd_handler(sockfd, NULL, NULL, NULL, NULL); |
556 |
socket_set_nonblock(sockfd); |
|
557 | 557 |
|
558 | 558 |
srco->ret = ret; |
559 | 559 |
srco->finished = true; |
... | ... | |
776 | 776 |
return fd; |
777 | 777 |
} |
778 | 778 |
|
779 |
socket_set_nonblock(fd); |
|
780 |
|
|
781 | 779 |
qemu_aio_set_fd_handler(fd, co_read_response, NULL, aio_flush_request, s); |
782 | 780 |
return fd; |
783 | 781 |
} |
Also available in: Unified diff