aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/stackglue.h
diff options
context:
space:
mode:
authorJoel Becker <joel.becker@oracle.com>2008-01-29 20:37:32 -0500
committerMark Fasheh <mfasheh@suse.com>2008-04-18 11:56:03 -0400
commit24ef1815e5e13e50196eb1ab8ddc0d783443bdf8 (patch)
tree4c44e87b1a80d4745416c9973258c40db8433829 /fs/ocfs2/stackglue.h
parent386a2ef8576e966076c293f6496b9e3d7e3d9035 (diff)
ocfs2: Separate out dlm lock functions.
This is the first in a series of patches to isolate ocfs2 from the underlying cluster stack. Here we wrap the dlm locking functions with ocfs2-specific calls. Because ocfs2 always uses the same dlm lock status callbacks, we can eliminate the callbacks from the filesystem visible functions. Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2/stackglue.h')
-rw-r--r--fs/ocfs2/stackglue.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/fs/ocfs2/stackglue.h b/fs/ocfs2/stackglue.h
new file mode 100644
index 000000000000..40a002413404
--- /dev/null
+++ b/fs/ocfs2/stackglue.h
@@ -0,0 +1,45 @@
1/* -*- mode: c; c-basic-offset: 8; -*-
2 * vim: noexpandtab sw=8 ts=8 sts=0:
3 *
4 * stackglue.h
5 *
6 * Glue to the underlying cluster stack.
7 *
8 * Copyright (C) 2007 Oracle. All rights reserved.
9 *
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public
12 * License as published by the Free Software Foundation, version 2.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
18 */
19
20
21#ifndef STACKGLUE_H
22#define STACKGLUE_H
23
24struct ocfs2_locking_protocol {
25 void (*lp_lock_ast)(void *astarg);
26 void (*lp_blocking_ast)(void *astarg, int level);
27 void (*lp_unlock_ast)(void *astarg, enum dlm_status status);
28};
29
30enum dlm_status ocfs2_dlm_lock(struct dlm_ctxt *dlm,
31 int mode,
32 struct dlm_lockstatus *lksb,
33 u32 flags,
34 void *name,
35 unsigned int namelen,
36 void *astarg);
37enum dlm_status ocfs2_dlm_unlock(struct dlm_ctxt *dlm,
38 struct dlm_lockstatus *lksb,
39 u32 flags,
40 void *astarg);
41
42void o2cb_get_stack(struct ocfs2_locking_protocol *proto);
43void o2cb_put_stack(void);
44
45#endif /* STACKGLUE_H */