aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/gfs2.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/gfs2.h')
-rw-r--r--fs/gfs2/gfs2.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/fs/gfs2/gfs2.h b/fs/gfs2/gfs2.h
new file mode 100644
index 000000000000..a5d118238466
--- /dev/null
+++ b/fs/gfs2/gfs2.h
@@ -0,0 +1,62 @@
1/*
2 * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
3 * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved.
4 *
5 * This copyrighted material is made available to anyone wishing to use,
6 * modify, copy, or redistribute it subject to the terms and conditions
7 * of the GNU General Public License v.2.
8 */
9
10#ifndef __GFS2_DOT_H__
11#define __GFS2_DOT_H__
12
13#include <linux/gfs2_ondisk.h>
14
15#include "lm_interface.h"
16#include "lvb.h"
17#include "incore.h"
18#include "util.h"
19
20enum {
21 NO_CREATE = 0,
22 CREATE = 1,
23};
24
25enum {
26 NO_WAIT = 0,
27 WAIT = 1,
28};
29
30enum {
31 NO_FORCE = 0,
32 FORCE = 1,
33};
34
35/* Divide num by den. Round up if there is a remainder. */
36#define DIV_RU(num, den) (((num) + (den) - 1) / (den))
37
38#define GFS2_FAST_NAME_SIZE 8
39
40#define get_v2sdp(sb) ((struct gfs2_sbd *)(sb)->s_fs_info)
41#define set_v2sdp(sb, sdp) (sb)->s_fs_info = (sdp)
42#define get_v2ip(inode) ((struct gfs2_inode *)(inode)->u.generic_ip)
43#define set_v2ip(inode, ip) (inode)->u.generic_ip = (ip)
44#define get_v2fp(file) ((struct gfs2_file *)(file)->private_data)
45#define set_v2fp(file, fp) (file)->private_data = (fp)
46#define get_v2bd(bh) ((struct gfs2_bufdata *)(bh)->b_private)
47#define set_v2bd(bh, bd) (bh)->b_private = (bd)
48#define get_v2db(bh) ((struct gfs2_databuf *)(bh)->b_private)
49#define set_v2db(bh, db) (bh)->b_private = (db)
50
51#define get_transaction ((struct gfs2_trans *)(current->journal_info))
52#define set_transaction(tr) (current->journal_info) = (tr)
53
54#define get_gl2ip(gl) ((struct gfs2_inode *)(gl)->gl_object)
55#define set_gl2ip(gl, ip) (gl)->gl_object = (ip)
56#define get_gl2rgd(gl) ((struct gfs2_rgrpd *)(gl)->gl_object)
57#define set_gl2rgd(gl, rgd) (gl)->gl_object = (rgd)
58#define get_gl2gl(gl) ((struct gfs2_glock *)(gl)->gl_object)
59#define set_gl2gl(gl, gl2) (gl)->gl_object = (gl2)
60
61#endif /* __GFS2_DOT_H__ */
62