[libvirt] [PATCH] vz: fix ref/unref of domain obj in vzDomainRevertToSnapshot

Nikolay Shirokovskiy posted 1 patch 6 years, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/1519799509-987612-1-git-send-email-nshirokovskiy@virtuozzo.com
Test syntax-check passed
src/vz/vz_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[libvirt] [PATCH] vz: fix ref/unref of domain obj in vzDomainRevertToSnapshot
Posted by Nikolay Shirokovskiy 6 years, 1 month ago
---
 src/vz/vz_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c
index dab1ba8..18f4b4c 100644
--- a/src/vz/vz_driver.c
+++ b/src/vz/vz_driver.c
@@ -2732,7 +2732,7 @@ vzDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, unsigned int flags)
 
     virCheckFlags(VIR_DOMAIN_SNAPSHOT_REVERT_PAUSED, -1);
 
-    if (!(dom = vzDomObjFromDomain(snapshot->domain)))
+    if (!(dom = vzDomObjFromDomainRef(snapshot->domain)))
         return -1;
 
     if (virDomainRevertToSnapshotEnsureACL(snapshot->domain->conn, dom->def) < 0)
-- 
1.8.3.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] vz: fix ref/unref of domain obj in vzDomainRevertToSnapshot
Posted by Michal Privoznik 6 years, 1 month ago
On 02/28/2018 07:31 AM, Nikolay Shirokovskiy wrote:
> ---
>  src/vz/vz_driver.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c
> index dab1ba8..18f4b4c 100644
> --- a/src/vz/vz_driver.c
> +++ b/src/vz/vz_driver.c
> @@ -2732,7 +2732,7 @@ vzDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, unsigned int flags)
>  
>      virCheckFlags(VIR_DOMAIN_SNAPSHOT_REVERT_PAUSED, -1);
>  
> -    if (!(dom = vzDomObjFromDomain(snapshot->domain)))
> +    if (!(dom = vzDomObjFromDomainRef(snapshot->domain)))
>          return -1;
>  
>      if (virDomainRevertToSnapshotEnsureACL(snapshot->domain->conn, dom->def) < 0)
> 

Ooops, yes. Added SoB line, ACKed and pushed.

Michal

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] vz: fix ref/unref of domain obj in vzDomainRevertToSnapshot
Posted by Peter Krempa 6 years, 1 month ago
On Wed, Feb 28, 2018 at 10:36:19 +0100, Michal Privoznik wrote:
> On 02/28/2018 07:31 AM, Nikolay Shirokovskiy wrote:
> > ---
> >  src/vz/vz_driver.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c
> > index dab1ba8..18f4b4c 100644
> > --- a/src/vz/vz_driver.c
> > +++ b/src/vz/vz_driver.c
> > @@ -2732,7 +2732,7 @@ vzDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, unsigned int flags)
> >  
> >      virCheckFlags(VIR_DOMAIN_SNAPSHOT_REVERT_PAUSED, -1);
> >  
> > -    if (!(dom = vzDomObjFromDomain(snapshot->domain)))
> > +    if (!(dom = vzDomObjFromDomainRef(snapshot->domain)))
> >          return -1;
> >  
> >      if (virDomainRevertToSnapshotEnsureACL(snapshot->domain->conn, dom->def) < 0)
> > 
> 
> Ooops, yes. Added SoB line, ACKed and pushed.

I think the idea of the SoB line is that you can't add it yourself. You
have to ask the author of the patch for the permission to do so.

