[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v4 11/18] qcow2: convert QCow2 to use QCryptoBlo
From: |
Alberto Garcia |
Subject: |
Re: [Qemu-block] [PATCH v4 11/18] qcow2: convert QCow2 to use QCryptoBlock for encryption |
Date: |
Wed, 15 Feb 2017 15:29:09 +0100 |
User-agent: |
Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) |
On Fri 10 Feb 2017 06:09:03 PM CET, Daniel P. Berrange wrote:
> @@ -578,6 +582,7 @@ static void read_cache_sizes(BlockDriverState *bs,
> QemuOpts *opts,
> }
> }
>
> +
> typedef struct Qcow2ReopenState {
> Qcow2Cache *l2_table_cache;
> Qcow2Cache *refcount_block_cache;
I don't know if you wanted add that empty line up there...
> + switch (s->crypt_method_header) {
> + case QCOW_CRYPT_NONE:
> + break;
> +
> + case QCOW_CRYPT_AES:
> + r->crypto_opts = block_crypto_open_opts_init(
> + Q_CRYPTO_BLOCK_FORMAT_QCOW, opts, "aes-", errp);
> + break;
> +
> + default:
> + break;
> + }
> + if (s->crypt_method_header && !r->crypto_opts) {
> + error_setg(errp, "Unsupported encryption method %d",
> + s->crypt_method_header);
You cannot set errp here, because it's already set earlier if
block_crypto_open_opts_init() fails.
Berto
- [Qemu-block] [PATCH v4 07/18] iotests: fix 097 when run with qcow, (continued)
- [Qemu-block] [PATCH v4 07/18] iotests: fix 097 when run with qcow, Daniel P. Berrange, 2017/02/10
- [Qemu-block] [PATCH v4 08/18] qcow: make encrypt_sectors encrypt in place, Daniel P. Berrange, 2017/02/10
- [Qemu-block] [PATCH v4 09/18] qcow: convert QCow to use QCryptoBlock for encryption, Daniel P. Berrange, 2017/02/10
- [Qemu-block] [PATCH v4 10/18] qcow2: make qcow2_encrypt_sectors encrypt in place, Daniel P. Berrange, 2017/02/10
- [Qemu-block] [PATCH v4 12/18] qcow2: extend specification to cover LUKS encryption, Daniel P. Berrange, 2017/02/10
- [Qemu-block] [PATCH v4 11/18] qcow2: convert QCow2 to use QCryptoBlock for encryption, Daniel P. Berrange, 2017/02/10
- [Qemu-block] [PATCH v4 15/18] iotests: enable tests 134 and 158 to work with qcow (v1), Daniel P. Berrange, 2017/02/10
- [Qemu-block] [PATCH v4 14/18] qcow2: add iotests to cover LUKS encryption support, Daniel P. Berrange, 2017/02/10
- [Qemu-block] [PATCH v4 13/18] qcow2: add support for LUKS encryption format, Daniel P. Berrange, 2017/02/10
- [Qemu-block] [PATCH v4 16/18] block: rip out all traces of password prompting, Daniel P. Berrange, 2017/02/10
- [Qemu-block] [PATCH v4 17/18] block: remove all encryption handling APIs, Daniel P. Berrange, 2017/02/10
- [Qemu-block] [PATCH v4 18/18] block: pass option prefix down to crypto layer, Daniel P. Berrange, 2017/02/10