From: Weidong Huang <hwd@huawei.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
stefanha@redhat.com
Subject: Re: [Qemu-devel] Close the BlockDriverState when guest eject the media
Date: Tue, 21 Oct 2014 13:06:26 +0800 [thread overview]
Message-ID: <5445E9D2.20805@huawei.com> (raw)
In-Reply-To: <87a94rndnb.fsf@blackfin.pond.sub.org>
On 2014/10/20 20:12, Markus Armbruster wrote:
>
> Correct. This is a known wart. To work around it, wait for event
> DEVICE_TRAY_MOVED and eject again. Yes, this is racy: the guest can
> reclose the tray and lock it before you get your eject in.
Yes. You got it. But how to resolve the racy?
I intend to return fail in this situation. What's your opinion?
> Programs really depend on "eject, load, get the same medium back"
> behavior. Example: https://bugzilla.redhat.com/show_bug.cgi?id=558256
>
> We intend to provide new commands that behave better than "eject".
> Don't hold your breath.
Good news.
I think "eject" command should not to drop the media too. It just only open the
tray, and nothing else.
Calling bdrv_close() could be done in "change media" command. And "change media"
command also can remove the media by null path.
So this problem can be resolved. What do you think of it?
Thanks.
next prev parent reply other threads:[~2014-10-21 5:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-18 10:02 [Qemu-devel] Close the BlockDriverState when guest eject the media Weidong Huang
2014-10-20 9:41 ` Kevin Wolf
2014-10-20 11:27 ` Weidong Huang
2014-10-20 11:39 ` Kevin Wolf
2014-10-21 0:46 ` Weidong Huang
2014-10-21 5:53 ` Weidong Huang
2014-10-21 6:10 ` Gonglei
2014-10-24 18:32 ` Eric Blake
2014-10-27 8:21 ` Markus Armbruster
2014-10-20 12:12 ` Markus Armbruster
2014-10-21 5:06 ` Weidong Huang [this message]
2014-10-21 8:33 ` Markus Armbruster
2014-10-21 9:17 ` Gonglei
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=5445E9D2.20805@huawei.com \
--to=hwd@huawei.com \
--cc=armbru@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.