[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] block/quorum: make quorum_getlength error message u
From: |
Liu Yuan |
Subject: |
[Qemu-devel] [PATCH] block/quorum: make quorum_getlength error message user friendly |
Date: |
Fri, 11 Jul 2014 15:34:25 +0800 |
When start quorum driver with 2 different sized images, we get:
qemu-system-x86_64: -drive if=virtio,driver=quorum...: Could not refresh total \
sector count: Input/output error
EIO would confuse users. With this patch, the error message goes like
Children images are not in the same size
qemu-system-x86_64: -drive if=virtio,driver=quorum...: Could not refresh total \
sector count: Invalid argument
Cc: Benoit Canet <address@hidden>
Cc: Kevin Wolf <address@hidden>
Cc: Stefan Hajnoczi <address@hidden>
Signed-off-by: Liu Yuan <address@hidden>
---
block/quorum.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/block/quorum.c b/block/quorum.c
index 2f18755..51437ad 100644
--- a/block/quorum.c
+++ b/block/quorum.c
@@ -736,7 +736,8 @@ static int64_t quorum_getlength(BlockDriverState *bs)
return value;
}
if (value != result) {
- return -EIO;
+ error_printf("Children images are not in the same size\n");
+ return -EINVAL;
}
}
--
1.9.1
- [Qemu-devel] [PATCH] block/quorum: make quorum_getlength error message user friendly,
Liu Yuan <=