blob: bbe3d15a7904d6185ab440c3b2a12533322e72a7 [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
47#if XFS_BIG_BLKNOS
48# if XFS_BIG_INUMS
49# define XFS_BIGFS_STRING "large block/inode numbers, "
50# else
51# define XFS_BIGFS_STRING "large block numbers, "
52# endif
53#else
54# define XFS_BIGFS_STRING
55#endif
56
Linus Torvalds1da177e2005-04-16 15:20:36 -070057#ifdef DEBUG
58# define XFS_DBG_STRING "debug"
59#else
60# define XFS_DBG_STRING "no debug"
61#endif
62
Christoph Hellwig668332e2010-10-06 18:41:15 +000063#define XFS_VERSION_STRING "SGI XFS"
Linus Torvalds1da177e2005-04-16 15:20:36 -070064#define XFS_BUILD_OPTIONS XFS_ACL_STRING \
65 XFS_SECURITY_STRING \
66 XFS_REALTIME_STRING \
67 XFS_BIGFS_STRING \
Linus Torvalds1da177e2005-04-16 15:20:36 -070068 XFS_DBG_STRING /* DBG must be last */
69
Linus Torvalds1da177e2005-04-16 15:20:36 -070070struct xfs_inode;
71struct xfs_mount;
72struct xfs_buftarg;
73struct block_device;
74
75extern __uint64_t xfs_max_file_offset(unsigned int);
76
Dave Chinner9aa05002012-10-08 21:56:04 +110077extern void xfs_flush_inodes(struct xfs_mount *mp);
Christoph Hellwigf538d4d2005-11-02 10:26:59 +110078extern void xfs_blkdev_issue_flush(struct xfs_buftarg *);
Carlos Maiolino2d2194f2012-09-20 10:32:38 -030079extern xfs_agnumber_t xfs_set_inode32(struct xfs_mount *);
80extern xfs_agnumber_t xfs_set_inode64(struct xfs_mount *);
Linus Torvalds1da177e2005-04-16 15:20:36 -070081
Christoph Hellwig39655162007-10-21 16:42:17 -070082extern const struct export_operations xfs_export_operations;
Stephen Hemminger46e58762010-05-13 17:53:20 -070083extern const struct xattr_handler *xfs_xattr_handlers[];
Alexey Dobriyan0d54b212009-09-21 17:01:09 -070084extern const struct quotactl_ops xfs_quotactl_operations;
Linus Torvalds1da177e2005-04-16 15:20:36 -070085
Christoph Hellwigb267ce92007-08-30 17:21:30 +100086#define XFS_M(sb) ((struct xfs_mount *)((sb)->s_fs_info))
Christoph Hellwigb09cc772007-08-30 17:19:57 +100087
Linus Torvalds1da177e2005-04-16 15:20:36 -070088#endif /* __XFS_SUPER_H__ */