xfs_sysctl.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. /*
  2. * Copyright (c) 2001-2004 Silicon Graphics, Inc. All Rights Reserved.
  3. *
  4. * This program is free software; you can redistribute it and/or modify it
  5. * under the terms of version 2 of the GNU General Public License as
  6. * published by the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope that it would be useful, but
  9. * WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. *
  12. * Further, this software is distributed without any warranty that it is
  13. * free of the rightful claim of any third person regarding infringement
  14. * or the like. Any license provided herein, whether implied or
  15. * otherwise, applies only to this software file. Patent licenses, if
  16. * any, provided herein do not apply to combinations of this program with
  17. * other software, or any other product whatsoever.
  18. *
  19. * You should have received a copy of the GNU General Public License along
  20. * with this program; if not, write the Free Software Foundation, Inc., 59
  21. * Temple Place - Suite 330, Boston MA 02111-1307, USA.
  22. *
  23. * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
  24. * Mountain View, CA 94043, or:
  25. *
  26. * http://www.sgi.com
  27. *
  28. * For further information regarding this notice, see:
  29. *
  30. * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
  31. */
  32. #ifndef __XFS_SYSCTL_H__
  33. #define __XFS_SYSCTL_H__
  34. #include <linux/sysctl.h>
  35. /*
  36. * Tunable xfs parameters
  37. */
  38. typedef struct xfs_sysctl_val {
  39. int min;
  40. int val;
  41. int max;
  42. } xfs_sysctl_val_t;
  43. typedef struct xfs_param {
  44. xfs_sysctl_val_t restrict_chown;/* Root/non-root can give away files.*/
  45. xfs_sysctl_val_t sgid_inherit; /* Inherit S_ISGID if process' GID is
  46. * not a member of parent dir GID. */
  47. xfs_sysctl_val_t symlink_mode; /* Link creat mode affected by umask */
  48. xfs_sysctl_val_t panic_mask; /* bitmask to cause panic on errors. */
  49. xfs_sysctl_val_t error_level; /* Degree of reporting for problems */
  50. xfs_sysctl_val_t syncd_timer; /* Interval between xfssyncd wakeups */
  51. xfs_sysctl_val_t stats_clear; /* Reset all XFS statistics to zero. */
  52. xfs_sysctl_val_t inherit_sync; /* Inherit the "sync" inode flag. */
  53. xfs_sysctl_val_t inherit_nodump;/* Inherit the "nodump" inode flag. */
  54. xfs_sysctl_val_t inherit_noatim;/* Inherit the "noatime" inode flag. */
  55. xfs_sysctl_val_t xfs_buf_timer; /* Interval between xfsbufd wakeups. */
  56. xfs_sysctl_val_t xfs_buf_age; /* Metadata buffer age before flush. */
  57. xfs_sysctl_val_t inherit_nosym; /* Inherit the "nosymlinks" flag. */
  58. xfs_sysctl_val_t rotorstep; /* inode32 AG rotoring control knob */
  59. } xfs_param_t;
  60. /*
  61. * xfs_error_level:
  62. *
  63. * How much error reporting will be done when internal problems are
  64. * encountered. These problems normally return an EFSCORRUPTED to their
  65. * caller, with no other information reported.
  66. *
  67. * 0 No error reports
  68. * 1 Report EFSCORRUPTED errors that will cause a filesystem shutdown
  69. * 5 Report all EFSCORRUPTED errors (all of the above errors, plus any
  70. * additional errors that are known to not cause shutdowns)
  71. *
  72. * xfs_panic_mask bit 0x8 turns the error reports into panics
  73. */
  74. enum {
  75. /* XFS_REFCACHE_SIZE = 1 */
  76. /* XFS_REFCACHE_PURGE = 2 */
  77. XFS_RESTRICT_CHOWN = 3,
  78. XFS_SGID_INHERIT = 4,
  79. XFS_SYMLINK_MODE = 5,
  80. XFS_PANIC_MASK = 6,
  81. XFS_ERRLEVEL = 7,
  82. XFS_SYNCD_TIMER = 8,
  83. /* XFS_PROBE_DMAPI = 9 */
  84. /* XFS_PROBE_IOOPS = 10 */
  85. /* XFS_PROBE_QUOTA = 11 */
  86. XFS_STATS_CLEAR = 12,
  87. XFS_INHERIT_SYNC = 13,
  88. XFS_INHERIT_NODUMP = 14,
  89. XFS_INHERIT_NOATIME = 15,
  90. XFS_BUF_TIMER = 16,
  91. XFS_BUF_AGE = 17,
  92. /* XFS_IO_BYPASS = 18 */
  93. XFS_INHERIT_NOSYM = 19,
  94. XFS_ROTORSTEP = 20,
  95. };
  96. extern xfs_param_t xfs_params;
  97. #ifdef CONFIG_SYSCTL
  98. extern void xfs_sysctl_register(void);
  99. extern void xfs_sysctl_unregister(void);
  100. #else
  101. # define xfs_sysctl_register() do { } while (0)
  102. # define xfs_sysctl_unregister() do { } while (0)
  103. #endif /* CONFIG_SYSCTL */
  104. #endif /* __XFS_SYSCTL_H__ */