diff options
author | David Teigland <teigland@redhat.com> | 2006-01-17 03:47:12 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-01-17 03:47:12 -0500 |
commit | 869d81df53ad28ce78fc92504b3365b8196a2fa1 (patch) | |
tree | 4062f1b13ef32445f1e554d15d59765f88de5ba6 /fs/gfs2/locking/nolock | |
parent | a8f2d64728d8b706392fc1cb0f2fd6852a5e27ae (diff) |
[GFS2] An update of the GFS2 lock modules
This brings the lock modules uptodate and removes the stray
.mod.c file which accidently got included in the last check in.
Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/locking/nolock')
-rw-r--r-- | fs/gfs2/locking/nolock/lock_nolock.mod.c | 44 | ||||
-rw-r--r-- | fs/gfs2/locking/nolock/main.c | 113 |
2 files changed, 12 insertions, 145 deletions
diff --git a/fs/gfs2/locking/nolock/lock_nolock.mod.c b/fs/gfs2/locking/nolock/lock_nolock.mod.c deleted file mode 100644 index ae92522b2182..000000000000 --- a/fs/gfs2/locking/nolock/lock_nolock.mod.c +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | #include <linux/module.h> | ||
2 | #include <linux/vermagic.h> | ||
3 | #include <linux/compiler.h> | ||
4 | |||
5 | MODULE_INFO(vermagic, VERMAGIC_STRING); | ||
6 | |||
7 | #undef unix | ||
8 | struct module __this_module | ||
9 | __attribute__((section(".gnu.linkonce.this_module"))) = { | ||
10 | .name = __stringify(KBUILD_MODNAME), | ||
11 | .init = init_module, | ||
12 | #ifdef CONFIG_MODULE_UNLOAD | ||
13 | .exit = cleanup_module, | ||
14 | #endif | ||
15 | }; | ||
16 | |||
17 | static const struct modversion_info ____versions[] | ||
18 | __attribute_used__ | ||
19 | __attribute__((section("__versions"))) = { | ||
20 | { 0x316962fc, "struct_module" }, | ||
21 | { 0x5a34a45c, "__kmalloc" }, | ||
22 | { 0x724beef2, "malloc_sizes" }, | ||
23 | { 0x3fa03a97, "memset" }, | ||
24 | { 0xc16fe12d, "__memcpy" }, | ||
25 | { 0xdd132261, "printk" }, | ||
26 | { 0x859204af, "sscanf" }, | ||
27 | { 0x3656bf5a, "lock_kernel" }, | ||
28 | { 0x1e6d26a8, "strstr" }, | ||
29 | { 0x41ede9df, "lm_register_proto" }, | ||
30 | { 0xb1f975aa, "unlock_kernel" }, | ||
31 | { 0x87b0b01f, "posix_lock_file_wait" }, | ||
32 | { 0x75f29cfd, "kmem_cache_alloc" }, | ||
33 | { 0x69384280, "lm_unregister_proto" }, | ||
34 | { 0x37a0cba, "kfree" }, | ||
35 | { 0x5d16bfe6, "posix_test_lock" }, | ||
36 | }; | ||
37 | |||
38 | static const char __module_depends[] | ||
39 | __attribute_used__ | ||
40 | __attribute__((section(".modinfo"))) = | ||
41 | "depends=gfs2"; | ||
42 | |||
43 | |||
44 | MODULE_INFO(srcversion, "123E446F965A386A0C017C4"); | ||
diff --git a/fs/gfs2/locking/nolock/main.c b/fs/gfs2/locking/nolock/main.c index d3919e471163..b716e336c073 100644 --- a/fs/gfs2/locking/nolock/main.c +++ b/fs/gfs2/locking/nolock/main.c | |||
@@ -1,15 +1,11 @@ | |||
1 | /****************************************************************************** | 1 | /* |
2 | ******************************************************************************* | 2 | * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. |
3 | ** | 3 | * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. |
4 | ** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. | 4 | * |
5 | ** Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. | 5 | * This copyrighted material is made available to anyone wishing to use, |
6 | ** | 6 | * modify, copy, or redistribute it subject to the terms and conditions |
7 | ** This copyrighted material is made available to anyone wishing to use, | 7 | * of the GNU General Public License v.2. |
8 | ** modify, copy, or redistribute it subject to the terms and conditions | 8 | */ |
9 | ** of the GNU General Public License v.2. | ||
10 | ** | ||
11 | ******************************************************************************* | ||
12 | ******************************************************************************/ | ||
13 | 9 | ||
14 | #include <linux/module.h> | 10 | #include <linux/module.h> |
15 | #include <linux/slab.h> | 11 | #include <linux/slab.h> |
@@ -27,23 +23,11 @@ struct nolock_lockspace { | |||
27 | 23 | ||
28 | struct lm_lockops nolock_ops; | 24 | struct lm_lockops nolock_ops; |
29 | 25 | ||
30 | /** | ||
31 | * nolock_mount - mount a nolock lockspace | ||
32 | * @table_name: the name of the space to mount | ||
33 | * @host_data: host specific data | ||
34 | * @cb: the callback | ||
35 | * @fsdata: | ||
36 | * @min_lvb_size: | ||
37 | * @flags: | ||
38 | * @lockstruct: the structure of crap to fill in | ||
39 | * | ||
40 | * Returns: 0 on success, -EXXX on failure | ||
41 | */ | ||
42 | |||
43 | static int nolock_mount(char *table_name, char *host_data, | 26 | static int nolock_mount(char *table_name, char *host_data, |
44 | lm_callback_t cb, lm_fsdata_t *fsdata, | 27 | lm_callback_t cb, lm_fsdata_t *fsdata, |
45 | unsigned int min_lvb_size, int flags, | 28 | unsigned int min_lvb_size, int flags, |
46 | struct lm_lockstruct *lockstruct) | 29 | struct lm_lockstruct *lockstruct, |
30 | struct kobject *fskobj) | ||
47 | { | 31 | { |
48 | char *c; | 32 | char *c; |
49 | unsigned int jid; | 33 | unsigned int jid; |
@@ -77,34 +61,16 @@ static int nolock_mount(char *table_name, char *host_data, | |||
77 | return 0; | 61 | return 0; |
78 | } | 62 | } |
79 | 63 | ||
80 | /** | ||
81 | * nolock_others_may_mount - unmount a lock space | ||
82 | * @lockspace: the lockspace to unmount | ||
83 | * | ||
84 | */ | ||
85 | |||
86 | static void nolock_others_may_mount(lm_lockspace_t *lockspace) | 64 | static void nolock_others_may_mount(lm_lockspace_t *lockspace) |
87 | { | 65 | { |
88 | } | 66 | } |
89 | 67 | ||
90 | /** | ||
91 | * nolock_unmount - unmount a lock space | ||
92 | * @lockspace: the lockspace to unmount | ||
93 | * | ||
94 | */ | ||
95 | |||
96 | static void nolock_unmount(lm_lockspace_t *lockspace) | 68 | static void nolock_unmount(lm_lockspace_t *lockspace) |
97 | { | 69 | { |
98 | struct nolock_lockspace *nl = (struct nolock_lockspace *)lockspace; | 70 | struct nolock_lockspace *nl = (struct nolock_lockspace *)lockspace; |
99 | kfree(nl); | 71 | kfree(nl); |
100 | } | 72 | } |
101 | 73 | ||
102 | /** | ||
103 | * nolock_withdraw - withdraw from a lock space | ||
104 | * @lockspace: the lockspace | ||
105 | * | ||
106 | */ | ||
107 | |||
108 | static void nolock_withdraw(lm_lockspace_t *lockspace) | 74 | static void nolock_withdraw(lm_lockspace_t *lockspace) |
109 | { | 75 | { |
110 | } | 76 | } |
@@ -164,12 +130,6 @@ static unsigned int nolock_unlock(lm_lock_t *lock, unsigned int cur_state) | |||
164 | return 0; | 130 | return 0; |
165 | } | 131 | } |
166 | 132 | ||
167 | /** | ||
168 | * nolock_cancel - cancel a request on a lock | ||
169 | * @lock: the lock to cancel request for | ||
170 | * | ||
171 | */ | ||
172 | |||
173 | static void nolock_cancel(lm_lock_t *lock) | 133 | static void nolock_cancel(lm_lock_t *lock) |
174 | { | 134 | { |
175 | } | 135 | } |
@@ -219,16 +179,6 @@ static void nolock_sync_lvb(lm_lock_t *lock, char *lvb) | |||
219 | { | 179 | { |
220 | } | 180 | } |
221 | 181 | ||
222 | /** | ||
223 | * nolock_plock_get - | ||
224 | * @lockspace: the lockspace | ||
225 | * @name: | ||
226 | * @file: | ||
227 | * @fl: | ||
228 | * | ||
229 | * Returns: errno | ||
230 | */ | ||
231 | |||
232 | static int nolock_plock_get(lm_lockspace_t *lockspace, struct lm_lockname *name, | 182 | static int nolock_plock_get(lm_lockspace_t *lockspace, struct lm_lockname *name, |
233 | struct file *file, struct file_lock *fl) | 183 | struct file *file, struct file_lock *fl) |
234 | { | 184 | { |
@@ -244,17 +194,6 @@ static int nolock_plock_get(lm_lockspace_t *lockspace, struct lm_lockname *name, | |||
244 | return 0; | 194 | return 0; |
245 | } | 195 | } |
246 | 196 | ||
247 | /** | ||
248 | * nolock_plock - | ||
249 | * @lockspace: the lockspace | ||
250 | * @name: | ||
251 | * @file: | ||
252 | * @cmd: | ||
253 | * @fl: | ||
254 | * | ||
255 | * Returns: errno | ||
256 | */ | ||
257 | |||
258 | static int nolock_plock(lm_lockspace_t *lockspace, struct lm_lockname *name, | 197 | static int nolock_plock(lm_lockspace_t *lockspace, struct lm_lockname *name, |
259 | struct file *file, int cmd, struct file_lock *fl) | 198 | struct file *file, int cmd, struct file_lock *fl) |
260 | { | 199 | { |
@@ -265,16 +204,6 @@ static int nolock_plock(lm_lockspace_t *lockspace, struct lm_lockname *name, | |||
265 | return error; | 204 | return error; |
266 | } | 205 | } |
267 | 206 | ||
268 | /** | ||
269 | * nolock_punlock - | ||
270 | * @lockspace: the lockspace | ||
271 | * @name: | ||
272 | * @file: | ||
273 | * @fl: | ||
274 | * | ||
275 | * Returns: errno | ||
276 | */ | ||
277 | |||
278 | static int nolock_punlock(lm_lockspace_t *lockspace, struct lm_lockname *name, | 207 | static int nolock_punlock(lm_lockspace_t *lockspace, struct lm_lockname *name, |
279 | struct file *file, struct file_lock *fl) | 208 | struct file *file, struct file_lock *fl) |
280 | { | 209 | { |
@@ -285,13 +214,6 @@ static int nolock_punlock(lm_lockspace_t *lockspace, struct lm_lockname *name, | |||
285 | return error; | 214 | return error; |
286 | } | 215 | } |
287 | 216 | ||
288 | /** | ||
289 | * nolock_recovery_done - reset the expired locks for a given jid | ||
290 | * @lockspace: the lockspace | ||
291 | * @jid: the jid | ||
292 | * | ||
293 | */ | ||
294 | |||
295 | static void nolock_recovery_done(lm_lockspace_t *lockspace, unsigned int jid, | 217 | static void nolock_recovery_done(lm_lockspace_t *lockspace, unsigned int jid, |
296 | unsigned int message) | 218 | unsigned int message) |
297 | { | 219 | { |
@@ -318,17 +240,11 @@ struct lm_lockops nolock_ops = { | |||
318 | .lm_owner = THIS_MODULE, | 240 | .lm_owner = THIS_MODULE, |
319 | }; | 241 | }; |
320 | 242 | ||
321 | /** | ||
322 | * init_nolock - Initialize the nolock module | ||
323 | * | ||
324 | * Returns: 0 on success, -EXXX on failure | ||
325 | */ | ||
326 | |||
327 | int __init init_nolock(void) | 243 | int __init init_nolock(void) |
328 | { | 244 | { |
329 | int error; | 245 | int error; |
330 | 246 | ||
331 | error = lm_register_proto(&nolock_ops); | 247 | error = gfs_register_lockproto(&nolock_ops); |
332 | if (error) { | 248 | if (error) { |
333 | printk("lock_nolock: can't register protocol: %d\n", error); | 249 | printk("lock_nolock: can't register protocol: %d\n", error); |
334 | return error; | 250 | return error; |
@@ -338,14 +254,9 @@ int __init init_nolock(void) | |||
338 | return 0; | 254 | return 0; |
339 | } | 255 | } |
340 | 256 | ||
341 | /** | ||
342 | * exit_nolock - cleanup the nolock module | ||
343 | * | ||
344 | */ | ||
345 | |||
346 | void __exit exit_nolock(void) | 257 | void __exit exit_nolock(void) |
347 | { | 258 | { |
348 | lm_unregister_proto(&nolock_ops); | 259 | gfs_unregister_lockproto(&nolock_ops); |
349 | } | 260 | } |
350 | 261 | ||
351 | module_init(init_nolock); | 262 | module_init(init_nolock); |