From: Max Reitz <mreitz@redhat.com>
To: qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
Peter Maydell <peter.maydell@linaro.org>,
Markus Armbruster <armbru@redhat.com>,
qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>,
John Snow <jsnow@redhat.com>
Subject: [Qemu-devel] [PATCH 0/4] blockdev: Fix 'change' for slot devices
Date: Tue, 12 Jan 2016 16:47:50 +0100 [thread overview]
Message-ID: <1452613674-12248-1-git-send-email-mreitz@redhat.com> (raw)
The series "BlockBackend and media" intended all block devices with
removable media to implement a tray model; if the devices does not have
a tray, it should emulate one.
While this may make sense from a technical perspective (blockdev-*-tray
are guest device controlling operations, invoking
blk_dev_change_media_cb(); blockdev-*-medium are operations concerning
the block layer, controlling the BB-BDS link), it is (probably)
unintuitive to users, and it requires said implementation of an emulated
tray for each of the slot devices (floppy disk drives and SD card
readers).
We can get rid of those virtual trays by special-casing tray-less
devices in blockdev-*-tray (those operations are no-ops there) and in
blockdev-*-medium (those operations then have to invoke
blk_dev_change_media_cb()). With this change, changing the medium
inserted into a slot device will no longer emit TRAY_MOVED events (which
seems like a bugfix to me, because slot devices actually do not have
trays).
Patches 1 and 2 are CC'd to qemu-stable because they fix 'change' for SD
card readers. Patch 3 does not fix it for floppy disk drives, it just
changes the behavior when used on them (no TRAY_MOVED events, no
tray_open status, and blockdev-{open,close}-tray are optional), which is
why it is not CC'd to qemu-stable; and patch 4 is more of a change in
behavior than a stable-worthy fix.
Max Reitz (4):
block: Add blk_dev_has_tray()
blockdev: Fix 'change' for slot devices
Revert "hw/block/fdc: Implement tray status"
block/qapi: Emit tray_open only if there is a tray
block/block-backend.c | 10 +++-
block/qapi.c | 2 +-
blockdev.c | 27 ++++++++++-
hw/block/fdc.c | 20 ++------
include/block/block_int.h | 1 +
qapi/block-core.json | 3 +-
tests/fdc-test.c | 2 -
tests/qemu-iotests/067.out | 4 --
tests/qemu-iotests/118 | 117 ++++++++++++++-------------------------------
9 files changed, 77 insertions(+), 109 deletions(-)
--
2.7.0
next reply other threads:[~2016-01-12 15:48 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-12 15:47 Max Reitz [this message]
2016-01-12 15:47 ` [Qemu-devel] [PATCH 1/4] block: Add blk_dev_has_tray() Max Reitz
2016-01-15 16:57 ` Eric Blake
2016-01-18 10:23 ` [Qemu-devel] [Qemu-block] " Alberto Garcia
2016-01-12 15:47 ` [Qemu-devel] [PATCH 2/4] blockdev: Fix 'change' for slot devices Max Reitz
2016-01-15 17:08 ` Eric Blake
2016-01-18 10:49 ` [Qemu-devel] [Qemu-block] " Alberto Garcia
2016-01-12 15:47 ` [Qemu-devel] [PATCH 3/4] Revert "hw/block/fdc: Implement tray status" Max Reitz
2016-01-15 17:11 ` Eric Blake
2016-01-12 15:47 ` [Qemu-devel] [PATCH 4/4] block/qapi: Emit tray_open only if there is a tray Max Reitz
2016-01-15 17:11 ` Eric Blake
2016-01-18 10:52 ` [Qemu-devel] [Qemu-block] " Alberto Garcia
2016-01-15 16:10 ` [Qemu-devel] [PATCH 0/4] blockdev: Fix 'change' for slot devices Peter Maydell
2016-01-15 16:24 ` Peter Maydell
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=1452613674-12248-1-git-send-email-mreitz@redhat.com \
--to=mreitz@redhat.com \
--cc=armbru@redhat.com \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-block@nongnu.org \
--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 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.