diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-03-30 13:43:04 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-03-30 13:43:05 +0100 |
commit | b9c27e7ae6fb1387eafe858d8378ff14cd1c5b89 (patch) | |
tree | 5a66308f776272b19396a47005f5e6438047c8bc /block/qcow2.c | |
parent | 8850dcbfd7664fab86ab49d9c27b6fa700d71618 (diff) | |
parent | f4e732a0a773c4e44c2c183a5d63cd850ffb57d1 (diff) |
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
Block layer patches
# gpg: Signature made Wed 30 Mar 2016 11:57:54 BST using RSA key ID C88F2FD6
# gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>"
* remotes/kevin/tags/for-upstream: (48 commits)
iotests: Test qemu-img convert -S 0 behavior
block/null-{co,aio}: Implement get_block_status()
block/null-{co,aio}: Allow reading zeroes
qemu-img: Fix preallocation with -S 0 for convert
block: Remove bdrv_(set_)enable_write_cache()
block: Remove BDRV_O_CACHE_WB
block: Remove bdrv_parse_cache_flags()
qemu-io: Use bdrv_parse_cache_mode() in reopen_f()
block: Use bdrv_parse_cache_mode() in drive_init()
raw: Support BDRV_REQ_FUA
nbd: Support BDRV_REQ_FUA
iscsi: Support BDRV_REQ_FUA
block: Introduce bdrv_co_writev_flags()
block/qapi: Use blk_enable_write_cache()
block: Move enable_write_cache to BB level
block: Handle flush error in bdrv_pwrite_sync()
block: Always set writeback mode in blk_new_open()
block: blockdev_init(): Call blk_set_enable_write_cache() explicitly
xen_disk: Call blk_set_enable_write_cache() explicitly
qemu-img: Call blk_set_enable_write_cache() explicitly
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'block/qcow2.c')
-rw-r--r-- | block/qcow2.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/block/qcow2.c b/block/qcow2.c index 642802971c..056525c7fd 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -965,6 +965,14 @@ static int qcow2_open(BlockDriverState *bs, QDict *options, int flags, } s->crypt_method_header = header.crypt_method; if (s->crypt_method_header) { + if (bdrv_uses_whitelist() && + s->crypt_method_header == QCOW_CRYPT_AES) { + error_report("qcow2 built-in AES encryption is deprecated"); + error_printf("Support for it will be removed in a future release.\n" + "You can use 'qemu-img convert' to switch to an\n" + "unencrypted qcow2 image, or a LUKS raw image.\n"); + } + bs->encrypted = 1; } @@ -2160,8 +2168,7 @@ static int qcow2_create2(const char *filename, int64_t total_size, } blk = blk_new_open(filename, NULL, NULL, - BDRV_O_RDWR | BDRV_O_CACHE_WB | BDRV_O_PROTOCOL, - &local_err); + BDRV_O_RDWR | BDRV_O_PROTOCOL, &local_err); if (blk == NULL) { error_propagate(errp, local_err); return -EIO; @@ -2225,8 +2232,7 @@ static int qcow2_create2(const char *filename, int64_t total_size, options = qdict_new(); qdict_put(options, "driver", qstring_from_str("qcow2")); blk = blk_new_open(filename, NULL, options, - BDRV_O_RDWR | BDRV_O_CACHE_WB | BDRV_O_NO_FLUSH, - &local_err); + BDRV_O_RDWR | BDRV_O_NO_FLUSH, &local_err); if (blk == NULL) { error_propagate(errp, local_err); ret = -EIO; @@ -2287,8 +2293,7 @@ static int qcow2_create2(const char *filename, int64_t total_size, options = qdict_new(); qdict_put(options, "driver", qstring_from_str("qcow2")); blk = blk_new_open(filename, NULL, options, - BDRV_O_RDWR | BDRV_O_CACHE_WB | BDRV_O_NO_BACKING, - &local_err); + BDRV_O_RDWR | BDRV_O_NO_BACKING, &local_err); if (blk == NULL) { error_propagate(errp, local_err); ret = -EIO; |