Block patches for 2.10-rc0
-----BEGIN PGP SIGNATURE----- iQEcBAABAgAGBQJZd1cgAAoJEPQH2wBh1c9AyN4H/3JqDemoPMEk45nyML4oLoJe I3gwbdDfa20nux8wOETbmwx2RFBjvDi88QO6iEXRg8hZPufy74L7xRV0OzmonHVa ODl3oKyGragKxoZSGsrkx71jh4vuk8IaLgy1TUrITVQXfu4WR6lrguimd1T8Q0Y2 UEJLgb/aWbZY9JMwioB7xQ+ANGNwPlMBP5bQYjTn8K9mXZNpbiBce9tSKBZyPr66 1UwvxPAuMmJyEIOlRDMiwWNLojlqGJCv3RosSDYR7xDaDaPBwrXNrWZaQsUxIB3F aOxO2Ob+7MKw9wjt4v6MUZoXCMdC34Heb6vb4/OEmRK/8KuRssfqr2mma8OzFMM= =jeeO -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2017-07-25' into staging Block patches for 2.10-rc0 # gpg: Signature made Tue 25 Jul 2017 15:35:12 BST # gpg: using RSA key 0xF407DB0061D5CF40 # gpg: Good signature from "Max Reitz <mreitz@redhat.com>" # Primary key fingerprint: 91BE B60A 30DB 3E88 57D1 1829 F407 DB00 61D5 CF40 * remotes/maxreitz/tags/pull-block-2017-07-25: qemu-iotests: Fix reference output for 186 qcow2-bitmap: fix bitmap_free qcow: fix memory leaks related to encryption Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
0f1e9c8094
|
@ -768,7 +768,7 @@ static int qcow_create(const char *filename, QemuOpts *opts, Error **errp)
|
|||
Error *local_err = NULL;
|
||||
int ret;
|
||||
BlockBackend *qcow_blk;
|
||||
const char *encryptfmt = NULL;
|
||||
char *encryptfmt = NULL;
|
||||
QDict *options;
|
||||
QDict *encryptopts = NULL;
|
||||
QCryptoBlockCreateOptions *crypto_opts = NULL;
|
||||
|
@ -793,7 +793,7 @@ static int qcow_create(const char *filename, QemuOpts *opts, Error **errp)
|
|||
goto cleanup;
|
||||
}
|
||||
} else if (qemu_opt_get_bool_del(opts, BLOCK_OPT_ENCRYPT, false)) {
|
||||
encryptfmt = "aes";
|
||||
encryptfmt = g_strdup("aes");
|
||||
}
|
||||
|
||||
ret = bdrv_create_file(filename, opts, &local_err);
|
||||
|
@ -908,6 +908,7 @@ exit:
|
|||
blk_unref(qcow_blk);
|
||||
cleanup:
|
||||
QDECREF(encryptopts);
|
||||
g_free(encryptfmt);
|
||||
qcrypto_block_free(crypto);
|
||||
qapi_free_QCryptoBlockCreateOptions(crypto_opts);
|
||||
g_free(backing_file);
|
||||
|
|
|
@ -487,6 +487,10 @@ static inline void bitmap_directory_to_be(uint8_t *dir, size_t size)
|
|||
|
||||
static void bitmap_free(Qcow2Bitmap *bm)
|
||||
{
|
||||
if (bm == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
g_free(bm->name);
|
||||
g_free(bm);
|
||||
}
|
||||
|
|
|
@ -2905,7 +2905,7 @@ static int qcow2_create(const char *filename, QemuOpts *opts, Error **errp)
|
|||
int version;
|
||||
uint64_t refcount_bits;
|
||||
int refcount_order;
|
||||
const char *encryptfmt = NULL;
|
||||
char *encryptfmt = NULL;
|
||||
Error *local_err = NULL;
|
||||
int ret;
|
||||
|
||||
|
@ -2916,14 +2916,14 @@ static int qcow2_create(const char *filename, QemuOpts *opts, Error **errp)
|
|||
backing_fmt = qemu_opt_get_del(opts, BLOCK_OPT_BACKING_FMT);
|
||||
encryptfmt = qemu_opt_get_del(opts, BLOCK_OPT_ENCRYPT_FORMAT);
|
||||
if (encryptfmt) {
|
||||
if (qemu_opt_get_del(opts, BLOCK_OPT_ENCRYPT)) {
|
||||
if (qemu_opt_get(opts, BLOCK_OPT_ENCRYPT)) {
|
||||
error_setg(errp, "Options " BLOCK_OPT_ENCRYPT " and "
|
||||
BLOCK_OPT_ENCRYPT_FORMAT " are mutually exclusive");
|
||||
ret = -EINVAL;
|
||||
goto finish;
|
||||
}
|
||||
} else if (qemu_opt_get_bool_del(opts, BLOCK_OPT_ENCRYPT, false)) {
|
||||
encryptfmt = "aes";
|
||||
encryptfmt = g_strdup("aes");
|
||||
}
|
||||
cluster_size = qcow2_opt_get_cluster_size_del(opts, &local_err);
|
||||
if (local_err) {
|
||||
|
@ -2983,6 +2983,7 @@ static int qcow2_create(const char *filename, QemuOpts *opts, Error **errp)
|
|||
finish:
|
||||
g_free(backing_file);
|
||||
g_free(backing_fmt);
|
||||
g_free(encryptfmt);
|
||||
g_free(buf);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -442,7 +442,7 @@ ide0-cd0 (NODE_NAME): null-co:// (null-co, read-only)
|
|||
Cache mode: writeback
|
||||
(qemu) quit
|
||||
|
||||
warning: qemu-system-x86_64: -drive if=scsi,driver=null-co: bus=0,unit=0 is deprecated with this machine type
|
||||
qemu-system-x86_64: -drive if=scsi,driver=null-co: warning: bus=0,unit=0 is deprecated with this machine type
|
||||
Testing: -drive if=scsi,driver=null-co
|
||||
QEMU X.Y.Z monitor - type 'help' for more information
|
||||
(qemu) info block
|
||||
|
@ -451,7 +451,7 @@ scsi0-hd0 (NODE_NAME): null-co:// (null-co)
|
|||
Cache mode: writeback
|
||||
(qemu) quit
|
||||
|
||||
warning: qemu-system-x86_64: -drive if=scsi,media=cdrom: bus=0,unit=0 is deprecated with this machine type
|
||||
qemu-system-x86_64: -drive if=scsi,media=cdrom: warning: bus=0,unit=0 is deprecated with this machine type
|
||||
Testing: -drive if=scsi,media=cdrom
|
||||
QEMU X.Y.Z monitor - type 'help' for more information
|
||||
(qemu) info block
|
||||
|
@ -460,7 +460,7 @@ scsi0-cd0: [not inserted]
|
|||
Removable device: not locked, tray closed
|
||||
(qemu) quit
|
||||
|
||||
warning: qemu-system-x86_64: -drive if=scsi,driver=null-co,media=cdrom: bus=0,unit=0 is deprecated with this machine type
|
||||
qemu-system-x86_64: -drive if=scsi,driver=null-co,media=cdrom: warning: bus=0,unit=0 is deprecated with this machine type
|
||||
Testing: -drive if=scsi,driver=null-co,media=cdrom
|
||||
QEMU X.Y.Z monitor - type 'help' for more information
|
||||
(qemu) info block
|
||||
|
|
Loading…
Reference in a new issue