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

Re: [libvirt] [PATCH v1 03/10] domain_lock: Introduce seclabel APIs



On Wed, Sep 10, 2014 at 03:26:09PM +0200, Michal Privoznik wrote:
> Signed-off-by: Michal Privoznik <mprivozn redhat com>
> ---
>  src/libvirt_private.syms        |  2 ++
>  src/locking/domain_lock.c       | 65 +++++++++++++++++++++++++++++++++++++++++
>  src/locking/domain_lock.h       | 10 +++++++
>  src/locking/lock_driver.h       |  2 ++
>  src/locking/lock_driver_lockd.c |  4 +++
>  5 files changed, 83 insertions(+)
> 
> diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
> index cdc476a..db65aa5 100644
> --- a/src/libvirt_private.syms
> +++ b/src/libvirt_private.syms
> @@ -874,6 +874,8 @@ virDomainLockProcessInquire;
>  virDomainLockProcessPause;
>  virDomainLockProcessResume;
>  virDomainLockProcessStart;
> +virDomainLockRecallSeclabel;
> +virDomainLockRememberSeclabel;
>  
>  
>  # locking/lock_manager.h
> diff --git a/src/locking/domain_lock.c b/src/locking/domain_lock.c
> index d7b681e..7de56b3 100644
> --- a/src/locking/domain_lock.c
> +++ b/src/locking/domain_lock.c
> @@ -164,6 +164,30 @@ static virLockManagerPtr virDomainLockManagerNew(virLockManagerPluginPtr plugin,
>  }
>  
>  
> +static virLockManagerPtr
> +virDomainLockManagerSeclabelNew(virLockManagerPluginPtr plugin)
> +{
> +    virLockManagerPtr lock;
> +    virLockManagerParam params[] = {
> +        /* nada */
> +    };

Thinking ahead to the time when we have to persist the lock information
to disk, shared between multiple virtlockds, we might want to take some
parameters here. Specifically a hostname and/or host uuid ?  Though I
guess we could possibly wait until that time - depends on impact on the
RPC protocol in later patches, so will comment there.

> +    VIR_DEBUG("plugin=%p", plugin);
> +
> +    if (!(lock = virLockManagerNew(virLockManagerPluginGetDriver(plugin),
> +                                   VIR_LOCK_MANAGER_OBJECT_TYPE_SECLABEL,
> +                                   ARRAY_CARDINALITY(params),
> +                                   params,
> +                                   0)))
> +        goto error;
> +
> +    return lock;
> +
> + error:
> +    virLockManagerFree(lock);
> +    return NULL;
> +}

Tentative ACK.

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