diff options
author | Kevin Wolf <kwolf@redhat.com> | 2016-06-20 20:09:15 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2016-07-05 16:46:27 +0200 |
commit | d9ca2ea2e261442c267f542953a5f3243e4f608e (patch) | |
tree | ad020b3c0d4f341972e0ad8bcaaace9f3785728d /block/qcow2-cluster.c | |
parent | cf2ab8fc345c34f8671fade9230746610e4fc340 (diff) | |
download | qemu-d9ca2ea2e261442c267f542953a5f3243e4f608e.zip qemu-d9ca2ea2e261442c267f542953a5f3243e4f608e.tar.gz qemu-d9ca2ea2e261442c267f542953a5f3243e4f608e.tar.bz2 |
block: Convert bdrv_pwrite(v/_sync) to BdrvChild
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block/qcow2-cluster.c')
-rw-r--r-- | block/qcow2-cluster.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index a2490d7..0cd7fdf 100644 --- a/block/qcow2-cluster.c +++ b/block/qcow2-cluster.c @@ -108,7 +108,7 @@ int qcow2_grow_l1_table(BlockDriverState *bs, uint64_t min_size, BLKDBG_EVENT(bs->file, BLKDBG_L1_GROW_WRITE_TABLE); for(i = 0; i < s->l1_size; i++) new_l1_table[i] = cpu_to_be64(new_l1_table[i]); - ret = bdrv_pwrite_sync(bs->file->bs, new_l1_table_offset, + ret = bdrv_pwrite_sync(bs->file, new_l1_table_offset, new_l1_table, new_l1_size2); if (ret < 0) goto fail; @@ -119,7 +119,7 @@ int qcow2_grow_l1_table(BlockDriverState *bs, uint64_t min_size, BLKDBG_EVENT(bs->file, BLKDBG_L1_GROW_ACTIVATE_TABLE); cpu_to_be32w((uint32_t*)data, new_l1_size); stq_be_p(data + 4, new_l1_table_offset); - ret = bdrv_pwrite_sync(bs->file->bs, offsetof(QCowHeader, l1_size), + ret = bdrv_pwrite_sync(bs->file, offsetof(QCowHeader, l1_size), data, sizeof(data)); if (ret < 0) { goto fail; @@ -185,7 +185,7 @@ int qcow2_write_l1_entry(BlockDriverState *bs, int l1_index) } BLKDBG_EVENT(bs->file, BLKDBG_L1_UPDATE); - ret = bdrv_pwrite_sync(bs->file->bs, + ret = bdrv_pwrite_sync(bs->file, s->l1_table_offset + 8 * l1_start_index, buf, sizeof(buf)); if (ret < 0) { |