aboutsummaryrefslogtreecommitdiff
path: root/include/block
diff options
context:
space:
mode:
authorAlberto Faria <afaria@redhat.com>2022-06-09 16:27:36 +0100
committerHanna Reitz <hreitz@redhat.com>2022-07-12 12:14:55 +0200
commit32cc71def9e3885f9527af713e6d8dc7521ddc08 (patch)
tree9ec7c6a1c10523d79b9b8aeb4ba6ace82c3f5b87 /include/block
parent53fb7844f03241a0e6de2c342c9e1b89df12da4d (diff)
downloadqemu-32cc71def9e3885f9527af713e6d8dc7521ddc08.zip
qemu-32cc71def9e3885f9527af713e6d8dc7521ddc08.tar.gz
qemu-32cc71def9e3885f9527af713e6d8dc7521ddc08.tar.bz2
block: Change bdrv_{pread,pwrite,pwrite_sync}() param order
Swap 'buf' and 'bytes' around for consistency with bdrv_co_{pread,pwrite}(), and in preparation to implement these functions using generated_co_wrapper. Callers were updated using this Coccinelle script: @@ expression child, offset, buf, bytes, flags; @@ - bdrv_pread(child, offset, buf, bytes, flags) + bdrv_pread(child, offset, bytes, buf, flags) @@ expression child, offset, buf, bytes, flags; @@ - bdrv_pwrite(child, offset, buf, bytes, flags) + bdrv_pwrite(child, offset, bytes, buf, flags) @@ expression child, offset, buf, bytes, flags; @@ - bdrv_pwrite_sync(child, offset, buf, bytes, flags) + bdrv_pwrite_sync(child, offset, bytes, buf, flags) 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-3-afaria@redhat.com> Reviewed-by: Hanna Reitz <hreitz@redhat.com> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Diffstat (limited to 'include/block')
-rw-r--r--include/block/block-io.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/block/block-io.h b/include/block/block-io.h
index 1a02d23..ecce56c 100644
--- a/include/block/block-io.h
+++ b/include/block/block-io.h
@@ -42,12 +42,12 @@
int bdrv_pwrite_zeroes(BdrvChild *child, int64_t offset,
int64_t bytes, BdrvRequestFlags flags);
int bdrv_make_zero(BdrvChild *child, BdrvRequestFlags flags);
-int bdrv_pread(BdrvChild *child, int64_t offset, void *buf, int64_t bytes,
+int bdrv_pread(BdrvChild *child, int64_t offset, int64_t bytes, void *buf,
BdrvRequestFlags flags);
-int bdrv_pwrite(BdrvChild *child, int64_t offset, const void *buf,
- int64_t bytes, BdrvRequestFlags flags);
-int bdrv_pwrite_sync(BdrvChild *child, int64_t offset,
- const void *buf, int64_t bytes, BdrvRequestFlags flags);
+int bdrv_pwrite(BdrvChild *child, int64_t offset, int64_t bytes,
+ const void *buf, BdrvRequestFlags flags);
+int bdrv_pwrite_sync(BdrvChild *child, int64_t offset, int64_t bytes,
+ const void *buf, BdrvRequestFlags flags);
/*
* Efficiently zero a region of the disk image. Note that this is a regular
* I/O request like read or write and should have a reasonable size. This