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

Re: [libvirt] [PATCH v2 03/10] conf: Introduce scsi hostdev



On Fri, Apr 05, 2013 at 01:00:00PM +0800, Han Cheng wrote:
> On 04/02/2013 11:19 AM, Hu Tao wrote:
> >On Mon, Apr 01, 2013 at 08:00:55PM +0800, Han Cheng wrote:
> >>diff --git a/src/conf/domain_audit.c b/src/conf/domain_audit.c
> >>index a776058..2fb5989 100644
> >>--- a/src/conf/domain_audit.c
> >>+++ b/src/conf/domain_audit.c
> >>@@ -398,6 +398,16 @@ virDomainAuditHostdev(virDomainObjPtr vm, virDomainHostdevDefPtr hostdev,
> >>                  goto cleanup;
> >>              }
> >>              break;
> >>+        case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI:
> >>+            if (virAsprintf(&address, "%s:%d:%d:%d",
> >>+                            hostdev->source.subsys.u.scsi.adapter,
> >>+                            hostdev->source.subsys.u.scsi.bus,
> >>+                            hostdev->source.subsys.u.scsi.target,
> >>+                            hostdev->source.subsys.u.scsi.unit)<  0) {
> >>+                VIR_WARN("OOM while encoding audit message");
> >
> >virReportOOMError();
> 
> I'm not sure this is good.
> Other functions in this file use VIR_WARN to report OOM. If we
> change this place, we should change all others for consistence.
> Besides, Michal Privoznik is try to drop almost all virReportOOMError.

Yep, you are correctin what youoriginally had. The domain_audit.c
file is special in that it does *not* use virReport*Error, only
VIR_WARN, becasue we don't want to treat audit log failure as fatal
to guest startup.

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 :|


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