[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC PATCH 03/14] quorum: ignore 0-length child
From: |
Wen Congyang |
Subject: |
[Qemu-devel] [RFC PATCH 03/14] quorum: ignore 0-length child |
Date: |
Thu, 12 Feb 2015 11:07:07 +0800 |
We connect to NBD server when starting block replication, so
the length is 0 before starting block replication.
Signed-off-by: Wen Congyang <address@hidden>
Signed-off-by: zhanghailiang <address@hidden>
Signed-off-by: Gonglei <address@hidden>
---
block/quorum.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/block/quorum.c b/block/quorum.c
index 5ed1ff8..e6aff5f 100644
--- a/block/quorum.c
+++ b/block/quorum.c
@@ -734,6 +734,11 @@ static int64_t quorum_getlength(BlockDriverState *bs)
if (value < 0) {
return value;
}
+
+ if (!value) {
+ continue;
+ }
+
if (value != result) {
return -EIO;
}
--
2.1.0
[Qemu-devel] [RFC PATCH 04/14] Add new block driver interfaces to control disk replication, Wen Congyang, 2015/02/11
[Qemu-devel] [RFC PATCH 03/14] quorum: ignore 0-length child,
Wen Congyang <=
[Qemu-devel] [RFC PATCH 05/14] quorom: implement block driver interfaces for block replication, Wen Congyang, 2015/02/11
[Qemu-devel] [RFC PATCH 06/14] NBD client: connect to nbd server later, Wen Congyang, 2015/02/11
[Qemu-devel] [RFC PATCH 09/14] block: give backing image its own BlockBackend, Wen Congyang, 2015/02/11