aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/locking/nolock/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/locking/nolock/main.c')
-rw-r--r--fs/gfs2/locking/nolock/main.c113
1 files changed, 12 insertions, 101 deletions
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
28struct lm_lockops nolock_ops; 24struct 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
43static int nolock_mount(char *table_name, char *host_data, 26static 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
86static void nolock_others_may_mount(lm_lockspace_t *lockspace) 64static 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
96static void nolock_unmount(lm_lockspace_t *lockspace) 68static 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
108static void nolock_withdraw(lm_lockspace_t *lockspace) 74static 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
173static void nolock_cancel(lm_lock_t *lock) 133static 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
232static int nolock_plock_get(lm_lockspace_t *lockspace, struct lm_lockname *name, 182static 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
258static int nolock_plock(lm_lockspace_t *lockspace, struct lm_lockname *name, 197static 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
278static int nolock_punlock(lm_lockspace_t *lockspace, struct lm_lockname *name, 207static 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
295static void nolock_recovery_done(lm_lockspace_t *lockspace, unsigned int jid, 217static 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
327int __init init_nolock(void) 243int __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
346void __exit exit_nolock(void) 257void __exit exit_nolock(void)
347{ 258{
348 lm_unregister_proto(&nolock_ops); 259 gfs_unregister_lockproto(&nolock_ops);
349} 260}
350 261
351module_init(init_nolock); 262module_init(init_nolock);