Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into s…
Browse files Browse the repository at this point in the history
…taging

Block layer patches:

- hmp: Fix drive_add ... format=help crash
- block: Forward 'discard' to temporary overlay

# gpg: Signature made Mon 08 Apr 2019 16:43:20 BST
# gpg:                using RSA key 7F09B272C88F2FD6
# gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" [full]
# Primary key fingerprint: DC3D EB15 9A9A F95D 3D74  56FE 7F09 B272 C88F 2FD6

* remotes/kevin/tags/for-upstream:
  hmp: Fix drive_add ... format=help crash
  block: Forward 'discard' to temporary overlay

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
  • Loading branch information
pm215 committed Apr 8, 2019
2 parents 2c57310 + ab63817 commit 5263724
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion block.c
Expand Up @@ -950,8 +950,9 @@ static void bdrv_temp_snapshot_options(int *child_flags, QDict *child_options,
qdict_set_default_str(child_options, BDRV_OPT_CACHE_DIRECT, "off");
qdict_set_default_str(child_options, BDRV_OPT_CACHE_NO_FLUSH, "on");

/* Copy the read-only option from the parent */
/* Copy the read-only and discard options from the parent */
qdict_copy_default(child_options, parent_options, BDRV_OPT_READ_ONLY);
qdict_copy_default(child_options, parent_options, BDRV_OPT_DISCARD);

/* aio=native doesn't work for cache.direct=off, so disable it for the
* temporary snapshot */
Expand Down
2 changes: 1 addition & 1 deletion device-hotplug.c
Expand Up @@ -48,7 +48,7 @@ static DriveInfo *add_init_drive(const char *optstr)

mc = MACHINE_GET_CLASS(current_machine);
dinfo = drive_new(opts, mc->block_default_type, &err);
if (!dinfo) {
if (err) {
error_report_err(err);
qemu_opts_del(opts);
return NULL;
Expand Down
1 change: 1 addition & 0 deletions tests/test-hmp.c
Expand Up @@ -31,6 +31,7 @@ static const char *hmp_cmds[] = {
"cpu 0",
"device_add ?",
"device_add usb-mouse,id=mouse1",
"drive_add ignored format=help",
"mouse_button 7",
"mouse_move 10 10",
"mouse_button 0",
Expand Down

0 comments on commit 5263724

Please sign in to comment.