qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Pavel Hrdina <phrdina@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v3 1/1] atapi: make change media detection for guests easier
Date: Mon, 26 Nov 2012 16:08:12 +0100	[thread overview]
Message-ID: <50B385DC.6090208@redhat.com> (raw)
In-Reply-To: <1353941774.3370.21.camel@antique-laptop>

Am 26.11.2012 15:56, schrieb Pavel Hrdina:
> On Mon, 2012-11-26 at 14:55 +0100, Kevin Wolf wrote:
>> Am 26.11.2012 13:43, schrieb Pavel Hrdina:
>>> On Fri, 2012-11-23 at 13:09 +0100, Kevin Wolf wrote:
>>>> Another thing I would consider is using cdrom_changed = 0/1/2 instead of
>>>> adding fake_cdrom_eject to add another state. Migration would
>>>> automatically do the right thing for it, old versions would in both 1
>>>> and 2 state switch to ASC_MEDIUM_MAY_HAVE_CHANGED next, which is correct
>>>> in the latter case and is in the former case the same bug as the old
>>>> qemu we're migrating to has anyway.
>>>>
>>>
>>> I do it that way at first, but then I rewrite it, because I thought that
>>> using new state would be better. But if you agree with cdrom_changed =
>>> 0/1/2, I'll change it.
>>
>> I think it's nicer to have only one state. And if I'm not mistaken, we
>> can even do without the pre_save/post_load handlers then.
>>
>> Kevin
> 
> I don't think that we can do it without the pre_save/post_load handlers,
> because if the cdrom_changed could be set also to 2 then in case, that
> you migrate immediately after the change from "buggy" qemu to the
> "fixed" qemu we have in cdrom_changed state 1, but we need state 2. 

But you can't tell which is the right state anyway, because the buggy
qemu on your source has only one "changed" state. Choosing state 1 seems
fine to me. The worst thing that can happen is that you return
ASC_MEDIUM_NOT_PRESENT twice - not a big deal.

> And
> otherwise, if you want to migrate from "fixed" qemu to "buggy" qemu
> where version_id is lower then 3, you have to set the asc to
> ASC_MEDIUM_MAY_HAVE_CHANGED.

This part is true. However, I'm pretty sure that migration from 1.3 to
0.11 doesn't work anyway, so why bother?

Kevin

  reply	other threads:[~2012-11-26 15:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-21 17:17 [Qemu-devel] [PATCH v3 1/1] atapi: make change media detection for guests easier Pavel Hrdina
2012-11-23 12:09 ` Kevin Wolf
2012-11-26 12:43   ` Pavel Hrdina
2012-11-26 13:55     ` Kevin Wolf
2012-11-26 14:56       ` Pavel Hrdina
2012-11-26 15:08         ` Kevin Wolf [this message]
2012-11-26 15:26           ` Pavel Hrdina

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=50B385DC.6090208@redhat.com \
    --to=kwolf@redhat.com \
    --cc=phrdina@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).