block: split flags in copy_range
Pass read flags and write flags separately. This is needed to handle coming BDRV_REQ_NO_SERIALISING clearly in following patches. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
committed by
Kevin Wolf
parent
999658a05e
commit
67b51fb998
@@ -699,5 +699,6 @@ void bdrv_unregister_buf(BlockDriverState *bs, void *host);
|
||||
**/
|
||||
int coroutine_fn bdrv_co_copy_range(BdrvChild *src, uint64_t src_offset,
|
||||
BdrvChild *dst, uint64_t dst_offset,
|
||||
uint64_t bytes, BdrvRequestFlags flags);
|
||||
uint64_t bytes, BdrvRequestFlags read_flags,
|
||||
BdrvRequestFlags write_flags);
|
||||
#endif
|
||||
|
@@ -218,7 +218,8 @@ struct BlockDriver {
|
||||
BdrvChild *dst,
|
||||
uint64_t dst_offset,
|
||||
uint64_t bytes,
|
||||
BdrvRequestFlags flags);
|
||||
BdrvRequestFlags read_flags,
|
||||
BdrvRequestFlags write_flags);
|
||||
|
||||
/* Map [offset, offset + nbytes) range onto a child of bs to copy data to,
|
||||
* and invoke bdrv_co_copy_range_to(child, src, ...), or perform the copy
|
||||
@@ -234,7 +235,8 @@ struct BlockDriver {
|
||||
BdrvChild *dst,
|
||||
uint64_t dst_offset,
|
||||
uint64_t bytes,
|
||||
BdrvRequestFlags flags);
|
||||
BdrvRequestFlags read_flags,
|
||||
BdrvRequestFlags write_flags);
|
||||
|
||||
/*
|
||||
* Building block for bdrv_block_status[_above] and
|
||||
@@ -1156,10 +1158,14 @@ void blockdev_close_all_bdrv_states(void);
|
||||
|
||||
int coroutine_fn bdrv_co_copy_range_from(BdrvChild *src, uint64_t src_offset,
|
||||
BdrvChild *dst, uint64_t dst_offset,
|
||||
uint64_t bytes, BdrvRequestFlags flags);
|
||||
uint64_t bytes,
|
||||
BdrvRequestFlags read_flags,
|
||||
BdrvRequestFlags write_flags);
|
||||
int coroutine_fn bdrv_co_copy_range_to(BdrvChild *src, uint64_t src_offset,
|
||||
BdrvChild *dst, uint64_t dst_offset,
|
||||
uint64_t bytes, BdrvRequestFlags flags);
|
||||
uint64_t bytes,
|
||||
BdrvRequestFlags read_flags,
|
||||
BdrvRequestFlags write_flags);
|
||||
|
||||
int refresh_total_sectors(BlockDriverState *bs, int64_t hint);
|
||||
|
||||
|
Reference in New Issue
Block a user