qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v4 0/3] block: fix spurious DEVICE_TRAY_MOVED events


From: Pavel Hrdina
Subject: [Qemu-devel] [PATCH v4 0/3] block: fix spurious DEVICE_TRAY_MOVED events on shutdown
Date: Mon, 24 Jun 2013 14:12:49 +0200

This fixes a regression introduced by commit 9ca111544.

The first commit is done by Luiz and I'm just using it as it is.

The second commit moves the bdrv_dev_change_media_cb() into eject_device(),
called by QMP and HMP eject command, and into qmp_bdrv_open_encrypted(),
called by QMP and HMP change command. These are the only place where I think
that should call the bdrv_dev_change_media_cb() function.

As we discussed the third patch fixes the issue that user can provide
a password for device not requiring any password. The device is opened with
an error as warning. We should fail and don't open the device at all.

There is no reason to call this function while we are removing the device
from the guest, for example while closing and deleting all devices on shutdown.

* changes from v1:
    - used the first patch from Luiz's series
 
* changes from v2:
    - added comment that the error QERR_DEVICE_NOT_ENCRYPTED is used as warning

* changes from v3:
    - added more info into second commit
    - added new patch to fix the issue with providing password for device not
      requiring password

Luiz Capitulino (1):
  block: make bdrv_dev_change_media_cb() public

Pavel Hrdina (2):
  block: move the bdrv_dev_change_media_cb()
  blockdev: do not open block device if password is not required but
    user provides one

 block.c               | 11 +----------
 blockdev.c            | 12 ++++++++++--
 include/block/block.h |  1 +
 3 files changed, 12 insertions(+), 12 deletions(-)

-- 
1.8.1.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]