[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 3/4] SCSI-Hotdel: Implement drive_hot_del
From: |
Wolfgang Mauerer |
Subject: |
Re: [Qemu-devel] [PATCH 3/4] SCSI-Hotdel: Implement drive_hot_del |
Date: |
Wed, 30 Sep 2009 17:45:12 +0200 |
User-agent: |
Thunderbird 2.0.0.22 (X11/20090605) |
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
Re: [Qemu-devel] [PATCH 1/4] SCSI-hotdel: Add detach method to LSI SCSI driver, Gerd Hoffmann, 2009/09/21