[libvirt] [PATCH v2 1/2] Refactor disk unplugging

2010-05-05 Thread Wolfgang Mauerer
We can reuse some of the code for other purposes. Signed-off-by: Wolfgang Mauerer --- src/qemu/qemu_driver.c | 56 ++- 1 files changed, 36 insertions(+), 20 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 47ae52c

Re: [libvirt] [PATCH] Fix SCSI disk unplugging

2010-05-05 Thread Wolfgang Mauerer
Daniel P. Berrange wrote: > On Tue, May 04, 2010 at 05:18:24PM +0200, Wolfgang Mauerer wrote: >> Detaching disk devices is not only possible for VIR_DOMAIN_DISK_BUS_VIRTIO, >> but also for VIR_DOMAIN_DISK_BUS_SCSI, so take care of this possibility. >> >> Additionally

[libvirt] [PATCH v2 2/2] Implement SCSI disk unplugging

2010-05-05 Thread Wolfgang Mauerer
With the introduction of the generic qemu device model, unplugging SCSI disks works like a charm, so support it in libvirt. * src/qemu/qemu_driver.c: Add qemudDomainDetachSCSIDiskDevice() to do the unplugging, extend qemudDomainDetachDeviceAdd(). Signed-off-by: Wolfgang Mauerer --- src/qemu

[libvirt] [PATCH] Fix SCSI disk unplugging

2010-05-04 Thread Wolfgang Mauerer
e hot-unplugging. And while we're at it, drop the "pci" part in qemudDomainDetachPciDiskDevice() -- it's misleading since we do not necessarily have to deal with PCI addresses. Signed-off-by: Wolfgang Mauerer --- src/qemu/qemu_driver.c | 16 +--- 1 files changed, 9 i

Re: [libvirt] [PATCH] qemudDomainAttachSCSIDisk: handle empty controller list

2010-03-15 Thread Wolfgang Mauerer
Jim Meyering wrote: > Daniel P. Berrange wrote: >> On Mon, Mar 15, 2010 at 03:56:55PM +0100, Wolfgang Mauerer wrote: >>> Jim Meyering wrote: >>>> Clang found something that might be a real bug. >>>> I suspect that ...drive.controller will always be at

Re: [libvirt] [PATCH] qemudDomainAttachSCSIDisk: handle empty controller list

2010-03-15 Thread Wolfgang Mauerer
Jim Meyering wrote: > Clang found something that might be a real bug. > I suspect that ...drive.controller will always be at least one, it can - explanation below. > but we should not have to dive into the code trying to figure > that out. It's easier/better here just to handle the potential trou

Re: [libvirt] [PATCH 6/6] Implement hotremove for SCSI disks

2010-03-01 Thread Wolfgang Mauerer
Daniel P. Berrange wrote: > On Fri, Feb 26, 2010 at 02:09:19PM +0100, Wolfgang Mauerer wrote: >> Recent qemu versions allow us to add disks dynamically into the system >> via the drive_add/device_add mechanism. Removing them is now just a >> matter of using device_del, an

[libvirt] [PATCH 4/6] Fix PCI address handling when controllers are deleted.

2010-02-26 Thread Wolfgang Mauerer
When a controller is not present in the system anymore, the PCI address must be deleted from libvirt's hashtable because it can be re-used for other purposes. Signed-off-by: Wolfgang Mauerer Signed-off-by: Jan Kiszka --- src/qemu/qemu_driver.c |5 + 1 files changed, 5 insertions(

[libvirt] [PATCH 1/6] Tiny spelling fix

2010-02-26 Thread Wolfgang Mauerer
--- src/qemu/qemu_driver.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 1e4b493..1586e35 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -5475,7 +5475,7 @@ qemuDomainFindOrCreateSCSIDiskControlle

[libvirt] [PATCH 6/6] Implement hotremove for SCSI disks

2010-02-26 Thread Wolfgang Mauerer
Recent qemu versions allow us to add disks dynamically into the system via the drive_add/device_add mechanism. Removing them is now just a matter of using device_del, and this patch adds the required bits and pieces to libvirt. Signed-off-by: Wolfgang Mauerer Signed-off-by: Jan Kiszka --- src

[libvirt] [PATCH 5/6] Use device_del to remove SCSI controllers

2010-02-26 Thread Wolfgang Mauerer
...when the underlying qemu supports the drive/device model and the controller has been added this way. Signed-off-by: Wolfgang Mauerer Signed-off-by: Jan Kiszka --- src/qemu/qemu_driver.c | 31 +-- src/qemu/qemu_monitor.c | 13 + src/qemu

[libvirt] [PATCH 0/6] SCSI-Disk-Hotremove

2010-02-26 Thread Wolfgang Mauerer
[PATCH 0/6] SCSI-Disk-Hotremove This series adds support for hot-removing SCSI disks when qemu supports the drive/device model. It also contains fixes for SCSI controller hotremoval and the build process. Cheers, Wolfgang --- Siemens AG, Corporate Technology, CT T TC 4 Corporate Competence Centr

[libvirt] [PATCH 3/6] Fix data structure handling when controllers are attached.

2010-02-26 Thread Wolfgang Mauerer
in memory. Signed-off-by: Wolfgang Mauerer Signed-off-by: Jan Kiszka --- src/qemu/qemu_driver.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 1586e35..5394ff5 100644 --- a/src/qemu/qemu_driver.c +++ b/src/q

[libvirt] [PATCH 2/6] Always link with libgcrypt

2010-02-26 Thread Wolfgang Mauerer
... not just when using the remote driver: libvirt.c always depends on it. This unbreaks builds with --without-remote Signed-off-by: Wolfgang Mauerer Signed-off-by: Jan Kiszka --- src/Makefile.am |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Makefile.am b

Re: [libvirt] [PATCH 00/34] Add device addressing and disk controller support

2010-01-13 Thread Wolfgang Mauerer
Hi, On Fri, Jan 8, 2010 at 6:22 PM, Daniel P. Berrange wrote: > This series is a merge of two previous series I posted > > http://www.redhat.com/archives/libvir-list/2009-December/msg00232.html > http://www.redhat.com/archives/libvir-list/2009-December/msg00392.html > > It accomplishes quite a

Re: [libvirt] [PATCH 0/12] Standardized device addressing & SCSI controller/disk hotplug

2009-12-18 Thread Wolfgang Mauerer
Daniel P. Berrange wrote: > On Thu, Dec 10, 2009 at 10:22:20PM +, Daniel P. Berrange wrote: >> The XML for each address type looks like >> >> > slot='0x07' function='0x0'/> >> >> >> >> >> The 'mode' attribute for any of them is allowed to be either >> 'static' or 'dynamic'.

[libvirt] Re: [PATCH 10/12] Implement SCSI controller hotplug/unplug for QEMU

2009-12-15 Thread Wolfgang Mauerer
Hi, Daniel P. Berrange wrote: > From: Wolfgang Mauerer > > This patch allows for explicit hotplug/unplug of SCSI controllers. > Ordinarily this is not required, since QEMU/libvirt will attach > a new SCSI controller whenever one is required. Allowing explicit > hotplug of

[libvirt] Re: [PATCH 0/12] Standardized device addressing & SCSI controller/disk hotplug

2009-12-15 Thread Wolfgang Mauerer
Daniel P. Berrange wrote: > On Tue, Dec 15, 2009 at 01:06:51PM +0100, Wolfgang Mauerer wrote: >> Hi, >> >> Daniel P. Berrange wrote: >>> This patch series is a combination of series done by >>> Wolfgang Mauerer to support proper SCSI drive hotplug >>

[libvirt] Re: [PATCH 0/12] Standardized device addressing & SCSI controller/disk hotplug

2009-12-15 Thread Wolfgang Mauerer
Hi, Daniel P. Berrange wrote: > This patch series is a combination of series done by > Wolfgang Mauerer to support proper SCSI drive hotplug > and new work by myself to introduce generic addressing > for all devices. > > Wolfgang's most recent posting was > > http://w

Re: [libvirt] [PATCH v2] Disk- and Controller Hotplug

2009-12-02 Thread Wolfgang Mauerer
Hi, Some time ago, Daniel P. Berrange wrote: > On Tue, Nov 24, 2009 at 02:15:58PM +0100, Wolfgang Mauerer wrote: >> Daniel P. Berrange wrote: >>> On Mon, Nov 23, 2009 at 02:15:06PM +0100, Wolfgang Mauerer wrote: >>>> Daniel P. Berrange wrote: >>>>&g

Re: [libvirt] [PATCH v2] Disk- and Controller Hotplug

2009-11-24 Thread Wolfgang Mauerer
Hi, Daniel P. Berrange wrote: > On Mon, Nov 23, 2009 at 02:15:06PM +0100, Wolfgang Mauerer wrote: >> Daniel P. Berrange wrote: >>> On Tue, Nov 17, 2009 at 12:53:31AM +0100, wolfgang.maue...@siemens.com >>> wrote: >>>> this is the second revision of a p

