[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 4/6] block: blk_root(): return non-const pointer
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
[PATCH 4/6] block: blk_root(): return non-const pointer |
Date: |
Fri, 21 May 2021 20:49:23 +0300 |
In the following patch we'll want to pass blk children to block-copy.
Const pointers are not enough. So, return non const pointer from
blk_root().
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
---
include/sysemu/block-backend.h | 2 +-
block/block-backend.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h
index aec05ef0a0..9c755c38b1 100644
--- a/include/sysemu/block-backend.h
+++ b/include/sysemu/block-backend.h
@@ -266,7 +266,7 @@ int coroutine_fn blk_co_copy_range(BlockBackend *blk_in,
int64_t off_in,
int bytes, BdrvRequestFlags read_flags,
BdrvRequestFlags write_flags);
-const BdrvChild *blk_root(BlockBackend *blk);
+BdrvChild *blk_root(BlockBackend *blk);
int blk_make_empty(BlockBackend *blk, Error **errp);
diff --git a/block/block-backend.c b/block/block-backend.c
index b1abc6f3e6..758cd8507e 100644
--- a/block/block-backend.c
+++ b/block/block-backend.c
@@ -2452,7 +2452,7 @@ int coroutine_fn blk_co_copy_range(BlockBackend *blk_in,
int64_t off_in,
bytes, read_flags, write_flags);
}
-const BdrvChild *blk_root(BlockBackend *blk)
+BdrvChild *blk_root(BlockBackend *blk)
{
return blk->root;
}
--
2.29.2
- [PATCH 0/6] push backup with fleecing, Vladimir Sementsov-Ogievskiy, 2021/05/21
- [PATCH 1/6] block/block-copy: use write-unchanged for fleecing scheme, Vladimir Sementsov-Ogievskiy, 2021/05/21
- [PATCH 2/6] block/copy-before-write: require BLK_PERM_WRITE_UNCHANGED for fleecing, Vladimir Sementsov-Ogievskiy, 2021/05/21
- [PATCH 3/6] block: share writes on backing child of fleecing node, Vladimir Sementsov-Ogievskiy, 2021/05/21
- [PATCH 4/6] block: blk_root(): return non-const pointer,
Vladimir Sementsov-Ogievskiy <=
- [PATCH 5/6] block/backup: don't insert filter if no writers, Vladimir Sementsov-Ogievskiy, 2021/05/21
- [PATCH 6/6] iotests/image-fleecing: test push backup with fleecing, Vladimir Sementsov-Ogievskiy, 2021/05/21