summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy2020-12-03 23:27:12 +0100
committerKevin Wolf2020-12-11 17:52:40 +0100
commitf4dad307ef844af097377c77dfb8049cc4b0b8d3 (patch)
tree1f4336ed57582020483e6ca882a939cbc5330708 /include
parentblock/io: bdrv_refresh_limits(): use ERRP_GUARD (diff)
downloadqemu-f4dad307ef844af097377c77dfb8049cc4b0b8d3.tar.gz
qemu-f4dad307ef844af097377c77dfb8049cc4b0b8d3.tar.xz
qemu-f4dad307ef844af097377c77dfb8049cc4b0b8d3.zip
block/io: bdrv_check_byte_request(): drop bdrv_is_inserted()
Move bdrv_is_inserted() calls into callers. We are going to make bdrv_check_byte_request() a clean thing. bdrv_is_inserted() is not about checking the request, it's about checking the bs. So, it should be separate. With this patch we probably change error path for some failure scenarios. But depending on the fact that querying too big request on empty cdrom (or corrupted qcow2 node with no drv) will result in EIO and not ENOMEDIUM would be very strange. More over, we are going to move to 64bit requests, so larger requests will be allowed anyway. More over, keeping in mind that cdrom is the only driver that has .bdrv_is_inserted() handler it's strange that we should care so much about it in generic block layer, intuitively we should just do read and write, and cdrom driver should return correct errors if it is not inserted. But it's a work for another series. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20201203222713.13507-4-vsementsov@virtuozzo.com> Reviewed-by: Alberto Garcia <berto@igalia.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions