All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Teigland <teigland@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] Re: [PATCH 1/2] dlm: Send lockspace name with uevents
Date: Tue, 13 Oct 2009 09:53:37 -0500	[thread overview]
Message-ID: <20091013145337.GA27036@redhat.com> (raw)
In-Reply-To: <1255445776-3112-2-git-send-email-swhiteho@redhat.com>

On Tue, Oct 13, 2009 at 03:56:15PM +0100, Steven Whitehouse wrote:
> Although it is possible to get this information from the path,
> its much easier to provide the lockspace as a seperate env
> variable.

I don't mind this, but it's more or less a style issue.  I'm going to try to
keep upstream and rhel as close as possible for a while to minimize the
backporting work in the early stages when it's usually heaviest.  That means
putting off things like this until later.


> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
> ---
>  fs/dlm/lockspace.c |   14 +++++++++++++-
>  1 files changed, 13 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c
> index d489fcc..8dde538 100644
> --- a/fs/dlm/lockspace.c
> +++ b/fs/dlm/lockspace.c
> @@ -191,6 +191,18 @@ static int do_uevent(struct dlm_ls *ls, int in)
>  	return error;
>  }
>  
> +static int dlm_uevent(struct kset *kset, struct kobject *kobj,
> +		      struct kobj_uevent_env *env)
> +{
> +	struct dlm_ls *ls = container_of(kobj, struct dlm_ls, ls_kobj);
> +
> +	add_uevent_var(env, "LOCKSPACE=%s", ls->ls_name);
> +	return 0;
> +}
> +
> +static struct kset_uevent_ops dlm_uevent_ops = {
> +	.uevent = dlm_uevent,
> +};
>  
>  int __init dlm_lockspace_init(void)
>  {
> @@ -199,7 +211,7 @@ int __init dlm_lockspace_init(void)
>  	INIT_LIST_HEAD(&lslist);
>  	spin_lock_init(&lslist_lock);
>  
> -	dlm_kset = kset_create_and_add("dlm", NULL, kernel_kobj);
> +	dlm_kset = kset_create_and_add("dlm", &dlm_uevent_ops, kernel_kobj);
>  	if (!dlm_kset) {
>  		printk(KERN_WARNING "%s: can not create kset\n", __func__);
>  		return -ENOMEM;
> -- 
> 1.6.2.5



  reply	other threads:[~2009-10-13 14:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-13 14:56 [Cluster-devel] A couple of DLM patches Steven Whitehouse
2009-10-13 14:56 ` [Cluster-devel] [PATCH 1/2] dlm: Send lockspace name with uevents Steven Whitehouse
2009-10-13 14:53   ` David Teigland [this message]
2009-10-13 15:23     ` [Cluster-devel] " David Teigland
2009-10-13 15:43       ` Steven Whitehouse
2009-10-13 14:56   ` [Cluster-devel] [PATCH 2/2] dlm: Add down/up_write_non_owner to keep lockdep happy Steven Whitehouse
2009-11-12 13:27     ` [Cluster-devel] " Steven Whitehouse
2009-11-12 14:22     ` Ingo Molnar
2009-11-12 14:29       ` [Cluster-devel] " Steven Whitehouse
2009-11-12 17:14         ` David Teigland
2009-11-12 17:24           ` Steven Whitehouse
2009-11-12 18:34             ` David Teigland
2009-11-13 10:21               ` Steven Whitehouse
     [not found]           ` <1258044339.4039.685.camel@laptop>
2009-11-12 17:27             ` Steven Whitehouse
2009-11-12 18:21             ` David Teigland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091013145337.GA27036@redhat.com \
    --to=teigland@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.