[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 17/18] block: Reorganize some declarations in block-backend-i
From: |
Hanna Reitz |
Subject: |
Re: [PATCH 17/18] block: Reorganize some declarations in block-backend-io.h |
Date: |
Tue, 5 Jul 2022 11:18:43 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 |
On 17.05.22 13:39, Alberto Faria wrote:
Keep generated_co_wrapper and coroutine_fn pairs together. This should
make it clear that each I/O function has these two versions.
Also move blk_co_{pread,pwrite}()'s implementations out of the header
file for consistency.
Signed-off-by: Alberto Faria <afaria@redhat.com>
---
block/block-backend.c | 22 ++++++++
include/sysemu/block-backend-io.h | 87 +++++++++++++------------------
2 files changed, 59 insertions(+), 50 deletions(-)
[...]
diff --git a/include/sysemu/block-backend-io.h
b/include/sysemu/block-backend-io.h
index 004493ec36..30ed979fb1 100644
--- a/include/sysemu/block-backend-io.h
+++ b/include/sysemu/block-backend-io.h
@@ -88,11 +88,6 @@ uint32_t blk_get_request_alignment(BlockBackend *blk);
uint32_t blk_get_max_transfer(BlockBackend *blk);
uint64_t blk_get_max_hw_transfer(BlockBackend *blk);
-int coroutine_fn blk_co_copy_range(BlockBackend *blk_in, int64_t off_in,
- BlockBackend *blk_out, int64_t off_out,
- int64_t bytes, BdrvRequestFlags read_flags,
- BdrvRequestFlags write_flags);
-
/*
* "I/O or GS" API functions. These functions can run without
[...]
@@ -190,4 +172,9 @@ int coroutine_fn blk_co_truncate(BlockBackend *blk, int64_t
offset, bool exact,
PreallocMode prealloc, BdrvRequestFlags
flags,
Error **errp);
+int coroutine_fn blk_co_copy_range(BlockBackend *blk_in, int64_t off_in,
+ BlockBackend *blk_out, int64_t off_out,
+ int64_t bytes, BdrvRequestFlags read_flags,
+ BdrvRequestFlags write_flags);
+
#endif /* BLOCK_BACKEND_IO_H */
This moves blk_co_copy_range() from the “I/O API functions” section of
this header into the “"I/O or GS" API functions” section. Is that intended?
The rest looks good to me, but I wonder about this one function.
Hanna
- Re: [PATCH 17/18] block: Reorganize some declarations in block-backend-io.h,
Hanna Reitz <=