[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v6 06/42] qcow2: Implement .bdrv_storage_child()
From: |
Max Reitz |
Subject: |
[Qemu-devel] [PATCH v6 06/42] qcow2: Implement .bdrv_storage_child() |
Date: |
Fri, 9 Aug 2019 18:13:31 +0200 |
Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
---
block/qcow2.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/block/qcow2.c b/block/qcow2.c
index 039bdc2f7e..f8570d6210 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -5086,6 +5086,13 @@ void qcow2_signal_corruption(BlockDriverState *bs, bool
fatal, int64_t offset,
s->signaled_corruption = true;
}
+static BdrvChild *qcow2_storage_child(BlockDriverState *bs)
+{
+ BDRVQcow2State *s = bs->opaque;
+
+ return s->data_file;
+}
+
static QemuOptsList qcow2_create_opts = {
.name = "qcow2-create-opts",
.head = QTAILQ_HEAD_INITIALIZER(qcow2_create_opts.head),
@@ -5232,6 +5239,8 @@ BlockDriver bdrv_qcow2 = {
.bdrv_reopen_bitmaps_rw = qcow2_reopen_bitmaps_rw,
.bdrv_can_store_new_dirty_bitmap = qcow2_can_store_new_dirty_bitmap,
.bdrv_remove_persistent_dirty_bitmap =
qcow2_remove_persistent_dirty_bitmap,
+
+ .bdrv_storage_child = qcow2_storage_child,
};
static void bdrv_qcow2_init(void)
--
2.21.0
- [Qemu-devel] [PATCH v6 00/42] block: Deal with filters, Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 01/42] block: Mark commit and mirror as filter drivers, Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 02/42] copy-on-read: Support compressed writes, Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 03/42] throttle: Support compressed writes, Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 05/42] block: Add chain helper functions, Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 06/42] qcow2: Implement .bdrv_storage_child(),
Max Reitz <=
- [Qemu-devel] [PATCH v6 04/42] block: Add child access functions, Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 07/42] block: *filtered_cow_child() for *has_zero_init(), Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 08/42] block: bdrv_set_backing_hd() is about bs->backing, Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 10/42] block: Drop bdrv_is_encrypted(), Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 09/42] block: Include filters when freezing backing chain, Max Reitz, 2019/08/09