mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
IO_CODE and IO_OR_GS_CODE for block-backend I/O API
Mark all I/O functions with IO_CODE, and all "I/O OR GS" with IO_OR_GS_CODE. Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com> Message-Id: <20220303151616.325444-10-eesposit@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
0439c5a462
commit
37868b2ac6
2 changed files with 60 additions and 0 deletions
|
@ -121,6 +121,7 @@ static inline int coroutine_fn blk_co_pread(BlockBackend *blk, int64_t offset,
|
|||
BdrvRequestFlags flags)
|
||||
{
|
||||
QEMUIOVector qiov = QEMU_IOVEC_INIT_BUF(qiov, buf, bytes);
|
||||
IO_OR_GS_CODE();
|
||||
|
||||
assert(bytes <= SIZE_MAX);
|
||||
|
||||
|
@ -132,6 +133,7 @@ static inline int coroutine_fn blk_co_pwrite(BlockBackend *blk, int64_t offset,
|
|||
BdrvRequestFlags flags)
|
||||
{
|
||||
QEMUIOVector qiov = QEMU_IOVEC_INIT_BUF(qiov, buf, bytes);
|
||||
IO_OR_GS_CODE();
|
||||
|
||||
assert(bytes <= SIZE_MAX);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue