Merge with Linux 2.5.74.
[linux-2.6/linux-mips.git] / fs / xfs / linux / xfs_sysctl.h
blob1fa2bd0ff38c0869bfd17b84d7c24b2583e5a7eb
1 /*
2 * Copyright (c) 2001-2002 Silicon Graphics, Inc. All Rights Reserved.
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.
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.
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.
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.
23 * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
24 * Mountain View, CA 94043, or:
26 * http://www.sgi.com
28 * For further information regarding this notice, see:
30 * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
33 #ifndef __XFS_SYSCTL_H__
34 #define __XFS_SYSCTL_H__
36 #include <linux/sysctl.h>
39 * Tunable xfs parameters
42 #define XFS_PARAM (sizeof(struct xfs_param) / sizeof(ulong))
44 typedef struct xfs_param {
45 ulong restrict_chown; /* Root/non-root can give away files. */
46 ulong sgid_inherit; /* Inherit ISGID bit if process' GID is */
47 /* not a member of the parent dir GID. */
48 ulong symlink_mode; /* Symlink creat mode affected by umask. */
49 ulong panic_mask; /* bitmask to specify panics on errors. */
50 ulong error_level; /* Degree of reporting for internal probs*/
51 ulong sync_interval; /* time between sync calls */
52 ulong stats_clear; /* Reset all XFS statistics to zero. */
53 } xfs_param_t;
56 * xfs_error_level:
58 * How much error reporting will be done when internal problems are
59 * encountered. These problems normally return an EFSCORRUPTED to their
60 * caller, with no other information reported.
62 * 0 No error reports
63 * 1 Report EFSCORRUPTED errors that will cause a filesystem shutdown
64 * 5 Report all EFSCORRUPTED errors (all of the above errors, plus any
65 * additional errors that are known to not cause shutdowns)
67 * xfs_panic_mask bit 0x8 turns the error reports into panics
70 enum {
71 XFS_RESTRICT_CHOWN = 1,
72 XFS_SGID_INHERIT = 2,
73 XFS_SYMLINK_MODE = 3,
74 XFS_PANIC_MASK = 4,
75 XFS_ERRLEVEL = 5,
76 XFS_SYNC_INTERVAL = 6,
77 XFS_STATS_CLEAR = 7,
80 extern xfs_param_t xfs_params;
82 #ifdef CONFIG_SYSCTL
83 extern void xfs_sysctl_register(void);
84 extern void xfs_sysctl_unregister(void);
85 #else
86 # define xfs_sysctl_register() do { } while (0)
87 # define xfs_sysctl_unregister() do { } while (0)
88 #endif /* CONFIG_SYSCTL */
90 #endif /* __XFS_SYSCTL_H__ */