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