qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 14/47] stream: add on-error argument


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 14/47] stream: add on-error argument
Date: Wed, 01 Aug 2012 13:11:27 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1

Il 01/08/2012 12:29, Kevin Wolf ha scritto:
>> > +    if ((on_error == BLOCKDEV_ON_ERROR_STOP ||
>> > +         on_error == BLOCKDEV_ON_ERROR_ENOSPC) &&
>> > +        !bdrv_iostatus_is_enabled(bs)) {
>> > +        error_set(errp, QERR_INVALID_PARAMETER, "on-error");
>> > +        return;
>> > +    }
> Hm, this is an interesting one. bdrv_iostatus_is_enabled() returns true
> for a block device that is (or was once) attached to virtio-blk, IDE or
> scsi-disk. Which made sense so far because only these devices would
> actually set the status.
> 
> Now with block jobs, we have other places that can set the status. And
> we have images that don't belong to any device, but can still get errors
> (mirror target). Maybe it would make sense to just enable the iostatus
> here instead of failing?

I'm not sure what would happen, so I preferred to be safe.

The right solution would be "support iostatus in sd and friends, and
drop bdrv_iostatus_is_enabled altogether", of course...

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]