diff options
author | Alberto Garcia <berto@igalia.com> | 2019-05-01 21:13:55 +0300 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2019-05-10 16:45:40 +0200 |
commit | e3b4257d032dede8ffcfe868ffd74bb584842f62 (patch) | |
tree | 978ce2d5cebf85adf8ed5722bf50e60eae5c688d /block | |
parent | 97ede57a2b810445ac0c7e8ad1d2af6cc13bc76e (diff) |
qcow2: Replace bdrv_write() with bdrv_pwrite()
There's only one bdrv_write() call left in the qcow2 code, and it can
be trivially replaced with the byte-based bdrv_pwrite().
Signed-off-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/qcow2-refcount.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index fa7ac1f7cb..7481903396 100644 --- a/block/qcow2-refcount.c +++ b/block/qcow2-refcount.c @@ -2429,8 +2429,8 @@ write_refblocks: on_disk_refblock = (void *)((char *) *refcount_table + refblock_index * s->cluster_size); - ret = bdrv_write(bs->file, refblock_offset / BDRV_SECTOR_SIZE, - on_disk_refblock, s->cluster_sectors); + ret = bdrv_pwrite(bs->file, refblock_offset, on_disk_refblock, + s->cluster_size); if (ret < 0) { fprintf(stderr, "ERROR writing refblock: %s\n", strerror(-ret)); goto fail; |