Re: [libvirt] [PATCH v2] Disk- and Controller Hotplug

2009-11-23 Thread Wolfgang Mauerer
Hi, Daniel P. Berrange wrote: > On Tue, Nov 17, 2009 at 12:53:31AM +0100, wolfgang.maue...@siemens.com wrote: >> Hi, >> >> this is the second revision of a patch series to improve disk >> hotadd support for libvirt. It focuses on the qemu backend, but >> is naturally designed to be compatible with

[libvirt] [PATCH 12/13] Extract monitor parts from the qemu interaction for disk hotplug

2009-11-16 Thread wolfgang . mauerer
From: Wolfgang Mauerer This separates the communication with qemu a bit from the more libvirtish actions. Signed-off-by: Wolfgang Mauerer Signed-off-by: Jan Kiszka --- src/qemu/qemu_driver.c | 82 ++-- src/qemu/qemu_monitor_text.c | 85

[libvirt] [PATCH 11/13] Extract qemu monitor parts for controller hotplug

2009-11-16 Thread wolfgang . mauerer
From: Wolfgang Mauerer This separates the communication with qemu a bit from the more libvirtish actions. Signed-off-by: Wolfgang Mauerer Signed-off-by: Jan Kiszka --- src/qemu/qemu_driver.c | 61 +-- src/qemu/qemu_monitor_text.c | 65

[libvirt] [PATCH 10/13] Factor out the method to get the PCI address of a controller for a given disk

2009-11-16 Thread wolfgang . mauerer
From: Wolfgang Mauerer We need this multiple times later on. Signed-off-by: Wolfgang Mauerer Signed-off-by: Jan Kiszka --- src/conf/domain_conf.c | 26 ++ src/conf/domain_conf.h |8 ++ src/qemu/qemu_driver.c | 242 +++- 3 files changed

[libvirt] [PATCH 13/13] Update documentation: Controller

2009-11-16 Thread wolfgang . mauerer
From: Wolfgang Mauerer Document the controller specification, that is, the element within --- docs/formatdomain.html.in | 38 ++ 1 files changed, 38 insertions(+), 0 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index

[libvirt] [PATCH 07/13] Implement controller hotplugging

2009-11-16 Thread wolfgang . mauerer
From: Wolfgang Mauerer This enables to hot-add disk controllers without attached disks into the system. Previously, it was only possible to (implicitly) add disk controllers in the static machine configuration. Notice that the actual functionality is only available for qemu at present, but

[libvirt] [PATCH 08/13] Allow controller selection by ID

2009-11-16 Thread wolfgang . mauerer
From: Wolfgang Mauerer ... by simply traversing the list of controllers to find the associated PCI address. Signed-off-by: Wolfgang Mauerer Signed-off-by: Jan Kiszka --- src/qemu/qemu_driver.c | 37 + 1 files changed, 29 insertions(+), 8 deletions

[libvirt] [PATCH 04/13] Add new domain device: "controller"

2009-11-16 Thread wolfgang . mauerer
From: Wolfgang Mauerer This augments virDomainDevice with a element that is used to represent disk controllers (e.g., scsi controllers). The XML format is given by where type denotes the disk interface (scsi, ide,...), name is an arbitrary string that identifies the controller for disk

[libvirt] [PATCH 02/13] Clarify documentation for private symbols

2009-11-16 Thread wolfgang . mauerer
From: Wolfgang Mauerer The instruction "See Makefile.am" in libvirt.private_syms always makes me think that this file is autogenerated and should not be touched manually. This patch spares every reader of libvirt.private_syms the hassle of reading Makefile.am before

[libvirt] [PATCH 06/13] Drop qemudAttachPciDiskDevice

2009-11-16 Thread wolfgang . mauerer
From: Wolfgang Mauerer This function is not necessary anymore Signed-off-by: Wolfgang Mauerer Signed-off-by: Jan Kiszka --- src/qemu/qemu_driver.c | 33 - 1 files changed, 0 insertions(+), 33 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu

[libvirt] [PATCH 03/13] Extend element with controller information

2009-11-16 Thread wolfgang . mauerer
From: Wolfgang Mauerer This allows us to connect a disk with a specific controller, which is required for disk hotadd/remove. A new XML child element is added to the container: ... Normally the name of the controller must be specified. Using pci_addr instead is supported for qemu

