diff options
author | Alberto Faria <afaria@redhat.com> | 2022-06-09 16:27:35 +0100 |
---|---|---|
committer | Hanna Reitz <hreitz@redhat.com> | 2022-07-12 12:14:55 +0200 |
commit | 53fb7844f03241a0e6de2c342c9e1b89df12da4d (patch) | |
tree | 917522c3ce90e4449ffa7fb2a430aa137c22391e /include/block/block-io.h | |
parent | 9548cbeffffd4253e38570d29b8cff0bf77c998f (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 'include/block/block-io.h')
-rw-r--r-- | include/block/block-io.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/block/block-io.h b/include/block/block-io.h index 053a27141a..1a02d235f8 100644 --- a/include/block/block-io.h +++ b/include/block/block-io.h @@ -42,11 +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, void *buf, int64_t bytes, + BdrvRequestFlags flags); int bdrv_pwrite(BdrvChild *child, int64_t offset, const void *buf, - int64_t bytes); + int64_t bytes, BdrvRequestFlags flags); int bdrv_pwrite_sync(BdrvChild *child, int64_t offset, - const void *buf, int64_t bytes); + const void *buf, int64_t bytes, 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 |