Linux 2.6.35-rc2
[linux/fpc-iii.git] / fs / xfs / linux-2.6 / xfs_sysctl.h
blobb9937d450f8e6d72e01e186c09f446c791028ef2
1 /*
2 * Copyright (c) 2001-2005 Silicon Graphics, Inc.
3 * All Rights Reserved.
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.
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.
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
18 #ifndef __XFS_SYSCTL_H__
19 #define __XFS_SYSCTL_H__
21 #include <linux/sysctl.h>
24 * Tunable xfs parameters
27 typedef struct xfs_sysctl_val {
28 int min;
29 int val;
30 int max;
31 } xfs_sysctl_val_t;
33 typedef struct xfs_param {
34 xfs_sysctl_val_t sgid_inherit; /* Inherit S_ISGID if process' GID is
35 * not a member of parent dir GID. */
36 xfs_sysctl_val_t symlink_mode; /* Link creat mode affected by umask */
37 xfs_sysctl_val_t panic_mask; /* bitmask to cause panic on errors. */
38 xfs_sysctl_val_t error_level; /* Degree of reporting for problems */
39 xfs_sysctl_val_t syncd_timer; /* Interval between xfssyncd wakeups */
40 xfs_sysctl_val_t stats_clear; /* Reset all XFS statistics to zero. */
41 xfs_sysctl_val_t inherit_sync; /* Inherit the "sync" inode flag. */
42 xfs_sysctl_val_t inherit_nodump;/* Inherit the "nodump" inode flag. */
43 xfs_sysctl_val_t inherit_noatim;/* Inherit the "noatime" inode flag. */
44 xfs_sysctl_val_t xfs_buf_timer; /* Interval between xfsbufd wakeups. */
45 xfs_sysctl_val_t xfs_buf_age; /* Metadata buffer age before flush. */
46 xfs_sysctl_val_t inherit_nosym; /* Inherit the "nosymlinks" flag. */
47 xfs_sysctl_val_t rotorstep; /* inode32 AG rotoring control knob */
48 xfs_sysctl_val_t inherit_nodfrg;/* Inherit the "nodefrag" inode flag. */
49 xfs_sysctl_val_t fstrm_timer; /* Filestream dir-AG assoc'n timeout. */
50 } xfs_param_t;
53 * xfs_error_level:
55 * How much error reporting will be done when internal problems are
56 * encountered. These problems normally return an EFSCORRUPTED to their
57 * caller, with no other information reported.
59 * 0 No error reports
60 * 1 Report EFSCORRUPTED errors that will cause a filesystem shutdown
61 * 5 Report all EFSCORRUPTED errors (all of the above errors, plus any
62 * additional errors that are known to not cause shutdowns)
64 * xfs_panic_mask bit 0x8 turns the error reports into panics
67 enum {
68 /* XFS_REFCACHE_SIZE = 1 */
69 /* XFS_REFCACHE_PURGE = 2 */
70 /* XFS_RESTRICT_CHOWN = 3 */
71 XFS_SGID_INHERIT = 4,
72 XFS_SYMLINK_MODE = 5,
73 XFS_PANIC_MASK = 6,
74 XFS_ERRLEVEL = 7,
75 XFS_SYNCD_TIMER = 8,
76 /* XFS_PROBE_DMAPI = 9 */
77 /* XFS_PROBE_IOOPS = 10 */
78 /* XFS_PROBE_QUOTA = 11 */
79 XFS_STATS_CLEAR = 12,
80 XFS_INHERIT_SYNC = 13,
81 XFS_INHERIT_NODUMP = 14,
82 XFS_INHERIT_NOATIME = 15,
83 XFS_BUF_TIMER = 16,
84 XFS_BUF_AGE = 17,
85 /* XFS_IO_BYPASS = 18 */
86 XFS_INHERIT_NOSYM = 19,
87 XFS_ROTORSTEP = 20,
88 XFS_INHERIT_NODFRG = 21,
89 XFS_FILESTREAM_TIMER = 22,
92 extern xfs_param_t xfs_params;
94 #ifdef CONFIG_SYSCTL
95 extern int xfs_sysctl_register(void);
96 extern void xfs_sysctl_unregister(void);
97 #else
98 # define xfs_sysctl_register() (0)
99 # define xfs_sysctl_unregister() do { } while (0)
100 #endif /* CONFIG_SYSCTL */
102 #endif /* __XFS_SYSCTL_H__ */