[libvirt] [PATCH 05/13] Add disk-based hotplugging for the qemu backend

2009-11-16 Thread wolfgang . mauerer
From: Wolfgang Mauerer When disks are added to a qemu backend with attach-device, not just the disk, but a complete new PCI controller with the disk attached is brought into the system. This patch implements a proper disk hotplugging scheme for qemu. Signed-off-by: Wolfgang Mauerer Signed-off

[libvirt] [PATCH 01/13] Fix help message

2009-11-16 Thread wolfgang . mauerer
From: Wolfgang Mauerer The configuration file setting is overriden by -f or --config, but not with -c Signed-off-by: Wolfgang Mauerer --- daemon/libvirtd.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c index daf06bc..5cedd17

[libvirt] [PATCH 09/13] Remove surprises in the semantics of disk-hotadd

2009-11-16 Thread wolfgang . mauerer
From: Wolfgang Mauerer When a disk is added without an explicitly specified controller as host, then try to find the first available controller. If none exists, do not (as in previous versions) add a new PCI controller device with the disk attached, but bail out with an error. Notice that this

[libvirt] [PATCH v2] Disk- and Controller Hotplug

2009-11-16 Thread wolfgang . mauerer
Hi, this is the second revision of a patch series to improve disk hotadd support for libvirt. It focuses on the qemu backend, but is naturally designed to be compatible with other backends as well. The objective is two-fold: 1.) Split off controller from disk handling. This is done by introdu

Re: [libvirt] [PATCH 0/9] Support disk-hotremove and controller hotplugging

2009-10-13 Thread Wolfgang Mauerer
Hi, Gerd Hoffmann wrote: > On 10/09/09 18:32, Daniel Veillard wrote: >> On Fri, Sep 18, 2009 at 05:26:07PM +0200, Wolfgang Mauerer wrote: >>> Hi, >>Hi Wolfgang, >> >>> this patch reworks libvirt's disk-hotadd support and >>> introd

Re: [libvirt] [PATCH 2/9] Extend element with controller information

2009-09-25 Thread Wolfgang Mauerer
Matthias Bolte wrote: > 2009/9/24 Daniel P. Berrange : >> Outside the scope of your patches, I think it would be >> worth adding a 'name' attribute to all devices in the >> libvirt XML as a standardized unique identifier. We >> already have to keep track of a 'name' internally for >> NIC hotplug wi

Re: [libvirt] [PATCH 2/9] Extend element with controller information

2009-09-25 Thread Wolfgang Mauerer
Daniel P. Berrange wrote: > On Fri, Sep 18, 2009 at 05:26:09PM +0200, Wolfgang Mauerer wrote: >> This allows us to connect a disk with a specific controller, >> which is required for disk hotadd/remove. A new XML child >> element is added to the container: >>

Re: [libvirt] [PATCH 3/9] Add new domain device: "controller"

2009-09-25 Thread Wolfgang Mauerer
Daniel P. Berrange wrote: > On Fri, Sep 18, 2009 at 05:26:10PM +0200, Wolfgang Mauerer wrote: >> This augments virDomainDevice with a element >> that is used to represent disk controllers (e.g., scsi >> controllers). The XML format is given by >> >> >>

Re: [libvirt] [PATCH 9/9] Implement disk- and controller hotremove

2009-09-25 Thread Wolfgang Mauerer
Daniel P. Berrange wrote: > On Fri, Sep 18, 2009 at 05:26:16PM +0200, Wolfgang Mauerer wrote: >> Since both disks and disk controllers can be dynamically >> added to the system, it makes sense to be also able to remove >> them. > > This is the main patch which requires

Re: [libvirt] [PATCH 5/9] Implement controller hotplugging

2009-09-25 Thread Wolfgang Mauerer
Daniel P. Berrange wrote: > On Fri, Sep 18, 2009 at 05:26:12PM +0200, Wolfgang Mauerer wrote: >> This enables to hot-add disk controllers without attached >> disks into the system. Previously, it was only possible to >> (implicitly) add disk controllers in the static mac

[libvirt] [PATCH 8/9] Factor out the method to get the PCI address of a controller for a given disk

2009-09-18 Thread Wolfgang Mauerer
We need this multiple times later on. Signed-off-by: Wolfgang Mauerer Signed-off-by: Jan Kiszka --- src/qemu_driver.c | 155 + 1 files changed, 97 insertions(+), 58 deletions(-) diff --git a/src/qemu_driver.c b/src/qemu_driver.c index

