aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2023-04-07 17:33:02 +0200
committerKevin Wolf <kwolf@redhat.com>2023-04-11 16:40:55 +0200
commit9ed98cae151368cc89c4bb77c9f325f7185e8f09 (patch)
tree74319a0ea554ff239fb471c8a7fd5f5f89cdbbc7 /include
parente5203a3b5db1fb1328f104a4863284198b551ce0 (diff)
downloadqemu-9ed98cae151368cc89c4bb77c9f325f7185e8f09.zip
qemu-9ed98cae151368cc89c4bb77c9f325f7185e8f09.tar.gz
qemu-9ed98cae151368cc89c4bb77c9f325f7185e8f09.tar.bz2
block-backend: ignore inserted state in blk_co_nb_sectors
All callers of blk_co_nb_sectors (and blk_nb_sectors) are able to handle a non-inserted CD-ROM as a zero-length file, they do not need to raise an error. Not using blk_co_is_available() aligns the function with blk_co_get_geometry(), which becomes a simple wrapper for blk_co_nb_sectors(). It will also make it possible to skip the creation of a coroutine in the (common) case where bs->bl.has_variable_length is false. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20230407153303.391121-8-pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions