qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Kevin Wolf <kwolf@redhat.com>,
	patches@linaro.org, qemu-devel@nongnu.org, qemu-block@nongnu.org,
	Markus Armbruster <armbru@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 for-2.4 0/3] block: Improve warnings for doubly-connected drives
Date: Thu, 25 Jun 2015 14:23:21 +0100	[thread overview]
Message-ID: <20150625132321.GI4419@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1435068107-12594-1-git-send-email-peter.maydell@linaro.org>

[-- Attachment #1: Type: text/plain, Size: 3111 bytes --]

On Tue, Jun 23, 2015 at 03:01:44PM +0100, Peter Maydell wrote:
> This patchset attempts to improve the warning and error messages for
> bad user command lines that attempt to connect a drive up to two
> devices. The motivation here is patch #4, which changes the default
> interface for the virt board to virtio. That will break some existing
> command lines which forgot to specify if=none, and so I would like
> us to at least diagnose that user error in a helpful way that points
> the user towards adding the missing if=none.
> 
> Version 2 reduces scope, because it turns out that it is harder than
> we thought to identify whether a use of an if=something drive is the
> auto-plugging or a manual wiring up to a device. So all we do here
> is improve the error messages for two situations which were already
> errors but with rather cryptic messages:
> 
>     (1) Drive specified as to be auto-connected and also manually connected
>     (and the board does handle this if= type):
>     
>       qemu-system-x86_64 -nodefaults -display none \
>          -drive if=scsi,file=tmp.qcow2,id=foo -device ide-hd,drive=foo
>     
>     Previously:
>       qemu-system-x86_64: -device ide-hd,drive=foo: Property 'ide-hd.drive'
>       can't take value 'foo', it's in use
>     
>     Now:
>       qemu-system-x86_64: -device ide-hd,drive=foo: Drive 'foo' is already in
>       use because it has been automatically connected to another device (did
>       you need 'if=none' in the drive options?)
>     
>     (2) Drive specified to be manually connected in two different ways:
>     
>       qemu-system-x86_64 -nodefaults -display none \
>        -drive if=none,file=tmp.qcow2,id=foo -device ide-hd,drive=foo \
>        -device ide-hd,drive=foo
>     
>     Previously:
>       qemu-system-x86_64: -device ide-hd,drive=foo: Property 'ide-hd.drive'
>       can't take value 'foo', it's in use
>     
>     Now:
>       qemu-system-x86_64: -device ide-hd,drive=foo: Drive 'foo' is already in
>       use by another device
> 
> (We'll also produce message 1 in the oddball case where the user creates
> a drive if=something-not-handled-by-machine and then wires it up manually
> to two different devices; in this case their command line is doubly broken
> and if they use if=none as suggested by message 1 they'll then get message 2
> and can fix their own double-usage...)
> 
> Changes v1->v2:
>  * drop "warn if an if=<something> drive was also connected manually" patch
>  * change implementation of "improve error message" patch
> 
> 
> Peter Maydell (3):
>   qdev-properties-system: Change set_pointer's parse callback to use
>     Error
>   qdev-properties-system: Improve error message for drive assignment
>     conflict
>   hw/arm/virt: Make block devices default to virtio
> 
>  hw/arm/virt.c                    |  2 ++
>  hw/core/qdev-properties-system.c | 42 +++++++++++++++++++++++++++-------------
>  2 files changed, 31 insertions(+), 13 deletions(-)
> 
> -- 
> 1.9.1
> 
> 

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]

      parent reply	other threads:[~2015-06-25 13:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-23 14:01 [Qemu-devel] [PATCH v2 for-2.4 0/3] block: Improve warnings for doubly-connected drives Peter Maydell
2015-06-23 14:01 ` [Qemu-devel] [PATCH v2 for-2.4 1/3] qdev-properties-system: Change set_pointer's parse callback to use Error Peter Maydell
2015-06-23 14:01 ` [Qemu-devel] [PATCH v2 for-2.4 2/3] qdev-properties-system: Improve error message for drive assignment conflict Peter Maydell
2015-06-23 14:01 ` [Qemu-devel] [PATCH v2 for-2.4 3/3] hw/arm/virt: Make block devices default to virtio Peter Maydell
2015-06-25  7:40   ` Markus Armbruster
2015-06-25  9:04     ` Peter Maydell
2015-06-25  9:25       ` Markus Armbruster
2015-06-25  9:26 ` [Qemu-devel] [PATCH v2 for-2.4 0/3] block: Improve warnings for doubly-connected drives Markus Armbruster
2015-06-25  9:35   ` Peter Maydell
2015-06-25 10:49     ` Markus Armbruster
2015-06-25 13:23       ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2015-06-25 13:23 ` Stefan Hajnoczi [this message]

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=20150625132321.GI4419@stefanha-thinkpad.redhat.com \
    --to=stefanha@gmail.com \
    --cc=armbru@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=patches@linaro.org \
    --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 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).