1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (c) 2001-2005 Silicon Graphics, Inc.
6 #ifndef __XFS_SYSCTL_H__
7 #define __XFS_SYSCTL_H__
9 #include <linux/sysctl.h>
12 * Tunable xfs parameters
15 typedef struct xfs_sysctl_val {
21 typedef 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 */
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.
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)
53 * xfs_panic_mask bit 0x8 turns the error reports into panics
57 /* XFS_REFCACHE_SIZE = 1 */
58 /* XFS_REFCACHE_PURGE = 2 */
59 /* XFS_RESTRICT_CHOWN = 3 */
65 /* XFS_PROBE_DMAPI = 9 */
66 /* XFS_PROBE_IOOPS = 10 */
67 /* XFS_PROBE_QUOTA = 11 */
69 XFS_INHERIT_SYNC = 13,
70 XFS_INHERIT_NODUMP = 14,
71 XFS_INHERIT_NOATIME = 15,
74 /* XFS_IO_BYPASS = 18 */
75 XFS_INHERIT_NOSYM = 19,
77 XFS_INHERIT_NODFRG = 21,
78 XFS_FILESTREAM_TIMER = 22,
81 extern xfs_param_t xfs_params;
85 int pwork_threads; /* parallel workqueue threads */
87 int log_recovery_delay; /* log recovery delay (secs) */
88 int mount_delay; /* mount setup delay (secs) */
89 bool bug_on_assert; /* BUG() the kernel on assert failure */
90 bool always_cow; /* use COW fork for all overwrites */
92 extern struct xfs_globals xfs_globals;
95 extern int xfs_sysctl_register(void);
96 extern void xfs_sysctl_unregister(void);
98 # define xfs_sysctl_register() (0)
99 # define xfs_sysctl_unregister() do { } while (0)
100 #endif /* CONFIG_SYSCTL */
102 #endif /* __XFS_SYSCTL_H__ */