xfs_super.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Copyright (c) 2000-2005 Silicon Graphics, Inc.
  4. * All Rights Reserved.
  5. */
  6. #ifndef __XFS_SUPER_H__
  7. #define __XFS_SUPER_H__
  8. #include <linux/exportfs.h>
  9. #ifdef CONFIG_XFS_QUOTA
  10. extern int xfs_qm_init(void);
  11. extern void xfs_qm_exit(void);
  12. # define XFS_QUOTA_STRING "quota, "
  13. #else
  14. # define xfs_qm_init() (0)
  15. # define xfs_qm_exit() do { } while (0)
  16. # define XFS_QUOTA_STRING
  17. #endif
  18. #ifdef CONFIG_XFS_POSIX_ACL
  19. # define XFS_ACL_STRING "ACLs, "
  20. # define set_posix_acl_flag(sb) ((sb)->s_flags |= SB_POSIXACL)
  21. #else
  22. # define XFS_ACL_STRING
  23. # define set_posix_acl_flag(sb) do { } while (0)
  24. #endif
  25. #define XFS_SECURITY_STRING "security attributes, "
  26. #ifdef CONFIG_XFS_RT
  27. # define XFS_REALTIME_STRING "realtime, "
  28. #else
  29. # define XFS_REALTIME_STRING
  30. #endif
  31. #ifdef CONFIG_XFS_ONLINE_SCRUB
  32. # define XFS_SCRUB_STRING "scrub, "
  33. #else
  34. # define XFS_SCRUB_STRING
  35. #endif
  36. #ifdef CONFIG_XFS_ONLINE_REPAIR
  37. # define XFS_REPAIR_STRING "repair, "
  38. #else
  39. # define XFS_REPAIR_STRING
  40. #endif
  41. #ifdef CONFIG_XFS_WARN
  42. # define XFS_WARN_STRING "verbose warnings, "
  43. #else
  44. # define XFS_WARN_STRING
  45. #endif
  46. #ifdef CONFIG_XFS_ASSERT_FATAL
  47. # define XFS_ASSERT_FATAL_STRING "fatal assert, "
  48. #else
  49. # define XFS_ASSERT_FATAL_STRING
  50. #endif
  51. #ifdef DEBUG
  52. # define XFS_DBG_STRING "debug"
  53. #else
  54. # define XFS_DBG_STRING "no debug"
  55. #endif
  56. #define XFS_VERSION_STRING "SGI XFS"
  57. #define XFS_BUILD_OPTIONS XFS_ACL_STRING \
  58. XFS_SECURITY_STRING \
  59. XFS_REALTIME_STRING \
  60. XFS_SCRUB_STRING \
  61. XFS_REPAIR_STRING \
  62. XFS_WARN_STRING \
  63. XFS_QUOTA_STRING \
  64. XFS_ASSERT_FATAL_STRING \
  65. XFS_DBG_STRING /* DBG must be last */
  66. struct xfs_inode;
  67. struct xfs_mount;
  68. struct xfs_buftarg;
  69. struct block_device;
  70. extern void xfs_quiesce_attr(struct xfs_mount *mp);
  71. extern void xfs_flush_inodes(struct xfs_mount *mp);
  72. extern void xfs_blkdev_issue_flush(struct xfs_buftarg *);
  73. extern xfs_agnumber_t xfs_set_inode_alloc(struct xfs_mount *,
  74. xfs_agnumber_t agcount);
  75. extern const struct export_operations xfs_export_operations;
  76. extern const struct xattr_handler *xfs_xattr_handlers[];
  77. extern const struct quotactl_ops xfs_quotactl_operations;
  78. extern void xfs_reinit_percpu_counters(struct xfs_mount *mp);
  79. extern struct workqueue_struct *xfs_discard_wq;
  80. #define XFS_M(sb) ((struct xfs_mount *)((sb)->s_fs_info))
  81. #endif /* __XFS_SUPER_H__ */