xfs_sysctl.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /*
  2. * Copyright (c) 2001-2005 Silicon Graphics, Inc.
  3. * All Rights Reserved.
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License as
  7. * published by the Free Software Foundation.
  8. *
  9. * 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.
  13. *
  14. * 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
  17. */
  18. #ifndef __XFS_SYSCTL_H__
  19. #define __XFS_SYSCTL_H__
  20. #include <linux/sysctl.h>
  21. /*
  22. * Tunable xfs parameters
  23. */
  24. typedef struct xfs_sysctl_val {
  25. int min;
  26. int val;
  27. int max;
  28. } xfs_sysctl_val_t;
  29. typedef struct xfs_param {
  30. xfs_sysctl_val_t restrict_chown;/* Root/non-root can give away files.*/
  31. xfs_sysctl_val_t sgid_inherit; /* Inherit S_ISGID if process' GID is
  32. * not a member of parent dir GID. */
  33. xfs_sysctl_val_t symlink_mode; /* Link creat mode affected by umask */
  34. xfs_sysctl_val_t panic_mask; /* bitmask to cause panic on errors. */
  35. xfs_sysctl_val_t error_level; /* Degree of reporting for problems */
  36. xfs_sysctl_val_t syncd_timer; /* Interval between xfssyncd wakeups */
  37. xfs_sysctl_val_t stats_clear; /* Reset all XFS statistics to zero. */
  38. xfs_sysctl_val_t inherit_sync; /* Inherit the "sync" inode flag. */
  39. xfs_sysctl_val_t inherit_nodump;/* Inherit the "nodump" inode flag. */
  40. xfs_sysctl_val_t inherit_noatim;/* Inherit the "noatime" inode flag. */
  41. xfs_sysctl_val_t xfs_buf_timer; /* Interval between xfsbufd wakeups. */
  42. xfs_sysctl_val_t xfs_buf_age; /* Metadata buffer age before flush. */
  43. xfs_sysctl_val_t inherit_nosym; /* Inherit the "nosymlinks" flag. */
  44. xfs_sysctl_val_t rotorstep; /* inode32 AG rotoring control knob */
  45. xfs_sysctl_val_t inherit_nodfrg;/* Inherit the "nodefrag" inode flag. */
  46. } xfs_param_t;
  47. /*
  48. * xfs_error_level:
  49. *
  50. * How much error reporting will be done when internal problems are
  51. * encountered. These problems normally return an EFSCORRUPTED to their
  52. * caller, with no other information reported.
  53. *
  54. * 0 No error reports
  55. * 1 Report EFSCORRUPTED errors that will cause a filesystem shutdown
  56. * 5 Report all EFSCORRUPTED errors (all of the above errors, plus any
  57. * additional errors that are known to not cause shutdowns)
  58. *
  59. * xfs_panic_mask bit 0x8 turns the error reports into panics
  60. */
  61. enum {
  62. /* XFS_REFCACHE_SIZE = 1 */
  63. /* XFS_REFCACHE_PURGE = 2 */
  64. XFS_RESTRICT_CHOWN = 3,
  65. XFS_SGID_INHERIT = 4,
  66. XFS_SYMLINK_MODE = 5,
  67. XFS_PANIC_MASK = 6,
  68. XFS_ERRLEVEL = 7,
  69. XFS_SYNCD_TIMER = 8,
  70. /* XFS_PROBE_DMAPI = 9 */
  71. /* XFS_PROBE_IOOPS = 10 */
  72. /* XFS_PROBE_QUOTA = 11 */
  73. XFS_STATS_CLEAR = 12,
  74. XFS_INHERIT_SYNC = 13,
  75. XFS_INHERIT_NODUMP = 14,
  76. XFS_INHERIT_NOATIME = 15,
  77. XFS_BUF_TIMER = 16,
  78. XFS_BUF_AGE = 17,
  79. /* XFS_IO_BYPASS = 18 */
  80. XFS_INHERIT_NOSYM = 19,
  81. XFS_ROTORSTEP = 20,
  82. XFS_INHERIT_NODFRG = 21,
  83. };
  84. extern xfs_param_t xfs_params;
  85. #ifdef CONFIG_SYSCTL
  86. extern void xfs_sysctl_register(void);
  87. extern void xfs_sysctl_unregister(void);
  88. #else
  89. # define xfs_sysctl_register() do { } while (0)
  90. # define xfs_sysctl_unregister() do { } while (0)
  91. #endif /* CONFIG_SYSCTL */
  92. #endif /* __XFS_SYSCTL_H__ */