All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Mauerer <wolfgang.mauerer@siemens.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: "Kiszka, Jan" <jan.kiszka@siemens.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"wlm.libvirt@googlemail.com" <wlm.libvirt@googlemail.com>
Subject: Re: [Qemu-devel] [PATCH 3/4] SCSI-Hotdel: Implement drive_hot_del
Date: Wed, 30 Sep 2009 17:45:12 +0200	[thread overview]
Message-ID: <4AC37D08.7050506@siemens.com> (raw)
In-Reply-To: <4AB73114.4050508@redhat.com>

Gerd Hoffmann wrote:
>    Hi,
> 
>> +     dinfo = drive_get(type, bus, unit);
>> +     if (!dinfo) {
>> +         monitor_printf(mon, "Trying to remove non-existent device\n");
>> +	 return;
>> +     }
> 
> No.  Just don't do this silly if/bus/unit parsing.  At very minimum use 
> drive_get_by_id() here, then have something like 'drive_del $id'.
> 
> IMHO much better would be to go qdev instead though.  We should have 
> generic device_add + device_del monitor commands which work for any 
> device, pretty much like the -device command line switch.

That makes sense, but I'd nevertheless prefer to stick with the
more traditional approach right now, replacing the
bus/unit parsing with an ID-based variant. However, is there any
standard way to get from an instance of DriveInfo to
the corresponding instance of SCSIDevice respectively
SCSIDeviceInfo? It's a bit unclear to me if there is
no such connection, of if I'm just overlooking something.

Thanks, Wolfgang

  reply	other threads:[~2009-09-30 15:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-18 15:26 [Qemu-devel] [PATCH 0/4] SCSI-hotdel: Implement removal of SCSI hard disks Wolfgang Mauerer
2009-09-18 15:26 ` [Qemu-devel] [PATCH 1/4] SCSI-hotdel: Add detach method to LSI SCSI driver Wolfgang Mauerer
2009-09-18 15:26   ` [Qemu-devel] [PATCH 2/4] SCSI-hotdel: Factor out IF argument parsing Wolfgang Mauerer
2009-09-18 15:26     ` [Qemu-devel] [PATCH 3/4] SCSI-Hotdel: Implement drive_hot_del Wolfgang Mauerer
2009-09-18 15:26       ` [Qemu-devel] [PATCH 4/4] Small cleanup for drive_hot_add Wolfgang Mauerer
2009-09-21  7:53       ` [Qemu-devel] [PATCH 3/4] SCSI-Hotdel: Implement drive_hot_del Gerd Hoffmann
2009-09-30 15:45         ` Wolfgang Mauerer [this message]
2009-09-30 19:04           ` Gerd Hoffmann
2009-10-01  7:54             ` Wolfgang Mauerer
2009-10-01  8:50               ` Gerd Hoffmann
2009-09-21  7:46   ` [Qemu-devel] [PATCH 1/4] SCSI-hotdel: Add detach method to LSI SCSI driver Gerd Hoffmann

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=4AC37D08.7050506@siemens.com \
    --to=wolfgang.mauerer@siemens.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=wlm.libvirt@googlemail.com \
    /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.