On 11/12/26 03:49, Niklas Cassel wrote:
> virtio-blk completes a failed write with VIRTIO_BLK_S_IOERR, and a
> failed zone append or zone management request with
> VIRTIO_BLK_S_ZONE_INVALID_CMD. It never reports the zone status codes
> that virtio 1.4 (5.2.6.2) requires for a write off the write pointer
> or for a request that exceeds a zone resource limit.
> 
> When VIRTIO_BLK_F_ZONED is negotiated, map the zone errors of the block
> layer to them:
> 
>   BLK_ZE_UNALIGNED_WRITE  VIRTIO_BLK_S_ZONE_UNALIGNED_WP
>   BLK_ZE_BOUNDARY         VIRTIO_BLK_S_ZONE_INVALID_CMD
>   BLK_ZE_OPEN_RESOURCE    VIRTIO_BLK_S_ZONE_OPEN_RESOURCE
>   BLK_ZE_ACTIVE_RESOURCE  VIRTIO_BLK_S_ZONE_ACTIVE_RESOURCE
>   BLK_ZE_FULL             VIRTIO_BLK_S_ZONE_INVALID_CMD
> 
> Other errors keep their status code. A FINISH that exceeds a zone
> resource limit also gets a zone resource status code, which 5.2.6
> defines for any zone operation. Zone errors of writes are reported
> regardless of the rerror/werror policy, as they are the deterministic
> result of the request.
> 
> Signed-off-by: Niklas Cassel <[email protected]>

Looks OK to me.

Reviewed-by: Damien Le Moal <[email protected]>

-- 
Damien Le Moal
Western Digital Research

Reply via email to