All of lore.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: [Ocfs2-devel] [PATCH 01/11] ocfs2_dlmfs: Add capabilities parameter.
Date: Thu, 11 Feb 2010 12:41:25 -0800	[thread overview]
Message-ID: <4B746B75.8010801@oracle.com> (raw)
In-Reply-To: <1265794074-19539-2-git-send-email-joel.becker@oracle.com>

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


Joel Becker wrote:
> Over time, dlmfs has added some features that were not part of the
> initial ABI.  Unfortunately, some of these features are not detectable
> via standard usage.  For example, Linux's default poll always returns
> POLLIN, so there is no way for a caller of poll(2) to know when dlmfs
> added poll support.  Instead, we provide this list of new capabilities.
>
> Capabilities is a read-only attribute.  We do it as a module parameter
> so we can discover it whether dlmfs is built in, loaded, or even not
> loaded (via modinfo).
>
> The ABI features are local to this machine's dlmfs mount.  This is
> distinct from the locking protocol, which is concerned with inter-node
> interaction.
>
> Signed-off-by: Joel Becker <joel.becker@oracle.com>
> ---
>  fs/ocfs2/dlm/dlmfs.c |   36 ++++++++++++++++++++++++++++++++++++
>  1 files changed, 36 insertions(+), 0 deletions(-)
>
> diff --git a/fs/ocfs2/dlm/dlmfs.c b/fs/ocfs2/dlm/dlmfs.c
> index 02bf178..77d0df4 100644
> --- a/fs/ocfs2/dlm/dlmfs.c
> +++ b/fs/ocfs2/dlm/dlmfs.c
> @@ -81,6 +81,42 @@ static const struct dlm_protocol_version user_locking_protocol = {
>  	.pv_minor = OCFS2_LOCKING_PROTOCOL_MINOR,
>  };
>  
> +
> +/*
> + * These are the ABI capabilities of dlmfs.
> + *
> + * Over time, dlmfs has added some features that were not part of the
> + * initial ABI.  Unfortunately, some of these features are not detectable
> + * via standard usage.  For example, Linux's default poll always returns
> + * POLLIN, so there is no way for a caller of poll(2) to know when dlmfs
> + * added poll support.  Instead, we provide this list of new capabilities.
> + *
> + * Capabilities is a read-only attribute.  We do it as a module parameter
> + * so we can discover it whether dlmfs is built in, loaded, or even not
> + * loaded.
> + *
> + * The ABI features are local to this machine's dlmfs mount.  This is
> + * distinct from the locking protocol, which is concerned with inter-node
> + * interaction.
> + */
> +#define DLMFS_CAPABILITIES ""
> +extern int param_set_dlmfs_capabilities(const char *val,
> +					struct kernel_param *kp)
> +{
> +	printk(KERN_ERR "%s: readonly parameter\n", kp->name);
> +	return -EINVAL;
> +}
> +static int param_get_dlmfs_capabilities(char *buffer,
> +					struct kernel_param *kp)
> +{
> +	return strlcpy(buffer, DLMFS_CAPABILITIES,
> +		       strlen(DLMFS_CAPABILITIES) + 1);
> +}
> +module_param_call(capabilities, param_set_dlmfs_capabilities,
> +		  param_get_dlmfs_capabilities, NULL, 0444);
> +MODULE_PARM_DESC(capabilities, DLMFS_CAPABILITIES);
> +
> +
>  /*
>   * decodes a set of open flags into a valid lock level and a set of flags.
>   * returns < 0 if we have invalid flags
>   

WARNING: multiple messages have this Message-ID (diff)
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 01/11] ocfs2_dlmfs: Add capabilities parameter.
Date: Thu, 11 Feb 2010 12:41:25 -0800	[thread overview]
Message-ID: <4B746B75.8010801@oracle.com> (raw)
In-Reply-To: <1265794074-19539-2-git-send-email-joel.becker@oracle.com>

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


Joel Becker wrote:
> Over time, dlmfs has added some features that were not part of the
> initial ABI.  Unfortunately, some of these features are not detectable
> via standard usage.  For example, Linux's default poll always returns
> POLLIN, so there is no way for a caller of poll(2) to know when dlmfs
> added poll support.  Instead, we provide this list of new capabilities.
>
> Capabilities is a read-only attribute.  We do it as a module parameter
> so we can discover it whether dlmfs is built in, loaded, or even not
> loaded (via modinfo).
>
> The ABI features are local to this machine's dlmfs mount.  This is
> distinct from the locking protocol, which is concerned with inter-node
> interaction.
>
> Signed-off-by: Joel Becker <joel.becker@oracle.com>
> ---
>  fs/ocfs2/dlm/dlmfs.c |   36 ++++++++++++++++++++++++++++++++++++
>  1 files changed, 36 insertions(+), 0 deletions(-)
>
> diff --git a/fs/ocfs2/dlm/dlmfs.c b/fs/ocfs2/dlm/dlmfs.c
> index 02bf178..77d0df4 100644
> --- a/fs/ocfs2/dlm/dlmfs.c
> +++ b/fs/ocfs2/dlm/dlmfs.c
> @@ -81,6 +81,42 @@ static const struct dlm_protocol_version user_locking_protocol = {
>  	.pv_minor = OCFS2_LOCKING_PROTOCOL_MINOR,
>  };
>  
> +
> +/*
> + * These are the ABI capabilities of dlmfs.
> + *
> + * Over time, dlmfs has added some features that were not part of the
> + * initial ABI.  Unfortunately, some of these features are not detectable
> + * via standard usage.  For example, Linux's default poll always returns
> + * POLLIN, so there is no way for a caller of poll(2) to know when dlmfs
> + * added poll support.  Instead, we provide this list of new capabilities.
> + *
> + * Capabilities is a read-only attribute.  We do it as a module parameter
> + * so we can discover it whether dlmfs is built in, loaded, or even not
> + * loaded.
> + *
> + * The ABI features are local to this machine's dlmfs mount.  This is
> + * distinct from the locking protocol, which is concerned with inter-node
> + * interaction.
> + */
> +#define DLMFS_CAPABILITIES ""
> +extern int param_set_dlmfs_capabilities(const char *val,
> +					struct kernel_param *kp)
> +{
> +	printk(KERN_ERR "%s: readonly parameter\n", kp->name);
> +	return -EINVAL;
> +}
> +static int param_get_dlmfs_capabilities(char *buffer,
> +					struct kernel_param *kp)
> +{
> +	return strlcpy(buffer, DLMFS_CAPABILITIES,
> +		       strlen(DLMFS_CAPABILITIES) + 1);
> +}
> +module_param_call(capabilities, param_set_dlmfs_capabilities,
> +		  param_get_dlmfs_capabilities, NULL, 0444);
> +MODULE_PARM_DESC(capabilities, DLMFS_CAPABILITIES);
> +
> +
>  /*
>   * decodes a set of open flags into a valid lock level and a set of flags.
>   * returns < 0 if we have invalid flags
>   


  reply	other threads:[~2010-02-11 20:41 UTC|newest]

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