From: Joel Becker <joel.becker@oracle.com>
To: ocfs2-devel@oss.oracle.com
Cc: linux-kernel@vger.kernel.org, mfasheh@suse.com
Subject: [PATCH 01/10] ocfs2_dlmfs: Add capabilities parameter.
Date: Thu, 4 Feb 2010 16:54:54 -0800 [thread overview]
Message-ID: <1265331303-19881-2-git-send-email-joel.becker@oracle.com> (raw)
In-Reply-To: <1265331303-19881-1-git-send-email-joel.becker@oracle.com>
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
--
1.6.6.1
next prev parent reply other threads:[~2010-02-05 0:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-05 0:54 [PATCH 0/10] ocfs2_dlmfs improvements Joel Becker
2010-02-05 0:54 ` Joel Becker [this message]
2010-02-05 0:54 ` [PATCH 02/10] ocfs2_dlmfs: Use poll() to signify BASTs Joel Becker
2010-02-05 0:54 ` [PATCH 03/10] ocfs2_dlmfs: Move to its own directory Joel Becker
2010-02-05 0:54 ` [PATCH 04/10] ocfs2: Pass lksbs back from stackglue ast/bast functions Joel Becker
2010-02-05 0:54 ` [PATCH 05/10] ocfs2: Attach the connection to the lksb Joel Becker
2010-02-05 0:54 ` [PATCH 06/10] ocfs2: Hang the locking proto on the cluster conn and use it in asts Joel Becker
2010-02-05 0:55 ` [PATCH 07/10] ocfs2: Remove the ast pointers from ocfs2_stack_plugins Joel Becker
2010-02-05 0:55 ` [PATCH 08/10] ocfs2: Pass the locking protocol into ocfs2_cluster_connect() Joel Becker
2010-02-05 0:55 ` [PATCH 09/10] ocfs2_dlmfs: Use the stackglue Joel Becker
2010-02-05 0:55 ` [PATCH 10/10] ocfs2_dlmfs: Enable the use of user cluster stacks Joel Becker
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=1265331303-19881-2-git-send-email-joel.becker@oracle.com \
--to=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;
as well as URLs for NNTP newsgroup(s).