blob: 21cb49a43d7cb0c8c9945fc35cd71dc0e3fceb6d [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);
Linus Torvalds1da177e2005-04-16 15:20:36 -070014#else
Christoph Hellwiga05931c2012-03-13 08:52:37 +000015# define xfs_qm_init() (0)
16# define xfs_qm_exit() do { } while (0)
Linus Torvalds1da177e2005-04-16 15:20:36 -070017#endif
18
19#ifdef CONFIG_XFS_POSIX_ACL
20# define XFS_ACL_STRING "ACLs, "
Linus Torvalds1751e8a2017-11-27 13:05:09 -080021# define set_posix_acl_flag(sb) ((sb)->s_flags |= SB_POSIXACL)
Linus Torvalds1da177e2005-04-16 15:20:36 -070022#else
23# define XFS_ACL_STRING
24# define set_posix_acl_flag(sb) do { } while (0)
25#endif
26
Eric Sandeenf7d3c342008-04-17 16:50:22 +100027#define XFS_SECURITY_STRING "security attributes, "
Linus Torvalds1da177e2005-04-16 15:20:36 -070028
29#ifdef CONFIG_XFS_RT
30# define XFS_REALTIME_STRING "realtime, "
31#else
32# define XFS_REALTIME_STRING
33#endif
34
Eric Sandeen494370c2018-01-31 11:31:10 -080035#ifdef CONFIG_XFS_ONLINE_SCRUB
36# define XFS_SCRUB_STRING "scrub, "
37#else
38# define XFS_SCRUB_STRING
39#endif
40
Linus Torvalds1da177e2005-04-16 15:20:36 -070041#ifdef DEBUG
42# define XFS_DBG_STRING "debug"
43#else
44# define XFS_DBG_STRING "no debug"
45#endif
46
Christoph Hellwig668332e2010-10-06 18:41:15 +000047#define XFS_VERSION_STRING "SGI XFS"
Linus Torvalds1da177e2005-04-16 15:20:36 -070048#define XFS_BUILD_OPTIONS XFS_ACL_STRING \
49 XFS_SECURITY_STRING \
50 XFS_REALTIME_STRING \
Eric Sandeen494370c2018-01-31 11:31:10 -080051 XFS_SCRUB_STRING \
Linus Torvalds1da177e2005-04-16 15:20:36 -070052 XFS_DBG_STRING /* DBG must be last */
53
Linus Torvalds1da177e2005-04-16 15:20:36 -070054struct xfs_inode;
55struct xfs_mount;
56struct xfs_buftarg;
57struct block_device;
58
Dave Chinnerddeb14f2016-09-26 08:21:44 +100059extern void xfs_quiesce_attr(struct xfs_mount *mp);
Dave Chinner9aa05002012-10-08 21:56:04 +110060extern void xfs_flush_inodes(struct xfs_mount *mp);
Christoph Hellwigf538d4d2005-11-02 10:26:59 +110061extern void xfs_blkdev_issue_flush(struct xfs_buftarg *);
Eric Sandeen12c3f052016-03-02 09:58:09 +110062extern xfs_agnumber_t xfs_set_inode_alloc(struct xfs_mount *,
63 xfs_agnumber_t agcount);
Linus Torvalds1da177e2005-04-16 15:20:36 -070064
Christoph Hellwig39655162007-10-21 16:42:17 -070065extern const struct export_operations xfs_export_operations;
Stephen Hemminger46e58762010-05-13 17:53:20 -070066extern const struct xattr_handler *xfs_xattr_handlers[];
Alexey Dobriyan0d54b212009-09-21 17:01:09 -070067extern const struct quotactl_ops xfs_quotactl_operations;
Linus Torvalds1da177e2005-04-16 15:20:36 -070068
Dave Chinner5681ca42015-02-23 21:22:31 +110069extern void xfs_reinit_percpu_counters(struct xfs_mount *mp);
70
Christoph Hellwig4560e782017-02-07 14:07:58 -080071extern struct workqueue_struct *xfs_discard_wq;
72
Christoph Hellwigb267ce92007-08-30 17:21:30 +100073#define XFS_M(sb) ((struct xfs_mount *)((sb)->s_fs_info))
Christoph Hellwigb09cc772007-08-30 17:19:57 +100074
Linus Torvalds1da177e2005-04-16 15:20:36 -070075#endif /* __XFS_SUPER_H__ */