mirror of
https://github.com/mborgerson/xemu.git
synced 2025-12-01 16:10:01 +00:00
block: Rename refresh_total_sectors to bdrv_refresh_total_sectors
The name is not good, not the least because we are going to convert this to a generated co_wrapper, which adds a _co infix after the first part of the name. No functional change intended. Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20230113204212.359076-6-kwolf@redhat.com> Reviewed-by: Emanuele Giuseppe Esposito <eesposit@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
committed by
Kevin Wolf
parent
1e97be9156
commit
c057960c4e
8
block.c
8
block.c
@ -1035,7 +1035,7 @@ static int find_image_format(BlockBackend *file, const char *filename,
|
||||
* Set the current 'total_sectors' value
|
||||
* Return 0 on success, -errno on error.
|
||||
*/
|
||||
int refresh_total_sectors(BlockDriverState *bs, int64_t hint)
|
||||
int bdrv_refresh_total_sectors(BlockDriverState *bs, int64_t hint)
|
||||
{
|
||||
BlockDriver *drv = bs->drv;
|
||||
IO_CODE();
|
||||
@ -1652,7 +1652,7 @@ static int bdrv_open_driver(BlockDriverState *bs, BlockDriver *drv,
|
||||
bs->supported_read_flags |= BDRV_REQ_REGISTERED_BUF;
|
||||
bs->supported_write_flags |= BDRV_REQ_REGISTERED_BUF;
|
||||
|
||||
ret = refresh_total_sectors(bs, bs->total_sectors);
|
||||
ret = bdrv_refresh_total_sectors(bs, bs->total_sectors);
|
||||
if (ret < 0) {
|
||||
error_setg_errno(errp, -ret, "Could not refresh total sector count");
|
||||
return ret;
|
||||
@ -5809,7 +5809,7 @@ int64_t bdrv_nb_sectors(BlockDriverState *bs)
|
||||
return -ENOMEDIUM;
|
||||
|
||||
if (drv->has_variable_length) {
|
||||
int ret = refresh_total_sectors(bs, bs->total_sectors);
|
||||
int ret = bdrv_refresh_total_sectors(bs, bs->total_sectors);
|
||||
if (ret < 0) {
|
||||
return ret;
|
||||
}
|
||||
@ -6591,7 +6591,7 @@ int bdrv_activate(BlockDriverState *bs, Error **errp)
|
||||
bdrv_dirty_bitmap_skip_store(bm, false);
|
||||
}
|
||||
|
||||
ret = refresh_total_sectors(bs, bs->total_sectors);
|
||||
ret = bdrv_refresh_total_sectors(bs, bs->total_sectors);
|
||||
if (ret < 0) {
|
||||
bs->open_flags |= BDRV_O_INACTIVE;
|
||||
error_setg_errno(errp, -ret, "Could not refresh total sector count");
|
||||
|
||||
Reference in New Issue
Block a user