Adding them just to make the push-hook happy defeats the statement of
the developer certificate of origin completely.
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] vz: fix ref/unref of domain obj in vzDomainRevertToSnapshot
Posted by Daniel P. Berrangé 6 years, 1 month ago
On Wed, Feb 28, 2018 at 10:51:33AM +0100, Peter Krempa wrote:
> On Wed, Feb 28, 2018 at 10:36:19 +0100, Michal Privoznik wrote:
> > On 02/28/2018 07:31 AM, Nikolay Shirokovskiy wrote:
> > > ---
> > >  src/vz/vz_driver.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c
> > > index dab1ba8..18f4b4c 100644
> > > --- a/src/vz/vz_driver.c
> > > +++ b/src/vz/vz_driver.c
> > > @@ -2732,7 +2732,7 @@ vzDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, unsigned int flags)
> > >  
> > >      virCheckFlags(VIR_DOMAIN_SNAPSHOT_REVERT_PAUSED, -1);
> > >  
> > > -    if (!(dom = vzDomObjFromDomain(snapshot->domain)))
> > > +    if (!(dom = vzDomObjFromDomainRef(snapshot->domain)))
> > >          return -1;
> > >  
> > >      if (virDomainRevertToSnapshotEnsureACL(snapshot->domain->conn, dom->def) < 0)
> > > 
> > 
> > Ooops, yes. Added SoB line, ACKed and pushed.
> 
> I think the idea of the SoB line is that you can't add it yourself. You
> have to ask the author of the patch for the permission to do so.
> 
> Adding them just to make the push-hook happy defeats the statement of
> the developer certificate of origin completely.

Yes, we should have asked Nikolay to explicitly respond with SoB before
pushing.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] vz: fix ref/unref of domain obj in vzDomainRevertToSnapshot
Posted by Michal Privoznik 6 years, 1 month ago
On 02/28/2018 10:51 AM, Peter Krempa wrote:
> On Wed, Feb 28, 2018 at 10:36:19 +0100, Michal Privoznik wrote:
>> On 02/28/2018 07:31 AM, Nikolay Shirokovskiy wrote:
>>> ---
>>>  src/vz/vz_driver.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c
>>> index dab1ba8..18f4b4c 100644
>>> --- a/src/vz/vz_driver.c
>>> +++ b/src/vz/vz_driver.c
>>> @@ -2732,7 +2732,7 @@ vzDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, unsigned int flags)
>>>  
>>>      virCheckFlags(VIR_DOMAIN_SNAPSHOT_REVERT_PAUSED, -1);
>>>  
>>> -    if (!(dom = vzDomObjFromDomain(snapshot->domain)))
>>> +    if (!(dom = vzDomObjFromDomainRef(snapshot->domain)))
>>>          return -1;
>>>  
>>>      if (virDomainRevertToSnapshotEnsureACL(snapshot->domain->conn, dom->def) < 0)
>>>
>>
>> Ooops, yes. Added SoB line, ACKed and pushed.
> 
> I think the idea of the SoB line is that you can't add it yourself. You
> have to ask the author of the patch for the permission to do so.
> 
> Adding them just to make the push-hook happy defeats the statement of
> the developer certificate of origin completely.
> 

Oops yes. Sorry.

Michal

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] vz: fix ref/unref of domain obj in vzDomainRevertToSnapshot
Posted by Nikolay Shirokovskiy 6 years, 1 month ago

On 28.02.2018 13:13, Michal Privoznik wrote:
> On 02/28/2018 10:51 AM, Peter Krempa wrote:
>> On Wed, Feb 28, 2018 at 10:36:19 +0100, Michal Privoznik wrote:
>>> On 02/28/2018 07:31 AM, Nikolay Shirokovskiy wrote:
>>>> ---
>>>>  src/vz/vz_driver.c | 2 +-
>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c
>>>> index dab1ba8..18f4b4c 100644
>>>> --- a/src/vz/vz_driver.c
>>>> +++ b/src/vz/vz_driver.c
>>>> @@ -2732,7 +2732,7 @@ vzDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, unsigned int flags)
>>>>  
>>>>      virCheckFlags(VIR_DOMAIN_SNAPSHOT_REVERT_PAUSED, -1);
>>>>  
>>>> -    if (!(dom = vzDomObjFromDomain(snapshot->domain)))
>>>> +    if (!(dom = vzDomObjFromDomainRef(snapshot->domain)))
>>>>          return -1;
>>>>  
>>>>      if (virDomainRevertToSnapshotEnsureACL(snapshot->domain->conn, dom->def) < 0)
>>>>
>>>
>>> Ooops, yes. Added SoB line, ACKed and pushed.
>>
>> I think the idea of the SoB line is that you can't add it yourself. You
>> have to ask the author of the patch for the permission to do so.
>>
>> Adding them just to make the push-hook happy defeats the statement of
>> the developer certificate of origin completely.
>>
> 
> Oops yes. Sorry.
> 

I'm definetely agree to adding SoB line. Sorry that I keep forgetting adding it myself.

Nikolay

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