diff options
Diffstat (limited to 'fs/ocfs2/dlm/dlmfs.c')
-rw-r--r-- | 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 02bf17808bdc..77d0df42fe02 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 = { | |||
81 | .pv_minor = OCFS2_LOCKING_PROTOCOL_MINOR, | 81 | .pv_minor = OCFS2_LOCKING_PROTOCOL_MINOR, |
82 | }; | 82 | }; |
83 | 83 | ||
84 | |||
85 | /* | ||
86 | * These are the ABI capabilities of dlmfs. | ||
87 | * | ||
88 | * Over time, dlmfs has added some features that were not part of the | ||
89 | * initial ABI. Unfortunately, some of these features are not detectable | ||
90 | * via standard usage. For example, Linux's default poll always returns | ||
91 | * POLLIN, so there is no way for a caller of poll(2) to know when dlmfs | ||
92 | * added poll support. Instead, we provide this list of new capabilities. | ||
93 | * | ||
94 | * Capabilities is a read-only attribute. We do it as a module parameter | ||
95 | * so we can discover it whether dlmfs is built in, loaded, or even not | ||
96 | * loaded. | ||
97 | * | ||
98 | * The ABI features are local to this machine's dlmfs mount. This is | ||
99 | * distinct from the locking protocol, which is concerned with inter-node | ||
100 | * interaction. | ||
101 | */ | ||
102 | #define DLMFS_CAPABILITIES "" | ||
103 | extern int param_set_dlmfs_capabilities(const char *val, | ||
104 | struct kernel_param *kp) | ||
105 | { | ||
106 | printk(KERN_ERR "%s: readonly parameter\n", kp->name); | ||
107 | return -EINVAL; | ||
108 | } | ||
109 | static int param_get_dlmfs_capabilities(char *buffer, | ||
110 | struct kernel_param *kp) | ||
111 | { | ||
112 | return strlcpy(buffer, DLMFS_CAPABILITIES, | ||
113 | strlen(DLMFS_CAPABILITIES) + 1); | ||
114 | } | ||
115 | module_param_call(capabilities, param_set_dlmfs_capabilities, | ||
116 | param_get_dlmfs_capabilities, NULL, 0444); | ||
117 | MODULE_PARM_DESC(capabilities, DLMFS_CAPABILITIES); | ||
118 | |||
119 | |||
84 | /* | 120 | /* |
85 | * decodes a set of open flags into a valid lock level and a set of flags. | 121 | * decodes a set of open flags into a valid lock level and a set of flags. |
86 | * returns < 0 if we have invalid flags | 122 | * returns < 0 if we have invalid flags |