[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH 1/5] qcow2: Replace bdrv_write() with bdrv_pwrite()
From: |
Alberto Garcia |
Subject: |
[Qemu-block] [PATCH 1/5] qcow2: Replace bdrv_write() with bdrv_pwrite() |
Date: |
Mon, 29 Apr 2019 20:42:36 +0200 |
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 <address@hidden>
---
block/qcow2-refcount.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c
index e0fe322500..83f66eed7a 100644
--- a/block/qcow2-refcount.c
+++ b/block/qcow2-refcount.c
@@ -2409,8 +2409,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;
--
2.11.0
- [Qemu-block] [PATCH 0/5] Remove bdrv_read() and bdrv_write(), Alberto Garcia, 2019/04/29
- [Qemu-block] [PATCH 1/5] qcow2: Replace bdrv_write() with bdrv_pwrite(),
Alberto Garcia <=
- [Qemu-block] [PATCH 2/5] vdi: Replace bdrv_{read, write}() with bdrv_{pread, pwrite}(), Alberto Garcia, 2019/04/29
- [Qemu-block] [PATCH 3/5] vvfat: Replace bdrv_{read, write}() with bdrv_{pread, pwrite}(), Alberto Garcia, 2019/04/29
- [Qemu-block] [PATCH 4/5] block: Remove bdrv_read() and bdrv_write(), Alberto Garcia, 2019/04/29
- [Qemu-block] [PATCH 5/5] qcow2: Remove BDRVQcow2State.cluster_sectors, Alberto Garcia, 2019/04/29
- Re: [Qemu-block] [PATCH 0/5] Remove bdrv_read() and bdrv_write(), Eric Blake, 2019/04/29