blob: 2b830c2f322e36ec4ce58753c4db96c2b6842a58 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Nathan Scott7b718762005-11-02 14:58:39 +11002 * Copyright (c) 2000-2005 Silicon Graphics, Inc.
3 * All Rights Reserved.
Linus Torvalds1da177e2005-04-16 15:20:36 -07004 *
Nathan Scott7b718762005-11-02 14:58:39 +11005 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
Linus Torvalds1da177e2005-04-16 15:20:36 -07007 * published by the Free Software Foundation.
8 *
Nathan Scott7b718762005-11-02 14:58:39 +11009 * This program is distributed in the hope that it would be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
Linus Torvalds1da177e2005-04-16 15:20:36 -070013 *
Nathan Scott7b718762005-11-02 14:58:39 +110014 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Linus Torvalds1da177e2005-04-16 15:20:36 -070017 */
18#ifndef __XFS_SUPER_H__
19#define __XFS_SUPER_H__
20
Christoph Hellwiga5694252007-07-17 04:04:28 -070021#include <linux/exportfs.h>
22
Linus Torvalds1da177e2005-04-16 15:20:36 -070023#ifdef CONFIG_XFS_QUOTA
Christoph Hellwiga05931c2012-03-13 08:52:37 +000024extern int xfs_qm_init(void);
Linus Torvalds1da177e2005-04-16 15:20:36 -070025extern void xfs_qm_exit(void);
Linus Torvalds1da177e2005-04-16 15:20:36 -070026#else
Christoph Hellwiga05931c2012-03-13 08:52:37 +000027# define xfs_qm_init() (0)
28# define xfs_qm_exit() do { } while (0)
Linus Torvalds1da177e2005-04-16 15:20:36 -070029#endif
30
31#ifdef CONFIG_XFS_POSIX_ACL
32# define XFS_ACL_STRING "ACLs, "
33# define set_posix_acl_flag(sb) ((sb)->s_flags |= MS_POSIXACL)
34#else
35# define XFS_ACL_STRING
36# define set_posix_acl_flag(sb) do { } while (0)
37#endif
38
Eric Sandeenf7d3c342008-04-17 16:50:22 +100039#define XFS_SECURITY_STRING "security attributes, "
Linus Torvalds1da177e2005-04-16 15:20:36 -070040
41#ifdef CONFIG_XFS_RT
42# define XFS_REALTIME_STRING "realtime, "
43#else
44# define XFS_REALTIME_STRING
45#endif
46
Linus Torvalds1da177e2005-04-16 15:20:36 -070047#ifdef DEBUG
48# define XFS_DBG_STRING "debug"
49#else
50# define XFS_DBG_STRING "no debug"
51#endif
52
Christoph Hellwig668332e2010-10-06 18:41:15 +000053#define XFS_VERSION_STRING "SGI XFS"
Linus Torvalds1da177e2005-04-16 15:20:36 -070054#define XFS_BUILD_OPTIONS XFS_ACL_STRING \
55 XFS_SECURITY_STRING \
56 XFS_REALTIME_STRING \
Linus Torvalds1da177e2005-04-16 15:20:36 -070057 XFS_DBG_STRING /* DBG must be last */
58
Linus Torvalds1da177e2005-04-16 15:20:36 -070059struct xfs_inode;
60struct xfs_mount;
61struct xfs_buftarg;
62struct block_device;
63
64extern __uint64_t xfs_max_file_offset(unsigned int);
65
Dave Chinner9aa05002012-10-08 21:56:04 +110066extern void xfs_flush_inodes(struct xfs_mount *mp);
Christoph Hellwigf538d4d2005-11-02 10:26:59 +110067extern void xfs_blkdev_issue_flush(struct xfs_buftarg *);
Eric Sandeen9de67c32014-07-24 20:51:54 +100068extern xfs_agnumber_t xfs_set_inode32(struct xfs_mount *, xfs_agnumber_t agcount);
69extern xfs_agnumber_t xfs_set_inode64(struct xfs_mount *, xfs_agnumber_t agcount);
Linus Torvalds1da177e2005-04-16 15:20:36 -070070
Christoph Hellwig39655162007-10-21 16:42:17 -070071extern const struct export_operations xfs_export_operations;
Stephen Hemminger46e58762010-05-13 17:53:20 -070072extern const struct xattr_handler *xfs_xattr_handlers[];
Alexey Dobriyan0d54b212009-09-21 17:01:09 -070073extern const struct quotactl_ops xfs_quotactl_operations;
Linus Torvalds1da177e2005-04-16 15:20:36 -070074
Christoph Hellwigb267ce92007-08-30 17:21:30 +100075#define XFS_M(sb) ((struct xfs_mount *)((sb)->s_fs_info))
Christoph Hellwigb09cc772007-08-30 17:19:57 +100076
Linus Torvalds1da177e2005-04-16 15:20:36 -070077#endif /* __XFS_SUPER_H__ */