aboutsummaryrefslogtreecommitdiff
path: root/block/vvfat.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2023-09-04 12:03:06 +0200
committerKevin Wolf <kwolf@redhat.com>2023-10-12 16:31:33 +0200
commitcc323997731bb1c2a9896fcca668b57d82d62153 (patch)
tree18f37fcc7315e89f931202a188a05c6c8ac48e2e /block/vvfat.c
parent578ffa9ffb13d9a40790de2a3dda8730d4d43efc (diff)
downloadqemu-cc323997731bb1c2a9896fcca668b57d82d62153.zip
qemu-cc323997731bb1c2a9896fcca668b57d82d62153.tar.gz
qemu-cc323997731bb1c2a9896fcca668b57d82d62153.tar.bz2
block: convert more bdrv_is_allocated* and bdrv_block_status* calls to coroutine versions
Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-ID: <20230904100306.156197-5-pbonzini@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/vvfat.c')
-rw-r--r--block/vvfat.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/block/vvfat.c b/block/vvfat.c
index 856b479..1a3a64c 100644
--- a/block/vvfat.c
+++ b/block/vvfat.c
@@ -1480,8 +1480,8 @@ vvfat_read(BlockDriverState *bs, int64_t sector_num, uint8_t *buf, int nb_sector
if (s->qcow) {
int64_t n;
int ret;
- ret = bdrv_is_allocated(s->qcow->bs, sector_num * BDRV_SECTOR_SIZE,
- (nb_sectors - i) * BDRV_SECTOR_SIZE, &n);
+ ret = bdrv_co_is_allocated(s->qcow->bs, sector_num * BDRV_SECTOR_SIZE,
+ (nb_sectors - i) * BDRV_SECTOR_SIZE, &n);
if (ret < 0) {
return ret;
}
@@ -1806,10 +1806,10 @@ cluster_was_modified(BDRVVVFATState *s, uint32_t cluster_num)
}
for (i = 0; !was_modified && i < s->sectors_per_cluster; i++) {
- was_modified = bdrv_is_allocated(s->qcow->bs,
- (cluster2sector(s, cluster_num) +
- i) * BDRV_SECTOR_SIZE,
- BDRV_SECTOR_SIZE, NULL);
+ was_modified = bdrv_co_is_allocated(s->qcow->bs,
+ (cluster2sector(s, cluster_num) +
+ i) * BDRV_SECTOR_SIZE,
+ BDRV_SECTOR_SIZE, NULL);
}
/*
@@ -1967,9 +1967,9 @@ get_cluster_count_for_direntry(BDRVVVFATState* s, direntry_t* direntry, const ch
for (i = 0; i < s->sectors_per_cluster; i++) {
int res;
- res = bdrv_is_allocated(s->qcow->bs,
- (offs + i) * BDRV_SECTOR_SIZE,
- BDRV_SECTOR_SIZE, NULL);
+ res = bdrv_co_is_allocated(s->qcow->bs,
+ (offs + i) * BDRV_SECTOR_SIZE,
+ BDRV_SECTOR_SIZE, NULL);
if (res < 0) {
return -1;
}