1c59d87c4SChristoph Hellwig /* 2c59d87c4SChristoph Hellwig * Copyright (c) 2001-2005 Silicon Graphics, Inc. 3c59d87c4SChristoph Hellwig * All Rights Reserved. 4c59d87c4SChristoph Hellwig * 5c59d87c4SChristoph Hellwig * This program is free software; you can redistribute it and/or 6c59d87c4SChristoph Hellwig * modify it under the terms of the GNU General Public License as 7c59d87c4SChristoph Hellwig * published by the Free Software Foundation. 8c59d87c4SChristoph Hellwig * 9c59d87c4SChristoph Hellwig * This program is distributed in the hope that it would be useful, 10c59d87c4SChristoph Hellwig * but WITHOUT ANY WARRANTY; without even the implied warranty of 11c59d87c4SChristoph Hellwig * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12c59d87c4SChristoph Hellwig * GNU General Public License for more details. 13c59d87c4SChristoph Hellwig * 14c59d87c4SChristoph Hellwig * You should have received a copy of the GNU General Public License 15c59d87c4SChristoph Hellwig * along with this program; if not, write the Free Software Foundation, 16c59d87c4SChristoph Hellwig * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17c59d87c4SChristoph Hellwig */ 18c59d87c4SChristoph Hellwig #ifndef __XFS_SYSCTL_H__ 19c59d87c4SChristoph Hellwig #define __XFS_SYSCTL_H__ 20c59d87c4SChristoph Hellwig 21c59d87c4SChristoph Hellwig #include <linux/sysctl.h> 22c59d87c4SChristoph Hellwig 23c59d87c4SChristoph Hellwig /* 24c59d87c4SChristoph Hellwig * Tunable xfs parameters 25c59d87c4SChristoph Hellwig */ 26c59d87c4SChristoph Hellwig 27c59d87c4SChristoph Hellwig typedef struct xfs_sysctl_val { 28c59d87c4SChristoph Hellwig int min; 29c59d87c4SChristoph Hellwig int val; 30c59d87c4SChristoph Hellwig int max; 31c59d87c4SChristoph Hellwig } xfs_sysctl_val_t; 32c59d87c4SChristoph Hellwig 33c59d87c4SChristoph Hellwig typedef struct xfs_param { 34c59d87c4SChristoph Hellwig xfs_sysctl_val_t sgid_inherit; /* Inherit S_ISGID if process' GID is 35c59d87c4SChristoph Hellwig * not a member of parent dir GID. */ 36c59d87c4SChristoph Hellwig xfs_sysctl_val_t symlink_mode; /* Link creat mode affected by umask */ 37c59d87c4SChristoph Hellwig xfs_sysctl_val_t panic_mask; /* bitmask to cause panic on errors. */ 38c59d87c4SChristoph Hellwig xfs_sysctl_val_t error_level; /* Degree of reporting for problems */ 39c59d87c4SChristoph Hellwig xfs_sysctl_val_t syncd_timer; /* Interval between xfssyncd wakeups */ 40c59d87c4SChristoph Hellwig xfs_sysctl_val_t stats_clear; /* Reset all XFS statistics to zero. */ 41c59d87c4SChristoph Hellwig xfs_sysctl_val_t inherit_sync; /* Inherit the "sync" inode flag. */ 42c59d87c4SChristoph Hellwig xfs_sysctl_val_t inherit_nodump;/* Inherit the "nodump" inode flag. */ 43c59d87c4SChristoph Hellwig xfs_sysctl_val_t inherit_noatim;/* Inherit the "noatime" inode flag. */ 44c59d87c4SChristoph Hellwig xfs_sysctl_val_t xfs_buf_timer; /* Interval between xfsbufd wakeups. */ 45c59d87c4SChristoph Hellwig xfs_sysctl_val_t xfs_buf_age; /* Metadata buffer age before flush. */ 46c59d87c4SChristoph Hellwig xfs_sysctl_val_t inherit_nosym; /* Inherit the "nosymlinks" flag. */ 47c59d87c4SChristoph Hellwig xfs_sysctl_val_t rotorstep; /* inode32 AG rotoring control knob */ 48c59d87c4SChristoph Hellwig xfs_sysctl_val_t inherit_nodfrg;/* Inherit the "nodefrag" inode flag. */ 49c59d87c4SChristoph Hellwig xfs_sysctl_val_t fstrm_timer; /* Filestream dir-AG assoc'n timeout. */ 50579b62faSBrian Foster xfs_sysctl_val_t eofb_timer; /* Interval between eofb scan wakeups */ 51c59d87c4SChristoph Hellwig } xfs_param_t; 52c59d87c4SChristoph Hellwig 53c59d87c4SChristoph Hellwig /* 54c59d87c4SChristoph Hellwig * xfs_error_level: 55c59d87c4SChristoph Hellwig * 56c59d87c4SChristoph Hellwig * How much error reporting will be done when internal problems are 57c59d87c4SChristoph Hellwig * encountered. These problems normally return an EFSCORRUPTED to their 58c59d87c4SChristoph Hellwig * caller, with no other information reported. 59c59d87c4SChristoph Hellwig * 60c59d87c4SChristoph Hellwig * 0 No error reports 61c59d87c4SChristoph Hellwig * 1 Report EFSCORRUPTED errors that will cause a filesystem shutdown 62c59d87c4SChristoph Hellwig * 5 Report all EFSCORRUPTED errors (all of the above errors, plus any 63c59d87c4SChristoph Hellwig * additional errors that are known to not cause shutdowns) 64c59d87c4SChristoph Hellwig * 65c59d87c4SChristoph Hellwig * xfs_panic_mask bit 0x8 turns the error reports into panics 66c59d87c4SChristoph Hellwig */ 67c59d87c4SChristoph Hellwig 68c59d87c4SChristoph Hellwig enum { 69c59d87c4SChristoph Hellwig /* XFS_REFCACHE_SIZE = 1 */ 70c59d87c4SChristoph Hellwig /* XFS_REFCACHE_PURGE = 2 */ 71c59d87c4SChristoph Hellwig /* XFS_RESTRICT_CHOWN = 3 */ 72c59d87c4SChristoph Hellwig XFS_SGID_INHERIT = 4, 73c59d87c4SChristoph Hellwig XFS_SYMLINK_MODE = 5, 74c59d87c4SChristoph Hellwig XFS_PANIC_MASK = 6, 75c59d87c4SChristoph Hellwig XFS_ERRLEVEL = 7, 76c59d87c4SChristoph Hellwig XFS_SYNCD_TIMER = 8, 77c59d87c4SChristoph Hellwig /* XFS_PROBE_DMAPI = 9 */ 78c59d87c4SChristoph Hellwig /* XFS_PROBE_IOOPS = 10 */ 79c59d87c4SChristoph Hellwig /* XFS_PROBE_QUOTA = 11 */ 80c59d87c4SChristoph Hellwig XFS_STATS_CLEAR = 12, 81c59d87c4SChristoph Hellwig XFS_INHERIT_SYNC = 13, 82c59d87c4SChristoph Hellwig XFS_INHERIT_NODUMP = 14, 83c59d87c4SChristoph Hellwig XFS_INHERIT_NOATIME = 15, 84c59d87c4SChristoph Hellwig XFS_BUF_TIMER = 16, 85c59d87c4SChristoph Hellwig XFS_BUF_AGE = 17, 86c59d87c4SChristoph Hellwig /* XFS_IO_BYPASS = 18 */ 87c59d87c4SChristoph Hellwig XFS_INHERIT_NOSYM = 19, 88c59d87c4SChristoph Hellwig XFS_ROTORSTEP = 20, 89c59d87c4SChristoph Hellwig XFS_INHERIT_NODFRG = 21, 90c59d87c4SChristoph Hellwig XFS_FILESTREAM_TIMER = 22, 91c59d87c4SChristoph Hellwig }; 92c59d87c4SChristoph Hellwig 93c59d87c4SChristoph Hellwig extern xfs_param_t xfs_params; 94c59d87c4SChristoph Hellwig 95*2e227178SBrian Foster struct xfs_globals { 96*2e227178SBrian Foster int log_recovery_delay; /* log recovery delay (secs) */ 97*2e227178SBrian Foster }; 98*2e227178SBrian Foster extern struct xfs_globals xfs_globals; 99*2e227178SBrian Foster 100c59d87c4SChristoph Hellwig #ifdef CONFIG_SYSCTL 101c59d87c4SChristoph Hellwig extern int xfs_sysctl_register(void); 102c59d87c4SChristoph Hellwig extern void xfs_sysctl_unregister(void); 103c59d87c4SChristoph Hellwig #else 104c59d87c4SChristoph Hellwig # define xfs_sysctl_register() (0) 105c59d87c4SChristoph Hellwig # define xfs_sysctl_unregister() do { } while (0) 106c59d87c4SChristoph Hellwig #endif /* CONFIG_SYSCTL */ 107c59d87c4SChristoph Hellwig 108c59d87c4SChristoph Hellwig #endif /* __XFS_SYSCTL_H__ */ 109