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