On 06/22/2012 09:21 AM, Peter Krempa wrote: > When undefining a domain and removing associated storage using "virsh > undefine --storage" the domain was at first undefined and after that the > storage removal proces was started. If the user specified an invalid > disk to remove, the error could not be corrected. > > This patch moves enumeration and filtering of volumes that should be > removed before the domain is undefined, but the removal process is still > kept after the domain has been undefined. > --- > tools/virsh.c | 280 +++++++++++++++++++++++++++++---------------------------- > 1 files changed, 144 insertions(+), 136 deletions(-) Sounds big, but the description is accurate on what is really changing. > > diff --git a/tools/virsh.c b/tools/virsh.c > index 0354822..e6b8e5f 100644 > --- a/tools/virsh.c > +++ b/tools/virsh.c > @@ -3007,6 +3007,12 @@ static const vshCmdOptDef opts_undefine[] = { > {NULL, 0, 0, NULL} > }; > > +typedef struct { > + virStorageVolPtr vol; > + char *source; > + char *target; > +} vshUndefineVolume; This struct might be useful elsewhere later on, but we can rename it at that point. Of course, you'll have some conflicts depending on when this goes in, in relation to Osier's patches to split virsh.c. ACK -- Eric Blake eblake@xxxxxxxxxx +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list