[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 01/56] block: implement the bdrv_reopen_prepare helpe
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 01/56] block: implement the bdrv_reopen_prepare helper for LUKS driver |
Date: |
Fri, 9 Mar 2018 17:18:38 +0100 |
From: "Daniel P. Berrange" <address@hidden>
If the bdrv_reopen_prepare helper isn't provided, the qemu-img commit
command fails to re-open the base layer after committing changes into
it. Provide a no-op implementation for the LUKS driver, since there
is not any custom work that needs doing to re-open it.
Signed-off-by: Daniel P. Berrange <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/crypto.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/block/crypto.c b/block/crypto.c
index 17b5c0abad..e6095e7807 100644
--- a/block/crypto.c
+++ b/block/crypto.c
@@ -384,6 +384,12 @@ static void block_crypto_close(BlockDriverState *bs)
qcrypto_block_free(crypto->block);
}
+static int block_crypto_reopen_prepare(BDRVReopenState *state,
+ BlockReopenQueue *queue, Error **errp)
+{
+ /* nothing needs checking */
+ return 0;
+}
/*
* 1 MB bounce buffer gives good performance / memory tradeoff
@@ -621,6 +627,7 @@ BlockDriver bdrv_crypto_luks = {
.bdrv_truncate = block_crypto_truncate,
.create_opts = &block_crypto_create_opts_luks,
+ .bdrv_reopen_prepare = block_crypto_reopen_prepare,
.bdrv_refresh_limits = block_crypto_refresh_limits,
.bdrv_co_preadv = block_crypto_co_preadv,
.bdrv_co_pwritev = block_crypto_co_pwritev,
--
2.13.6
- [Qemu-block] [PULL 00/56] Block layer patches, Kevin Wolf, 2018/03/09
- [Qemu-block] [PULL 05/56] qed: make bdrv_qed_do_open a coroutine_fn, Kevin Wolf, 2018/03/09
- [Qemu-block] [PULL 03/56] qcow2: fix flushing after dirty bitmap metadata writes, Kevin Wolf, 2018/03/09
- [Qemu-block] [PULL 02/56] qcow2: introduce qcow2_write_caches and qcow2_flush_caches, Kevin Wolf, 2018/03/09
- [Qemu-block] [PULL 01/56] block: implement the bdrv_reopen_prepare helper for LUKS driver,
Kevin Wolf <=
- [Qemu-block] [PULL 04/56] qcow2: make qcow2_do_open a coroutine_fn, Kevin Wolf, 2018/03/09
- [Qemu-block] [PULL 09/56] qcow2: Check L1 table offset in qcow2_snapshot_load_tmp(), Kevin Wolf, 2018/03/09
- [Qemu-block] [PULL 08/56] qcow2: Generalize validate_table_offset() into qcow2_validate_table(), Kevin Wolf, 2018/03/09
- [Qemu-block] [PULL 06/56] block: convert bdrv_invalidate_cache callback to coroutine_fn, Kevin Wolf, 2018/03/09
- [Qemu-block] [PULL 07/56] block: convert bdrv_check callback to coroutine_fn, Kevin Wolf, 2018/03/09
- [Qemu-block] [PULL 11/56] qcow2: Check snapshot L1 tables in qcow2_check_metadata_overlap(), Kevin Wolf, 2018/03/09
- [Qemu-block] [PULL 12/56] qcow2: Check snapshot L1 table in qcow2_snapshot_goto(), Kevin Wolf, 2018/03/09
- [Qemu-block] [PULL 13/56] qcow2: Check snapshot L1 table in qcow2_snapshot_delete(), Kevin Wolf, 2018/03/09
- [Qemu-block] [PULL 10/56] qcow2: Check L1 table parameters in qcow2_expand_zero_clusters(), Kevin Wolf, 2018/03/09
- [Qemu-block] [PULL 14/56] qcow2: Make qemu-img check detect corrupted L1 tables in snapshots, Kevin Wolf, 2018/03/09