mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
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>
This commit is contained in:
parent
9548cbefff
commit
53fb7844f0
24 changed files with 219 additions and 219 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue