Linux Audio

Check our new training course

Loading...
v3.15
 
  1/*
  2 * Copyright (c) 2001-2005 Silicon Graphics, Inc.
  3 * All Rights Reserved.
  4 *
  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.
  8 *
  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.
 13 *
 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
 17 */
 18#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 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_sysctl_val_t eofb_timer;	/* Interval between eofb scan wakeups */
 51} xfs_param_t;
 52
 53/*
 54 * xfs_error_level:
 55 *
 56 * How much error reporting will be done when internal problems are
 57 * encountered.  These problems normally return an EFSCORRUPTED to their
 58 * caller, with no other information reported.
 59 *
 60 * 0	No error reports
 61 * 1	Report EFSCORRUPTED errors that will cause a filesystem shutdown
 62 * 5	Report all EFSCORRUPTED errors (all of the above errors, plus any
 63 *	additional errors that are known to not cause shutdowns)
 64 *
 65 * xfs_panic_mask bit 0x8 turns the error reports into panics
 66 */
 67
 68enum {
 69	/* XFS_REFCACHE_SIZE = 1 */
 70	/* XFS_REFCACHE_PURGE = 2 */
 71	/* XFS_RESTRICT_CHOWN = 3 */
 72	XFS_SGID_INHERIT = 4,
 73	XFS_SYMLINK_MODE = 5,
 74	XFS_PANIC_MASK = 6,
 75	XFS_ERRLEVEL = 7,
 76	XFS_SYNCD_TIMER = 8,
 77	/* XFS_PROBE_DMAPI = 9 */
 78	/* XFS_PROBE_IOOPS = 10 */
 79	/* XFS_PROBE_QUOTA = 11 */
 80	XFS_STATS_CLEAR = 12,
 81	XFS_INHERIT_SYNC = 13,
 82	XFS_INHERIT_NODUMP = 14,
 83	XFS_INHERIT_NOATIME = 15,
 84	XFS_BUF_TIMER = 16,
 85	XFS_BUF_AGE = 17,
 86	/* XFS_IO_BYPASS = 18 */
 87	XFS_INHERIT_NOSYM = 19,
 88	XFS_ROTORSTEP = 20,
 89	XFS_INHERIT_NODFRG = 21,
 90	XFS_FILESTREAM_TIMER = 22,
 91};
 92
 93extern xfs_param_t	xfs_params;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 94
 95#ifdef CONFIG_SYSCTL
 96extern int xfs_sysctl_register(void);
 97extern void xfs_sysctl_unregister(void);
 98#else
 99# define xfs_sysctl_register()		(0)
100# define xfs_sysctl_unregister()	do { } while (0)
101#endif /* CONFIG_SYSCTL */
102
103#endif /* __XFS_SYSCTL_H__ */
v6.13.7
  1// SPDX-License-Identifier: GPL-2.0
  2/*
  3 * Copyright (c) 2001-2005 Silicon Graphics, Inc.
  4 * All Rights Reserved.
 
 
 
 
 
 
 
 
 
 
 
 
 
  5 */
  6#ifndef __XFS_SYSCTL_H__
  7#define __XFS_SYSCTL_H__
  8
  9#include <linux/sysctl.h>
 10
 11/*
 12 * Tunable xfs parameters
 13 */
 14
 15typedef struct xfs_sysctl_val {
 16	int min;
 17	int val;
 18	int max;
 19} xfs_sysctl_val_t;
 20
 21typedef struct xfs_param {
 22	xfs_sysctl_val_t sgid_inherit;	/* Inherit S_ISGID if process' GID is
 23					 * not a member of parent dir GID. */
 24	xfs_sysctl_val_t symlink_mode;	/* Link creat mode affected by umask */
 25	xfs_sysctl_val_t panic_mask;	/* bitmask to cause panic on errors. */
 26	xfs_sysctl_val_t error_level;	/* Degree of reporting for problems  */
 27	xfs_sysctl_val_t syncd_timer;	/* Interval between xfssyncd wakeups */
 28	xfs_sysctl_val_t stats_clear;	/* Reset all XFS statistics to zero. */
 29	xfs_sysctl_val_t inherit_sync;	/* Inherit the "sync" inode flag. */
 30	xfs_sysctl_val_t inherit_nodump;/* Inherit the "nodump" inode flag. */
 31	xfs_sysctl_val_t inherit_noatim;/* Inherit the "noatime" inode flag. */
 32	xfs_sysctl_val_t xfs_buf_timer;	/* Interval between xfsbufd wakeups. */
 33	xfs_sysctl_val_t xfs_buf_age;	/* Metadata buffer age before flush. */
 34	xfs_sysctl_val_t inherit_nosym;	/* Inherit the "nosymlinks" flag. */
 35	xfs_sysctl_val_t rotorstep;	/* inode32 AG rotoring control knob */
 36	xfs_sysctl_val_t inherit_nodfrg;/* Inherit the "nodefrag" inode flag. */
 37	xfs_sysctl_val_t fstrm_timer;	/* Filestream dir-AG assoc'n timeout. */
 38	xfs_sysctl_val_t blockgc_timer;	/* Interval between blockgc scans */
 39} xfs_param_t;
 40
 41/*
 42 * xfs_error_level:
 43 *
 44 * How much error reporting will be done when internal problems are
 45 * encountered.  These problems normally return an EFSCORRUPTED to their
 46 * caller, with no other information reported.
 47 *
 48 * 0	No error reports
 49 * 1	Report EFSCORRUPTED errors that will cause a filesystem shutdown
 50 * 5	Report all EFSCORRUPTED errors (all of the above errors, plus any
 51 *	additional errors that are known to not cause shutdowns)
 52 *
 53 * xfs_panic_mask bit 0x8 turns the error reports into panics
 54 */
 55
 56enum {
 57	/* XFS_REFCACHE_SIZE = 1 */
 58	/* XFS_REFCACHE_PURGE = 2 */
 59	/* XFS_RESTRICT_CHOWN = 3 */
 60	XFS_SGID_INHERIT = 4,
 61	XFS_SYMLINK_MODE = 5,
 62	XFS_PANIC_MASK = 6,
 63	XFS_ERRLEVEL = 7,
 64	XFS_SYNCD_TIMER = 8,
 65	/* XFS_PROBE_DMAPI = 9 */
 66	/* XFS_PROBE_IOOPS = 10 */
 67	/* XFS_PROBE_QUOTA = 11 */
 68	XFS_STATS_CLEAR = 12,
 69	XFS_INHERIT_SYNC = 13,
 70	XFS_INHERIT_NODUMP = 14,
 71	XFS_INHERIT_NOATIME = 15,
 72	XFS_BUF_TIMER = 16,
 73	XFS_BUF_AGE = 17,
 74	/* XFS_IO_BYPASS = 18 */
 75	XFS_INHERIT_NOSYM = 19,
 76	XFS_ROTORSTEP = 20,
 77	XFS_INHERIT_NODFRG = 21,
 78	XFS_FILESTREAM_TIMER = 22,
 79};
 80
 81extern xfs_param_t	xfs_params;
 82
 83struct xfs_globals {
 84#ifdef DEBUG
 85	int	pwork_threads;		/* parallel workqueue threads */
 86	bool	larp;			/* log attribute replay */
 87#endif
 88	int	bload_leaf_slack;	/* btree bulk load leaf slack */
 89	int	bload_node_slack;	/* btree bulk load node slack */
 90	int	log_recovery_delay;	/* log recovery delay (secs) */
 91	int	mount_delay;		/* mount setup delay (secs) */
 92	bool	bug_on_assert;		/* BUG() the kernel on assert failure */
 93	bool	always_cow;		/* use COW fork for all overwrites */
 94};
 95extern struct xfs_globals	xfs_globals;
 96
 97#ifdef CONFIG_SYSCTL
 98extern int xfs_sysctl_register(void);
 99extern void xfs_sysctl_unregister(void);
100#else
101# define xfs_sysctl_register()		(0)
102# define xfs_sysctl_unregister()	do { } while (0)
103#endif /* CONFIG_SYSCTL */
104
105#endif /* __XFS_SYSCTL_H__ */