Re: [Qemu-block] [Qemu-devel] [PATCH v2 for-2.4 0/3] block: Improve warnings for doubly-connected drives

2015-06-25 Thread Stefan Hajnoczi
On Thu, Jun 25, 2015 at 12:49:31PM +0200, Markus Armbruster wrote:
 Peter Maydell peter.mayd...@linaro.org writes:
 
  On 25 June 2015 at 10:26, Markus Armbruster arm...@redhat.com wrote:
  Peter Maydell peter.mayd...@linaro.org writes:
 
  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.
 
  With the commit message of PATCH 3 amended, series
  Reviewed-by: Markus Armbruster arm...@redhat.com
 
  Thanks. Do you want to take this through a block tree or are you happy
  for me to put it through target-arm.next?
 
 I'm fine with target-arm.  Copying Stefan in the unlikely case he's not.

Thanks, I'm happy with this series.  Please take it through the arm
tree.


pgpNxjeQ95jWE.pgp
Description: PGP signature


Re: [Qemu-block] [Qemu-devel] [PATCH v2 for-2.4 0/3] block: Improve warnings for doubly-connected drives

2015-06-25 Thread Markus Armbruster
Peter Maydell peter.mayd...@linaro.org writes:

 On 25 June 2015 at 10:26, Markus Armbruster arm...@redhat.com wrote:
 Peter Maydell peter.mayd...@linaro.org writes:

 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.

 With the commit message of PATCH 3 amended, series
 Reviewed-by: Markus Armbruster arm...@redhat.com

 Thanks. Do you want to take this through a block tree or are you happy
 for me to put it through target-arm.next?

I'm fine with target-arm.  Copying Stefan in the unlikely case he's not.



Re: [Qemu-block] [Qemu-devel] [PATCH v2 for-2.4 0/3] block: Improve warnings for doubly-connected drives

2015-06-25 Thread Markus Armbruster
Peter Maydell peter.mayd...@linaro.org writes:

 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...)

With the commit message of PATCH 3 amended, series
Reviewed-by: Markus Armbruster arm...@redhat.com