From: Anthony Liguori <anthony@codemonkey.ws>
To: Christoph Hellwig <hch@lst.de>
Cc: qemu-devel@nongnu.org, "Martin K. Petersen" <martin.petersen@oracle.com>
Subject: Re: [Qemu-devel] [PATCH 2/4] block: add block topology options
Date: Fri, 05 Feb 2010 11:33:17 -0600 [thread overview]
Message-ID: <4B6C565D.8070608@codemonkey.ws> (raw)
In-Reply-To: <20100205130956.GA17475@lst.de>
On 02/05/2010 07:09 AM, Christoph Hellwig wrote:
> On Wed, Feb 03, 2010 at 01:00:47PM -0600, Anthony Liguori wrote:
>
>> But I don't think this is the wrong place to do it. The
>> BlockDriverState reflects that backing device, not the emulated device
>> itself. In this case, you're trying to set a property of the emulated
>> device.
>>
> I think that's very borderline. While the emulated device exposes these
> properties, they are in fact a property of the backing storage, the
> right sector and min/max I/O sizes are determined by the backing storage
> device.
>
It's guest visible state that should be configured based on the
properties of the backing store.
However, as you said, live migration complicates things.
drive is not an optimal interface because it mixes host and guest
state. But the subset of -drive that you normally use should be
independent of the guest. For instance, with:
-drive file=/home/anthony/foo.img,cache=off,aio=native,id=foo -device
virtio-blk-pci,drive=foo
file, cache, and aio are all host properties. They have no visible
impact to the guest and if I change those properties during live
migration, they take affect without the guest noticing
These topology options still can be specified via -drive, but the proper
way of splitting things would have them as part of the -device option.
During live migration, things on the -device side inherited as part of
the live migration process.
>> I think these need to be qdev properties of the respective devices.
>> From a UI perspective, you can still expose -drive options for the end
>> user to consume, but this data should be associated with the devices
>> themselves.
>>
> In addition to not really beeing more logical this would be a lot more
> effort. We'd need to add properties to all the device, which means
> including dealing with the n+1 ide variants, the virtio-pci proxy, etc.
>
The way we deal with this with network devices is we have a common
DEFINE_NIC_PROPERTIES that lets us consistently add properties for all
network devices. We need exactly this sort of thing for disk drives for
the reason you describe.
> If you believe it really needs to be in the qdev properties I'll
> implement it, but I suspect the current version is a better idea.
>
It definitely a correctness issue. Once we can describe the full PC via
qdev, we want to be able to migrate that description as part of the
migration traffic. For that to work, we need to have all of the device
characteristics expressed as qdev properties.
Regards,
Anthony Liguori
next prev parent reply other threads:[~2010-02-05 17:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-29 19:04 [Qemu-devel] [PATCH 1/4] virtio-blk: revert serial number support Christoph Hellwig
2010-01-29 19:04 ` [Qemu-devel] [PATCH 2/4] block: add block topology options Christoph Hellwig
2010-02-03 19:00 ` Anthony Liguori
2010-02-05 13:09 ` Christoph Hellwig
2010-02-05 16:16 ` Jamie Lokier
2010-02-05 16:22 ` Christoph Hellwig
2010-02-05 17:16 ` Jamie Lokier
2010-02-05 17:33 ` Anthony Liguori [this message]
2010-02-09 15:26 ` Markus Armbruster
2010-01-29 19:05 ` [Qemu-devel] [PATCH 3/5] scsi: add topology support Christoph Hellwig
2010-01-29 19:05 ` [Qemu-devel] [PATCH 4/5] ide: " Christoph Hellwig
2010-01-29 19:05 ` [Qemu-devel] [PATCH 5/5] virtio-blk: " Christoph Hellwig
2010-02-01 9:09 ` [Qemu-devel] [PATCH v2 " Christoph Hellwig
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=4B6C565D.8070608@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=hch@lst.de \
--cc=martin.petersen@oracle.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.