qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 2/2] block: move the bdrv_dev_change_media_cb


From: Pavel Hrdina
Subject: Re: [Qemu-devel] [PATCH v3 2/2] block: move the bdrv_dev_change_media_cb()
Date: Thu, 20 Jun 2013 16:06:52 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6

On 19.6.2013 12:16, Stefan Hajnoczi wrote:
On Mon, Jun 17, 2013 at 03:21:41PM +0200, Pavel Hrdina wrote:
The bdrv_dev_change_media_cb() should be called only for eject and change
commands. We should call that function only if that command is successful.

What this function does is that it calls the change_media_cb() and also emit
the QEVENT_DEVICE_TRAY_MOVED event.

If a password is not required, but user provides some, the error is used as
warning.

Signed-off-by: Pavel Hrdina <address@hidden>
---
  block.c    | 8 --------
  blockdev.c | 7 +++++++
  2 files changed, 7 insertions(+), 8 deletions(-)

This commit description explains what the code changes do but it doesn't
explain why.  The cover letter mentions a regression without going into
detail, and that will not be commited to git.  Please add information
about the regression that this patch fixes so the git history has enough
information to justify this patch.

Thanks, I explain this change directly in the commit message.


Markus posted a list of places that are affected by this change.  Have
you worked through them to show this patch is safe?

Today I've checked hopefully all possible ways how to get into the
'bdrv_dev_change_media_cb()' regarding Markus' comment.

The only relevant callers are the qmp_change and qmp_eject because
the purpose of the 'bdrv_dev_change_media_cb()' is to call the
devices' handlers for change media event, update the tray status
and also emit the DEVICE_TRAY_MOVED event.

Pavel


Stefan





reply via email to

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