Am 01.08.2012 13:11, schrieb Paolo Bonzini:
> 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...
Support it _for_ sd and friends, but support it _in_ the block layer.
What's missing before this can happen is a VMState for the block layer
so that requeued requests can be migrated. Breaks migration
compatibility, obviously.
Kevin