Re: [PATCH v4 5/5] on_missing: Emit event on disk source dropping

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 21, 2011 at 08:48:48AM +0200, Jiri Denemark wrote:
> On Thu, Oct 20, 2011 at 16:32:55 +0100, Daniel P. Berrange wrote:
> > On Thu, Oct 20, 2011 at 04:52:52PM +0200, Michal Privoznik wrote:
> ...
> > > +/**
> > > + * virConnectDomainEventDiskEjectCallback:
> > > + * @conn: connection object
> > > + * @dom: domain on which the event occurred
> > > + * @target: target which changed status
> > > + * @reason: reason why this callback was called; any of
> > > + *          virConnectDomainEventDiskEjectReason
> > > + * @opaque: application specified data
> > > + *
> > > + * The callback signature to use when registering for an event of type
> > > + * VIR_DOMAIN_EVENT_ID_IO_ERROR with virConnectDomainEventRegisterAny()
> > > + */
> > > +typedef void (*virConnectDomainEventDiskEjectCallback)(virConnectPtr conn,
> > > +                                                       virDomainPtr dom,
> > > +                                                       const char *srcPath,
> > > +                                                       const char *devAlias,
> > > +                                                       int reason,
> > > +                                                       void *opaque);
> > 
> > It suddenly occurs to me that this event will also be relevant if we
> > insert new media. So instead of 'srcPath', we should have 'oldSrcPath'
> > and 'newSrcPath', either one of which may be NULL depending on the
> > scenarios involved.
> 
> In that case I think we should call the event DiskChange instead of DiskEject.

Agreed,

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]