[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 34/46] sheepdog: fix send req helpers
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 34/46] sheepdog: fix send req helpers |
Date: |
Thu, 5 Apr 2012 17:52:12 +0200 |
From: Liu Yuan <address@hidden>
We should return if reading of the header fails.
Cc: Kevin Wolf <address@hidden>
Cc: MORITA Kazutaka <address@hidden>
Signed-off-by: Liu Yuan <address@hidden>
Acked-by: MORITA Kazutaka <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/sheepdog.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/block/sheepdog.c b/block/sheepdog.c
index 1248534..3eaf625 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -510,6 +510,7 @@ static int send_req(int sockfd, SheepdogReq *hdr, void
*data,
ret = qemu_send_full(sockfd, hdr, sizeof(*hdr), 0);
if (ret < sizeof(*hdr)) {
error_report("failed to send a req, %s", strerror(errno));
+ return ret;
}
ret = qemu_send_full(sockfd, data, *wlen, 0);
@@ -528,6 +529,7 @@ static int send_co_req(int sockfd, SheepdogReq *hdr, void
*data,
ret = qemu_co_send(sockfd, hdr, sizeof(*hdr));
if (ret < sizeof(*hdr)) {
error_report("failed to send a req, %s", strerror(errno));
+ return ret;
}
ret = qemu_co_send(sockfd, data, *wlen);
--
1.7.6.5
- [Qemu-devel] [PATCH 11/46] block/vpc: write checksum back to footer after check, (continued)
- [Qemu-devel] [PATCH 11/46] block/vpc: write checksum back to footer after check, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 15/46] vdi: basic conversion to coroutines, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 09/46] ide: Change serial number strncpy() to pstrcpy(), Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 27/46] block: document job API, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 19/46] vdi: leave bounce buffering to block layer, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 29/46] qed: image fragmentation statistics, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 14/46] block: enforce constraints on block size properties, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 12/46] qerror: fix QERR_PROPERTY_VALUE_OUT_OF_RANGE description, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 45/46] qed: honor BDRV_O_INCOMING for incoming live migration, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 44/46] migration: clear BDRV_O_INCOMING flags on end of incoming live migration, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 34/46] sheepdog: fix send req helpers,
Kevin Wolf <=
- [Qemu-devel] [PATCH 31/46] qed: track dirty flag status, Kevin Wolf, 2012/04/06
- [Qemu-devel] [PATCH 40/46] block: Add new BDRV_O_INCOMING flag to notice incoming live migration, Kevin Wolf, 2012/04/06
- [Qemu-devel] [PATCH 46/46] qed: remove incoming live migration blocker, Kevin Wolf, 2012/04/06
- [Qemu-devel] [PATCH 16/46] vdi: move end-of-I/O handling at the end, Kevin Wolf, 2012/04/06
- [Qemu-devel] [PATCH 30/46] qemu-img: add dirty flag status, Kevin Wolf, 2012/04/06
- [Qemu-devel] [PATCH 41/46] block: add a function to clear incoming live migration flags, Kevin Wolf, 2012/04/06
- [Qemu-devel] [PATCH 39/46] block stream: close unused files and update ->backing_hd, Kevin Wolf, 2012/04/06
- [Qemu-devel] [PATCH 26/46] block: set job->speed in block_set_speed, Kevin Wolf, 2012/04/06
- [Qemu-devel] [PATCH 35/46] qemu-iotests: qcow2.py, Kevin Wolf, 2012/04/06