blob: b552cf6d3379849465a3a06f6919882504b9ae6e [file] [log] [blame]
Dave Chinner0b61f8a2018-06-05 19:42:14 -07001// SPDX-License-Identifier: GPL-2.0
Linus Torvalds1da177e2005-04-16 15:20:36 -07002/*
Nathan Scott7b718762005-11-02 14:58:39 +11003 * Copyright (c) 2000-2005 Silicon Graphics, Inc.
4 * All Rights Reserved.
Linus Torvalds1da177e2005-04-16 15:20:36 -07005 */
6#ifndef __XFS_SUPER_H__
7#define __XFS_SUPER_H__
8
Christoph Hellwiga5694252007-07-17 04:04:28 -07009#include <linux/exportfs.h>
10
Linus Torvalds1da177e2005-04-16 15:20:36 -070011#ifdef CONFIG_XFS_QUOTA
Christoph Hellwiga05931c2012-03-13 08:52:37 +000012extern int xfs_qm_init(void);
Linus Torvalds1da177e2005-04-16 15:20:36 -070013extern void xfs_qm_exit(void);
yu kuaie5e63402019-10-14 10:34:32 -070014# define XFS_QUOTA_STRING "quota, "
Linus Torvalds1da177e2005-04-16 15:20:36 -070015#else
Christoph Hellwiga05931c2012-03-13 08:52:37 +000016# define xfs_qm_init() (0)
17# define xfs_qm_exit() do { } while (0)
yu kuaie5e63402019-10-14 10:34:32 -070018# define XFS_QUOTA_STRING
Linus Torvalds1da177e2005-04-16 15:20:36 -070019#endif
20
21#ifdef CONFIG_XFS_POSIX_ACL
22# define XFS_ACL_STRING "ACLs, "
Linus Torvalds1751e8a2017-11-27 13:05:09 -080023# define set_posix_acl_flag(sb) ((sb)->s_flags |= SB_POSIXACL)
Linus Torvalds1da177e2005-04-16 15:20:36 -070024#else
25# define XFS_ACL_STRING
26# define set_posix_acl_flag(sb) do { } while (0)
27#endif
28
Eric Sandeenf7d3c342008-04-17 16:50:22 +100029#define XFS_SECURITY_STRING "security attributes, "
Linus Torvalds1da177e2005-04-16 15:20:36 -070030
31#ifdef CONFIG_XFS_RT
32# define XFS_REALTIME_STRING "realtime, "
33#else
34# define XFS_REALTIME_STRING
35#endif
36
Eric Sandeen494370c2018-01-31 11:31:10 -080037#ifdef CONFIG_XFS_ONLINE_SCRUB
38# define XFS_SCRUB_STRING "scrub, "
39#else
40# define XFS_SCRUB_STRING
41#endif
42
Eric Sandeend03a2f12019-06-05 11:19:48 -070043#ifdef CONFIG_XFS_ONLINE_REPAIR
44# define XFS_REPAIR_STRING "repair, "
45#else
46# define XFS_REPAIR_STRING
47#endif
48
49#ifdef CONFIG_XFS_WARN
50# define XFS_WARN_STRING "verbose warnings, "
51#else
52# define XFS_WARN_STRING
53#endif
54
yu kuaie5e63402019-10-14 10:34:32 -070055#ifdef CONFIG_XFS_ASSERT_FATAL
56# define XFS_ASSERT_FATAL_STRING "fatal assert, "
57#else
58# define XFS_ASSERT_FATAL_STRING
59#endif
60
Linus Torvalds1da177e2005-04-16 15:20:36 -070061#ifdef DEBUG
62# define XFS_DBG_STRING "debug"
63#else
64# define XFS_DBG_STRING "no debug"
65#endif
66
Christoph Hellwig668332e2010-10-06 18:41:15 +000067#define XFS_VERSION_STRING "SGI XFS"
Linus Torvalds1da177e2005-04-16 15:20:36 -070068#define XFS_BUILD_OPTIONS XFS_ACL_STRING \
69 XFS_SECURITY_STRING \
70 XFS_REALTIME_STRING \
Eric Sandeen494370c2018-01-31 11:31:10 -080071 XFS_SCRUB_STRING \
Eric Sandeend03a2f12019-06-05 11:19:48 -070072 XFS_REPAIR_STRING \
73 XFS_WARN_STRING \
yu kuaie5e63402019-10-14 10:34:32 -070074 XFS_QUOTA_STRING \
75 XFS_ASSERT_FATAL_STRING \
Linus Torvalds1da177e2005-04-16 15:20:36 -070076 XFS_DBG_STRING /* DBG must be last */
77
Linus Torvalds1da177e2005-04-16 15:20:36 -070078struct xfs_inode;
79struct xfs_mount;
80struct xfs_buftarg;
81struct block_device;
82
Dave Chinnerddeb14f2016-09-26 08:21:44 +100083extern void xfs_quiesce_attr(struct xfs_mount *mp);
Dave Chinner9aa05002012-10-08 21:56:04 +110084extern void xfs_flush_inodes(struct xfs_mount *mp);
Christoph Hellwigf538d4d2005-11-02 10:26:59 +110085extern void xfs_blkdev_issue_flush(struct xfs_buftarg *);
Eric Sandeen12c3f052016-03-02 09:58:09 +110086extern xfs_agnumber_t xfs_set_inode_alloc(struct xfs_mount *,
87 xfs_agnumber_t agcount);
Linus Torvalds1da177e2005-04-16 15:20:36 -070088
Christoph Hellwig39655162007-10-21 16:42:17 -070089extern const struct export_operations xfs_export_operations;
Stephen Hemminger46e58762010-05-13 17:53:20 -070090extern const struct xattr_handler *xfs_xattr_handlers[];
Alexey Dobriyan0d54b212009-09-21 17:01:09 -070091extern const struct quotactl_ops xfs_quotactl_operations;
Linus Torvalds1da177e2005-04-16 15:20:36 -070092
Dave Chinner5681ca42015-02-23 21:22:31 +110093extern void xfs_reinit_percpu_counters(struct xfs_mount *mp);
94
Christoph Hellwig4560e782017-02-07 14:07:58 -080095extern struct workqueue_struct *xfs_discard_wq;
96
Christoph Hellwigb267ce92007-08-30 17:21:30 +100097#define XFS_M(sb) ((struct xfs_mount *)((sb)->s_fs_info))
Christoph Hellwigb09cc772007-08-30 17:19:57 +100098
Linus Torvalds1da177e2005-04-16 15:20:36 -070099#endif /* __XFS_SUPER_H__ */