public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sunil Mushran <sunil.mushran@oracle.com>
To: Joel Becker <joel.becker@oracle.com>
Cc: ocfs2-devel@oss.oracle.com, mfasheh@suse.com,
	linux-kernel@vger.kernel.org
Subject: Re: [Ocfs2-devel] [PATCH 07/11] ocfs2: Remove the ast pointers from ocfs2_stack_plugins
Date: Fri, 12 Feb 2010 17:10:17 -0800	[thread overview]
Message-ID: <4B75FBF9.5030300@oracle.com> (raw)
In-Reply-To: <1265794074-19539-8-git-send-email-joel.becker@oracle.com>

Acked-by: Sunil Mushran <sunil.mushran@oracle.com>

Joel Becker wrote:
> With the full ocfs2_locking_protocol hanging off of the
> ocfs2_cluster_connection, ast wrappers can get the ast/bast pointers
> there.  They don't need to get them from their plugin structure.
>
> The user plugin still needs the maximum locking protocol version,
> though.  This changes the plugin structure so that it only holds the max
> version, not the entire ocfs2_locking_protocol pointer.
>
> Signed-off-by: Joel Becker <joel.becker@oracle.com>
> ---
>  fs/ocfs2/stack_user.c |    6 +++---
>  fs/ocfs2/stackglue.c  |    4 ++--
>  fs/ocfs2/stackglue.h  |    2 +-
>  3 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/fs/ocfs2/stack_user.c b/fs/ocfs2/stack_user.c
> index b4cf616..5ae8812 100644
> --- a/fs/ocfs2/stack_user.c
> +++ b/fs/ocfs2/stack_user.c
> @@ -62,8 +62,8 @@
>   * negotiated by the client.  The client negotiates based on the maximum
>   * version advertised in /sys/fs/ocfs2/max_locking_protocol.  The major
>   * number from the "SETV" message must match
> - * ocfs2_user_plugin.sp_proto->lp_max_version.pv_major, and the minor number
> - * must be less than or equal to ...->lp_max_version.pv_minor.
> + * ocfs2_user_plugin.sp_max_proto.pv_major, and the minor number
> + * must be less than or equal to ...sp_max_version.pv_minor.
>   *
>   * Once this information has been set, mounts will be allowed.  From this
>   * point on, the "DOWN" message can be sent for node down notification.
> @@ -400,7 +400,7 @@ static int ocfs2_control_do_setversion_msg(struct file *file,
>  	char *ptr = NULL;
>  	struct ocfs2_control_private *p = file->private_data;
>  	struct ocfs2_protocol_version *max =
> -		&ocfs2_user_plugin.sp_proto->lp_max_version;
> +		&ocfs2_user_plugin.sp_max_proto;
>  
>  	if (ocfs2_control_get_handshake_state(file) !=
>  	    OCFS2_CONTROL_HANDSHAKE_PROTOCOL)
> diff --git a/fs/ocfs2/stackglue.c b/fs/ocfs2/stackglue.c
> index 010ecab..fc184c7 100644
> --- a/fs/ocfs2/stackglue.c
> +++ b/fs/ocfs2/stackglue.c
> @@ -176,7 +176,7 @@ int ocfs2_stack_glue_register(struct ocfs2_stack_plugin *plugin)
>  	spin_lock(&ocfs2_stack_lock);
>  	if (!ocfs2_stack_lookup(plugin->sp_name)) {
>  		plugin->sp_count = 0;
> -		plugin->sp_proto = lproto;
> +		plugin->sp_max_proto = lproto->lp_max_version;
>  		list_add(&plugin->sp_list, &ocfs2_stack_list);
>  		printk(KERN_INFO "ocfs2: Registered cluster interface %s\n",
>  		       plugin->sp_name);
> @@ -224,7 +224,7 @@ void ocfs2_stack_glue_set_locking_protocol(struct ocfs2_locking_protocol *proto)
>  
>  	lproto = proto;
>  	list_for_each_entry(p, &ocfs2_stack_list, sp_list) {
> -		p->sp_proto = lproto;
> +		p->sp_max_proto = lproto->lp_max_version;
>  	}
>  
>  	spin_unlock(&ocfs2_stack_lock);
> diff --git a/fs/ocfs2/stackglue.h b/fs/ocfs2/stackglue.h
> index cf8bac2..77a7a9a 100644
> --- a/fs/ocfs2/stackglue.h
> +++ b/fs/ocfs2/stackglue.h
> @@ -233,7 +233,7 @@ struct ocfs2_stack_plugin {
>  	/* These are managed by the stackglue code. */
>  	struct list_head sp_list;
>  	unsigned int sp_count;
> -	struct ocfs2_locking_protocol *sp_proto;
> +	struct ocfs2_protocol_version sp_max_proto;
>  };
>  
>  
>   


  reply	other threads:[~2010-02-13  1:11 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-10  9:27 [0/11] ocfs2_dlmfs improvements v2 Joel Becker
2010-02-10  9:27 ` [PATCH 01/11] ocfs2_dlmfs: Add capabilities parameter Joel Becker
2010-02-11 20:41   ` [Ocfs2-devel] " Sunil Mushran
2010-02-10  9:27 ` [PATCH 02/11] ocfs2_dlmfs: Use poll() to signify BASTs Joel Becker
2010-02-10  9:27 ` [PATCH 03/11] ocfs2_dlmfs: Move to its own directory Joel Becker
2010-02-11 21:12   ` [Ocfs2-devel] " Sunil Mushran
2010-02-10  9:27 ` [PATCH 04/11] ocfs2: Pass lksbs back from stackglue ast/bast functions Joel Becker
2010-02-11 21:20   ` [Ocfs2-devel] " Sunil Mushran
2010-02-10  9:27 ` [PATCH 05/11] ocfs2: Attach the connection to the lksb Joel Becker
2010-02-12 23:57   ` [Ocfs2-devel] " Sunil Mushran
2010-02-10  9:27 ` [PATCH 06/11] ocfs2: Hang the locking proto on the cluster conn and use it in asts Joel Becker
2010-02-12 23:59   ` [Ocfs2-devel] " Sunil Mushran
2010-02-10  9:27 ` [PATCH 07/11] ocfs2: Remove the ast pointers from ocfs2_stack_plugins Joel Becker
2010-02-13  1:10   ` Sunil Mushran [this message]
2010-02-10  9:27 ` [PATCH 08/11] ocfs2: Pass the locking protocol into ocfs2_cluster_connect() Joel Becker
2010-02-27  0:09   ` [Ocfs2-devel] " Sunil Mushran
2010-02-10  9:27 ` [PATCH 09/11] ocfs2_dlmfs: Don't honor truncate. The size of a dlmfs file is LVB_LEN Joel Becker
2010-02-27  0:11   ` [Ocfs2-devel] " Sunil Mushran
2010-02-10  9:27 ` [PATCH 10/11] ocfs2_dlmfs: Use the stackglue Joel Becker
2010-02-27  0:27   ` [Ocfs2-devel] " Sunil Mushran
2010-02-10  9:27 ` [PATCH 11/11] ocfs2_dlmfs: Enable the use of user cluster stacks Joel Becker
2010-03-02  0:08   ` [Ocfs2-devel] " Sunil Mushran

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=4B75FBF9.5030300@oracle.com \
    --to=sunil.mushran@oracle.com \
    --cc=joel.becker@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mfasheh@suse.com \
    --cc=ocfs2-devel@oss.oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox