qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Hrdina <phrdina@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: kwolf@redhat.com, qemu-devel@nongnu.org, lcapitulino@redhat.com
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	[thread overview]
Message-ID: <51C30C7C.3020701@redhat.com> (raw)
In-Reply-To: <20130619101658.GA31475@stefanha-thinkpad.muc.redhat.com>

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 <phrdina@redhat.com>
>> ---
>>   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	other threads:[~2013-06-20 14:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-17 13:21 [Qemu-devel] [PATCH v3 0/2] block: fix spurious DEVICE_TRAY_MOVED events on shutdown Pavel Hrdina
2013-06-17 13:21 ` [Qemu-devel] [PATCH v3 1/2] block: make bdrv_dev_change_media_cb() public Pavel Hrdina
2013-06-17 13:21 ` [Qemu-devel] [PATCH v3 2/2] block: move the bdrv_dev_change_media_cb() Pavel Hrdina
2013-06-19 10:16   ` Stefan Hajnoczi
2013-06-20 14:06     ` Pavel Hrdina [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51C30C7C.3020701@redhat.com \
    --to=phrdina@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).