qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: kraxel@redhat.com, Christoph Hellwig <hch@lst.de>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: [PATCH 08/12] block: Catch attempt to attach multiple devices to a blockdev
Date: Wed, 30 Jun 2010 14:13:31 +0200	[thread overview]
Message-ID: <4C2B34EB.9030502@redhat.com> (raw)
In-Reply-To: <m3fx04buun.fsf@blackfin.pond.sub.org>

Am 30.06.2010 13:52, schrieb Markus Armbruster:
> Kevin Wolf <kwolf@redhat.com> writes:
> 
>> Am 28.06.2010 12:16, schrieb Christoph Hellwig:
>>> On Mon, Jun 28, 2010 at 10:24:49AM +0200, Kevin Wolf wrote:
>>>
>>>> Am 27.06.2010 11:36, schrieb Christoph Hellwig:
>>>>> On Sat, Jun 26, 2010 at 04:44:11PM +0200, Markus Armbruster wrote:
> [...]
>>>>>> -device usb-storage,drive=foo creates *two* devices: usb-storage itself,
>>>>>> which serves as SCSI controller, and scsi-disk for the drive.
>>>>>> usb-storage copies its drive property to scsi-disk.
>>>>>>
>>>>>> I don't like this.  Each -device should create just one device.
>>>>>
>>>>> Indeed.  I'd also prefer to get rid of this.  Anthony, how hard are the
>>>>> rules on backwards compatiblity for things like this?
>>>>
>>>> How would breaking compatibility help us? For the user a USB MSD is only
>>>> one device, so requiring two -device parameters sounds wrong.
> 
> -device designed to be simple, stupid and straightforward: you get
> exactly what you asked for, no more, no less.  usb-storage breaks this
> design maxim.

I suppose the real question is: What is a device? qemu's internal view
(dozens of devices that communicate with each other) and the user's view
(it's one USB stick/mainboard/...) may differ.

>> Maybe we need something like composed devices? So when the user asks for
>> a USB stick, he actually gets all devices that this stick internally
>> uses? Otherwise it becomes really hard to use -device directly.
> 
> Could be useful.
> 
>> I guess the same applies for mainboards, CPUs and probably some more
>> things, though I don't really know how these are (planned to be) done in
>> qdev.
> 
> I'd like to keep -device stupid.  If we need "smarter" controls, let's
> layer them on top.

Makes sense. I'm not opposed to having something that deals only with
"atomic devices" or whatever you want to call them.

What users will usually want to have is something that treats an USB
stick as one device, though. So maybe the stupid version should become
-qdev or something and the extended version that is meant for users
should get the easy-to-remember name -device.

Kevin

  reply	other threads:[~2010-06-30 12:13 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-25 16:53 [Qemu-devel] [PATCH 00/12] More block-related fixes and cleanups Markus Armbruster
2010-06-25 16:53 ` [Qemu-devel] [PATCH 01/12] scsi: scsi_bus_legacy_handle_cmdline() can fail, fix callers Markus Armbruster
2010-06-25 19:39   ` [Qemu-devel] " Christoph Hellwig
2010-06-25 16:53 ` [Qemu-devel] [PATCH 02/12] ide: Make it explicit that ide_create_drive() can't fail Markus Armbruster
2010-06-25 19:40   ` [Qemu-devel] " Christoph Hellwig
2010-06-25 16:53 ` [Qemu-devel] [PATCH 03/12] blockdev: Remove drive_get_serial() Markus Armbruster
2010-06-25 19:41   ` [Qemu-devel] " Christoph Hellwig
2010-06-25 16:53 ` [Qemu-devel] [PATCH 04/12] blockdev: New drive_of_blockdev() Markus Armbruster
2010-06-25 19:42   ` [Qemu-devel] " Christoph Hellwig
2010-06-26  5:32     ` Markus Armbruster
2010-06-26  9:46       ` Christoph Hellwig
2010-06-26 14:46         ` Markus Armbruster
2010-06-27  9:36           ` Christoph Hellwig
2010-06-28  9:58           ` Paolo Bonzini
2010-06-29  8:57             ` Markus Armbruster
2010-06-25 16:53 ` [Qemu-devel] [PATCH 05/12] blockdev: Clean up automatic drive deletion Markus Armbruster
2010-06-26  9:48   ` [Qemu-devel] " Christoph Hellwig
2010-06-25 16:53 ` [Qemu-devel] [PATCH 06/12] qdev: Decouple qdev_prop_drive from DriveInfo Markus Armbruster
2010-06-26 10:09   ` [Qemu-devel] " Christoph Hellwig
2010-06-25 16:53 ` [Qemu-devel] [PATCH 07/12] blockdev: drive_get_by_id() is no longer used, remove Markus Armbruster
2010-06-26 10:09   ` [Qemu-devel] " Christoph Hellwig
2010-06-25 16:53 ` [Qemu-devel] [PATCH 08/12] block: Catch attempt to attach multiple devices to a blockdev Markus Armbruster
2010-06-26 10:11   ` [Qemu-devel] " Christoph Hellwig
2010-06-26 14:44     ` Markus Armbruster
2010-06-27  9:36       ` Christoph Hellwig
2010-06-28  8:24         ` Kevin Wolf
2010-06-28 10:16           ` Christoph Hellwig
2010-06-28 10:26             ` Kevin Wolf
2010-06-30 11:52               ` Markus Armbruster
2010-06-30 12:13                 ` Kevin Wolf [this message]
2010-06-29  8:06           ` Gerd Hoffmann
2010-06-30 11:33         ` Markus Armbruster
2010-06-29 13:32   ` Kevin Wolf
2010-06-29 14:29     ` Markus Armbruster
2010-06-29 14:58   ` [Qemu-devel] [PATCH v2 " Markus Armbruster
2010-06-25 16:53 ` [Qemu-devel] [PATCH 09/12] savevm: Survive hot-unplug of snapshot device Markus Armbruster
2010-06-26 10:12   ` [Qemu-devel] " Christoph Hellwig
2010-06-30 11:28     ` Markus Armbruster
2010-06-30 13:37   ` Kevin Wolf
2010-06-30 16:34     ` Markus Armbruster
2010-06-25 16:53 ` [Qemu-devel] [PATCH 10/12] block: Fix virtual media change for if=none Markus Armbruster
2010-06-26 10:14   ` [Qemu-devel] " Christoph Hellwig
2010-06-25 16:53 ` [Qemu-devel] [PATCH 11/12] ide: Make PIIX and ISA IDE init functions return the qdev Markus Armbruster
2010-06-26 10:14   ` [Qemu-devel] " Christoph Hellwig
2010-06-25 16:53 ` [Qemu-devel] [PATCH 12/12] pc: Fix CMOS info for drives defined with -device Markus Armbruster

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=4C2B34EB.9030502@redhat.com \
    --to=kwolf@redhat.com \
    --cc=armbru@redhat.com \
    --cc=hch@lst.de \
    --cc=kraxel@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).