2 * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved.
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of version 2 of the GNU General Public License as
6 * published by the Free Software Foundation.
8 * This program is distributed in the hope that it would be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 * Further, this software is distributed without any warranty that it is
13 * free of the rightful claim of any third person regarding infringement
14 * or the like. Any license provided herein, whether implied or
15 * otherwise, applies only to this software file. Patent licenses, if
16 * any, provided herein do not apply to combinations of this program with
17 * other software, or any other product whatsoever.
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write the Free Software Foundation, Inc., 59
21 * Temple Place - Suite 330, Boston MA 02111-1307, USA.
23 * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
24 * Mountain View, CA 94043, or:
28 * For further information regarding this notice, see:
30 * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
32 #ifndef __XFS_SUPER_H__
33 #define __XFS_SUPER_H__
35 #ifdef CONFIG_XFS_DMAPI
36 # define vfs_insertdmapi(vfs) vfs_insertops(vfsp, &xfs_dmops)
37 # define vfs_initdmapi() dmapi_init()
38 # define vfs_exitdmapi() dmapi_uninit()
40 # define vfs_insertdmapi(vfs) do { } while (0)
41 # define vfs_initdmapi() do { } while (0)
42 # define vfs_exitdmapi() do { } while (0)
45 #ifdef CONFIG_XFS_QUOTA
46 # define vfs_insertquota(vfs) vfs_insertops(vfsp, &xfs_qmops)
47 extern void xfs_qm_init(void);
48 extern void xfs_qm_exit(void);
49 # define vfs_initquota() xfs_qm_init()
50 # define vfs_exitquota() xfs_qm_exit()
52 # define vfs_insertquota(vfs) do { } while (0)
53 # define vfs_initquota() do { } while (0)
54 # define vfs_exitquota() do { } while (0)
57 #ifdef CONFIG_XFS_POSIX_ACL
58 # define XFS_ACL_STRING "ACLs, "
59 # define set_posix_acl_flag(sb) ((sb)->s_flags |= MS_POSIXACL)
61 # define XFS_ACL_STRING
62 # define set_posix_acl_flag(sb) do { } while (0)
65 #ifdef CONFIG_XFS_SECURITY
66 # define XFS_SECURITY_STRING "security attributes, "
67 # define ENOSECURITY 0
69 # define XFS_SECURITY_STRING
70 # define ENOSECURITY EOPNOTSUPP
74 # define XFS_REALTIME_STRING "realtime, "
76 # define XFS_REALTIME_STRING
81 # define XFS_BIGFS_STRING "large block/inode numbers, "
83 # define XFS_BIGFS_STRING "large block numbers, "
86 # define XFS_BIGFS_STRING
89 #ifdef CONFIG_XFS_TRACE
90 # define XFS_TRACE_STRING "tracing, "
92 # define XFS_TRACE_STRING
95 #ifdef CONFIG_XFS_DMAPI
96 # define XFS_DMAPI_STRING "dmapi support, "
98 # define XFS_DMAPI_STRING
102 # define XFS_DBG_STRING "debug"
104 # define XFS_DBG_STRING "no debug"
107 #define XFS_BUILD_OPTIONS XFS_ACL_STRING \
108 XFS_SECURITY_STRING \
109 XFS_REALTIME_STRING \
113 XFS_DBG_STRING /* DBG must be last */
115 #define LINVFS_GET_VFS(s) \
116 (vfs_t *)((s)->s_fs_info)
117 #define LINVFS_SET_VFS(s, vfsp) \
118 ((s)->s_fs_info = vfsp)
125 extern __uint64_t xfs_max_file_offset(unsigned int);
127 extern void xfs_initialize_vnode(bhv_desc_t *, vnode_t *, bhv_desc_t *, int);
129 extern void xfs_flush_inode(struct xfs_inode *);
130 extern void xfs_flush_device(struct xfs_inode *);
132 extern int xfs_blkdev_get(struct xfs_mount *, const char *,
133 struct block_device **);
134 extern void xfs_blkdev_put(struct block_device *);
136 extern struct export_operations linvfs_export_ops;
138 #endif /* __XFS_SUPER_H__ */