Re: [PATCH] qemu: domain: Log some useful data in qemuDomainStorageSourceAccessModify

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

 



On Wed, Jun 12, 2019 at 14:17:48 +0200, Bjoern Walk wrote:
> Peter Krempa <pkrempa@xxxxxxxxxx> [2019-06-12, 01:53PM +0200]:
> > Log the flags passed to the function in a exploded state so that it's
> > easily visible what's happening to the image.
> > 
> > Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
> > ---
> >  src/qemu/qemu_domain.c | 13 ++++++++++---
> >  1 file changed, 10 insertions(+), 3 deletions(-)
> > 
> > diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
> > index 2095191cde..d28cfa4f42 100644
> > --- a/src/qemu/qemu_domain.c
> > +++ b/src/qemu/qemu_domain.c
> > @@ -9339,6 +9339,9 @@ qemuDomainStorageSourceAccessModify(virQEMUDriverPtr driver,
> >      int ret = -1;
> >      virErrorPtr orig_err = NULL;
> >      bool chain = flags & QEMU_DOMAIN_STORAGE_SOURCE_ACCESS_CHAIN;
> > +    bool force_ro = flags & QEMU_DOMAIN_STORAGE_SOURCE_ACCESS_FORCE_READ_ONLY;
> > +    bool force_rw = flags & QEMU_DOMAIN_STORAGE_SOURCE_ACCESS_FORCE_READ_WRITE;
> > +    bool revoke = flags & QEMU_DOMAIN_STORAGE_SOURCE_ACCESS_REVOKE;
> >      int rc;
> >      bool was_readonly = src->readonly;
> >      bool revoke_cgroup = false;
> > @@ -9346,14 +9349,18 @@ qemuDomainStorageSourceAccessModify(virQEMUDriverPtr driver,
> >      bool revoke_namespace = false;
> >      bool revoke_lockspace = false;
> > 
> > -    if (flags & QEMU_DOMAIN_STORAGE_SOURCE_ACCESS_FORCE_READ_ONLY)
> > +    VIR_DEBUG("VM: '%s', src: '%s', readonly: '%d, force_ro: '%d', force_rw: '%d', revoke: '%d', chain: '%d'",
> 
> Almost everywhere we use the syntax key=value when logging, so I'd
> prefer this here as well.

I agree I changed it along with dropping the 'VM' part and fixing the
quote on readonly as suggested by Jano in the other review.

Attachment: signature.asc
Description: PGP signature

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

  Powered by Linux