[libvirt] [PATCH 1/9] Clarify documentation for private symbols

2009-09-18 Thread Wolfgang Mauerer
ned-off-by: Wolfgang Mauerer Signed-off-by: Jan Kiszka --- src/libvirt_private.syms |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 867678f..f724493 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.sy

[libvirt] [PATCH 6/9] Allow controller selection by ID

2009-09-18 Thread Wolfgang Mauerer
... by simply traversing the list of controllers to find the associated PCI address. Signed-off-by: Wolfgang Mauerer Signed-off-by: Jan Kiszka --- src/qemu_driver.c | 41 +++-- 1 files changed, 31 insertions(+), 10 deletions(-) diff --git a/src

[libvirt] [PATCH 2/9] Extend element with controller information

2009-09-18 Thread Wolfgang Mauerer
is used to enumerate the buses on the controller here. Signed-off-by: Wolfgang Mauerer Signed-off-by: Jan Kiszka --- src/domain_conf.c | 29 + src/domain_conf.h |5 - 2 files changed, 33 insertions(+), 1 deletions(-) diff --git a/src/domain_conf.c b/src/dom

[libvirt] [PATCH 5/9] Implement controller hotplugging

2009-09-18 Thread Wolfgang Mauerer
extended likewise. Signed-off-by: Wolfgang Mauerer Signed-off-by: Jan Kiszka --- src/domain_conf.c| 26 +++--- src/domain_conf.h|2 ++ src/libvirt_private.syms |1 + src/qemu_driver.c| 21 + 4 files changed, 43 insertions

[libvirt] [PATCH 9/9] Implement disk- and controller hotremove

2009-09-18 Thread Wolfgang Mauerer
Since both disks and disk controllers can be dynamically added to the system, it makes sense to be also able to remove them. Signed-off-by: Wolfgang Mauerer Signed-off-by: Jan Kiszka --- src/domain_conf.h |8 +++ src/qemu_driver.c | 161

[libvirt] [PATCH 3/9] Add new domain device: "controller"

2009-09-18 Thread Wolfgang Mauerer
data structures are included in this commit. Signed-off-by: Wolfgang Mauerer Signed-off-by: Jan Kiszka --- docs/schemas/domain.rng | 145 ++- src/domain_conf.c | 125 src/domain_conf.h | 24

[libvirt] [PATCH 4/9] Add disk-based hotplugging for the qemu backend

2009-09-18 Thread Wolfgang Mauerer
When disks are added to a qemu backend with attach-device, not just the disk, but a complete new PCI controller with the disk attached is brought into the system. This patch implements a proper disk hotplugging scheme for qemu. Signed-off-by: Wolfgang Mauerer Signed-off-by: Jan Kiszka --- src

[libvirt] [PATCH 7/9] Remove surprises in the semantics of disk-hotadd

2009-09-18 Thread Wolfgang Mauerer
behaviour as compared to older libvirt releases, as has been discussed on the mailing list (see http://thread.gmane.org/gmane.comp.emulators.libvirt/15860) Signed-off-by: Wolfgang Mauerer Signed-off-by: Jan Kiszka --- src/qemu_driver.c | 172 ++--- 1

[libvirt] [PATCH 0/9] Support disk-hotremove and controller hotplugging

2009-09-18 Thread Wolfgang Mauerer
Hi, this patch reworks libvirt's disk-hotadd support and introduces support for disk controller hotplugging and disk-hotremove (see http://thread.gmane.org/gmane.comp.emulators.libvirt/15860 for more details). Currently, it targets only qemu and also requires some additions to qemu that have on

Re: [libvirt] [RFC] Interface for disk hotadd/remove

2009-08-13 Thread Wolfgang Mauerer
Hi, On Thu, Aug 13, 2009 at 8:31 PM, Daniel P. Berrange wrote: > On Thu, Aug 13, 2009 at 12:54:00PM +0200, Wolfgang Mauerer wrote: >> I'm currently interested in implementing hard disk hot-add and -remove >> support >> for qemu (as opposed to controller-based hotpluggin

[libvirt] [RFC] Interface for disk hotadd/remove

2009-08-13 Thread Wolfgang Mauerer
Hi, I'm currently interested in implementing hard disk hot-add and -remove support for qemu (as opposed to controller-based hotplugging), and this brings up the question how to best support this feature in libvirt. Many SCSI-Controllers in real machines, for instance, allow to add and remove disks