]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
virtio-blk: improve virtqueue error to BLK_STS
authorHalil Pasic <pasic@linux.ibm.com>
Thu, 13 Feb 2020 12:37:28 +0000 (13:37 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Thu, 14 May 2020 08:54:20 +0000 (10:54 +0200)
commita045b52f3121ee1f0a537c65fae16c3bcf1ff0cc
tree637f93a8451b379e92a7e1edd506634a1a5ab815
parent9e16b163f2a5124709e67ec40ea269b81b95125e
virtio-blk: improve virtqueue error to BLK_STS

BugLink: https://bugs.launchpad.net/bugs/1877461
[ Upstream commit 3d973b2e9a625996ee997c7303cd793b9d197c65 ]

Let's change the mapping between virtqueue_add errors to BLK_STS
statuses, so that -ENOSPC, which indicates virtqueue full is still
mapped to BLK_STS_DEV_RESOURCE, but -ENOMEM which indicates non-device
specific resource outage is mapped to BLK_STS_RESOURCE.

Signed-off-by: Halil Pasic <pasic@linux.ibm.com>
Link: https://lore.kernel.org/r/20200213123728.61216-3-pasic@linux.ibm.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/block/virtio_blk.c