From: William Dauchy <william@gandi.net>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, imain@redhat.com
Subject: [Qemu-devel] device_del id missing after blockdev-add
Date: Mon, 17 Feb 2014 16:36:42 +0100 [thread overview]
Message-ID: <20140217153642.GI2390@gandi.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 3051 bytes --]
Hello,
I'm starting qemu with the following config in order to test drive
hotremove and hotadd:
[drive "disk1"]
if = "none"
id = "disk1"
cache = "none"
aio = "native"
format = "raw"
file = "/dev/sda"
[device "disk1"]
driver = "scsi-hd"
drive = "disk1"
scsi-id = "1"
removable = "on"
vendor = "gandi.net"
dpofua = "off"
I'm now testing device removable without any problem:
(QEMU) device_del id=disk1
{ u'return': { }}
(QEMU)
{u'timestamp': {u'seconds': 1392645815, u'microseconds': 484557}, u'data': {u'device': u'disk1', u'path': u'/machine/peripheral/disk1'}, u'event': u'DEVICE_DELETED'}
then, I want to readd the disk, without anyproblem too (with the same
id):
{ "execute": "blockdev-add", "arguments": {'options' : {'driver': 'raw', 'id':'disk1', 'file': {'driver': 'file', 'filename': '/dev/sda'}}} }
{ "device_add", "arguments": {'driver':'scsi-hd', 'drive':'disk1', 'scsi-i':1, 'removable':on} }
The issue is when I want to hot remove the disk again:
(QEMU) device_del id=disk1
{ u'error': { u'class': u'DeviceNotFound',
u'desc': u"Device 'disk1' not found"}}
the output of query-block is the same everywhere:
{ u'device': u'disk1',
u'inserted': { u'backing_file_depth': 0,
u'bps': 0,
u'bps_rd': 0,
u'bps_wr': 0,
u'drv': u'raw',
u'encrypted': False,
u'encryption_key_missing': False,
u'file': u'/dev/sda',
u'image': { u'actual-size': 0,
u'dirty-flag': False,
u'filename': u'/dev/sda',
u'format': u'raw',
u'virtual-size': 3221225472},
u'iops': 0,
u'iops_rd': 0,
u'iops_wr': 0,
u'ro': False},
u'io-status': u'ok',
u'locked': False,
u'removable': True,
u'tray_open': False,
u'type': u'unknown'}]}
I guess blockdev-add is not storing the device details as it's done when
using the configuration file, i.e, id is not stored correctly when using
blockdev-add.
Should I consider this as a bug or I wait for the merge of blockdev-del
and ignore device_del command? In all cases I guess device_del should
work in this case too.
these tests were done using the last version available on the git repo
(using master branch)
Regards,
--
William
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
next reply other threads:[~2014-02-17 15:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-17 15:36 William Dauchy [this message]
2014-02-24 15:34 ` [Qemu-devel] device_del id missing after blockdev-add Stefan Hajnoczi
2014-02-25 11:20 ` William Dauchy
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=20140217153642.GI2390@gandi.net \
--to=william@gandi.net \
--cc=imain@redhat.com \
--cc=kwolf@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 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.