aboutsummaryrefslogtreecommitdiff
path: root/block/parallels-ext.c
diff options
context:
space:
mode:
authorAlberto Faria <afaria@redhat.com>2022-06-09 16:27:35 +0100
committerHanna Reitz <hreitz@redhat.com>2022-07-12 12:14:55 +0200
commit53fb7844f03241a0e6de2c342c9e1b89df12da4d (patch)
tree917522c3ce90e4449ffa7fb2a430aa137c22391e /block/parallels-ext.c
parent9548cbeffffd4253e38570d29b8cff0bf77c998f (diff)
block: Add a 'flags' param to bdrv_{pread,pwrite,pwrite_sync}()
For consistency with other I/O functions, and in preparation to implement them using generated_co_wrapper. Callers were updated using this Coccinelle script: @@ expression child, offset, buf, bytes; @@ - bdrv_pread(child, offset, buf, bytes) + bdrv_pread(child, offset, buf, bytes, 0) @@ expression child, offset, buf, bytes; @@ - bdrv_pwrite(child, offset, buf, bytes) + bdrv_pwrite(child, offset, buf, bytes, 0) @@ expression child, offset, buf, bytes; @@ - bdrv_pwrite_sync(child, offset, buf, bytes) + bdrv_pwrite_sync(child, offset, buf, bytes, 0) Resulting overly-long lines were then fixed by hand. Signed-off-by: Alberto Faria <afaria@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Message-Id: <20220609152744.3891847-2-afaria@redhat.com> Reviewed-by: Hanna Reitz <hreitz@redhat.com> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Diffstat (limited to 'block/parallels-ext.c')
-rw-r--r--block/parallels-ext.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/parallels-ext.c b/block/parallels-ext.c
index 5122f67ac2..f737104d12 100644
--- a/block/parallels-ext.c
+++ b/block/parallels-ext.c
@@ -94,7 +94,7 @@ static int parallels_load_bitmap_data(BlockDriverState *bs,
bdrv_dirty_bitmap_deserialize_ones(bitmap, offset, count, false);
} else {
ret = bdrv_pread(bs->file, entry << BDRV_SECTOR_BITS, buf,
- s->cluster_size);
+ s->cluster_size, 0);
if (ret < 0) {
error_setg_errno(errp, -ret,
"Failed to read bitmap data cluster");
@@ -286,7 +286,7 @@ int parallels_read_format_extension(BlockDriverState *bs,
assert(ext_off > 0);
- ret = bdrv_pread(bs->file, ext_off, ext_cluster, s->cluster_size);
+ ret = bdrv_pread(bs->file, ext_off, ext_cluster, s->cluster_size, 0);
if (ret < 0) {
error_setg_errno(errp, -ret, "Failed to read Format Extension cluster");
goto out;