On Fri, Jul 11, 2014 at 12:26:58PM +0200, Kevin Wolf wrote:
> 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 <ben...@irqsave.net>
> > Cc: Kevin Wolf <kw...@redhat.com>
> > Cc: Stefan Hajnoczi <stefa...@redhat.com>
> > Signed-off-by: Liu Yuan <namei.u...@gmail.com>
> 
> 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

Make sense. I'll do it after we settle down my 'add simple read pattern' patch
since they are conflicted.

Yuan

Reply via email to