[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] block/quorum: make quorum_getlength error messa
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH] block/quorum: make quorum_getlength error message user friendly |
Date: |
Fri, 11 Jul 2014 12:26:58 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Am 11.07.2014 um 09:34 hat Liu Yuan geschrieben:
> 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>
I think it would be better to do this check in quorum_open() instead of
relying on bdrv_open() to perform a bdrv_getlength(). As a bonus,
quorum_open() has an Error argument, so we wouldn't have to use
something like error_printf(), which doesn't work well for QMP commands.
Kevin