Commit ef094721 authored by Stephen Lord's avatar Stephen Lord

[XFS] break dependency between CONFIG_PROCFS and CONFIG_SYSCTL in xfs

SGI Modid: 2.5.x-xfs:slinx:150782a
parent 08ed5dce
...@@ -36,12 +36,13 @@ ...@@ -36,12 +36,13 @@
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
STATIC ulong xfs_min[XFS_PARAM] = { 0, 0, 0, 0, 0, 0, HZ }; STATIC ulong xfs_min[XFS_PARAM] = { 0, 0, 0, 0, 0, HZ, 0 };
STATIC ulong xfs_max[XFS_PARAM] = { 1, 1, 1, 1, 127, 3, HZ * 60 }; STATIC ulong xfs_max[XFS_PARAM] = { 1, 1, 1, 127, 3, HZ * 60, 1 };
static struct ctl_table_header *xfs_table_header; static struct ctl_table_header *xfs_table_header;
#ifdef CONFIG_PROC_FS
STATIC int STATIC int
xfs_stats_clear_proc_handler( xfs_stats_clear_proc_handler(
ctl_table *ctl, ctl_table *ctl,
...@@ -66,35 +67,39 @@ xfs_stats_clear_proc_handler( ...@@ -66,35 +67,39 @@ xfs_stats_clear_proc_handler(
return ret; return ret;
} }
#endif /* CONFIG_PROC_FS */
STATIC ctl_table xfs_table[] = { STATIC ctl_table xfs_table[] = {
{XFS_STATS_CLEAR, "stats_clear", &xfs_params.stats_clear,
sizeof(ulong), 0644, NULL, &xfs_stats_clear_proc_handler,
&sysctl_intvec, NULL, &xfs_min[0], &xfs_max[0]},
{XFS_RESTRICT_CHOWN, "restrict_chown", &xfs_params.restrict_chown, {XFS_RESTRICT_CHOWN, "restrict_chown", &xfs_params.restrict_chown,
sizeof(ulong), 0644, NULL, &proc_doulongvec_minmax, sizeof(ulong), 0644, NULL, &proc_doulongvec_minmax,
&sysctl_intvec, NULL, &xfs_min[1], &xfs_max[1]}, &sysctl_intvec, NULL, &xfs_min[0], &xfs_max[0]},
{XFS_SGID_INHERIT, "irix_sgid_inherit", &xfs_params.sgid_inherit, {XFS_SGID_INHERIT, "irix_sgid_inherit", &xfs_params.sgid_inherit,
sizeof(ulong), 0644, NULL, &proc_doulongvec_minmax, sizeof(ulong), 0644, NULL, &proc_doulongvec_minmax,
&sysctl_intvec, NULL, &xfs_min[2], &xfs_max[2]}, &sysctl_intvec, NULL, &xfs_min[1], &xfs_max[1]},
{XFS_SYMLINK_MODE, "irix_symlink_mode", &xfs_params.symlink_mode, {XFS_SYMLINK_MODE, "irix_symlink_mode", &xfs_params.symlink_mode,
sizeof(ulong), 0644, NULL, &proc_doulongvec_minmax, sizeof(ulong), 0644, NULL, &proc_doulongvec_minmax,
&sysctl_intvec, NULL, &xfs_min[3], &xfs_max[3]}, &sysctl_intvec, NULL, &xfs_min[2], &xfs_max[2]},
{XFS_PANIC_MASK, "panic_mask", &xfs_params.panic_mask, {XFS_PANIC_MASK, "panic_mask", &xfs_params.panic_mask,
sizeof(ulong), 0644, NULL, &proc_doulongvec_minmax, sizeof(ulong), 0644, NULL, &proc_doulongvec_minmax,
&sysctl_intvec, NULL, &xfs_min[4], &xfs_max[4]}, &sysctl_intvec, NULL, &xfs_min[3], &xfs_max[3]},
{XFS_ERRLEVEL, "error_level", &xfs_params.error_level, {XFS_ERRLEVEL, "error_level", &xfs_params.error_level,
sizeof(ulong), 0644, NULL, &proc_doulongvec_minmax, sizeof(ulong), 0644, NULL, &proc_doulongvec_minmax,
&sysctl_intvec, NULL, &xfs_min[5], &xfs_max[5]}, &sysctl_intvec, NULL, &xfs_min[4], &xfs_max[4]},
{XFS_SYNC_INTERVAL, "sync_interval", &xfs_params.sync_interval, {XFS_SYNC_INTERVAL, "sync_interval", &xfs_params.sync_interval,
sizeof(ulong), 0644, NULL, &proc_doulongvec_minmax, sizeof(ulong), 0644, NULL, &proc_doulongvec_minmax,
&sysctl_intvec, NULL, &xfs_min[5], &xfs_max[5]},
/* please keep this the last entry */
#ifdef CONFIG_PROC_FS
{XFS_STATS_CLEAR, "stats_clear", &xfs_params.stats_clear,
sizeof(ulong), 0644, NULL, &xfs_stats_clear_proc_handler,
&sysctl_intvec, NULL, &xfs_min[6], &xfs_max[6]}, &sysctl_intvec, NULL, &xfs_min[6], &xfs_max[6]},
#endif /* CONFIG_PROC_FS */
{0} {0}
}; };
......
...@@ -42,7 +42,6 @@ ...@@ -42,7 +42,6 @@
#define XFS_PARAM (sizeof(struct xfs_param) / sizeof(ulong)) #define XFS_PARAM (sizeof(struct xfs_param) / sizeof(ulong))
typedef struct xfs_param { typedef struct xfs_param {
ulong stats_clear; /* Reset all XFS statistics to zero. */
ulong restrict_chown; /* Root/non-root can give away files. */ ulong restrict_chown; /* Root/non-root can give away files. */
ulong sgid_inherit; /* Inherit ISGID bit if process' GID is */ ulong sgid_inherit; /* Inherit ISGID bit if process' GID is */
/* not a member of the parent dir GID. */ /* not a member of the parent dir GID. */
...@@ -50,6 +49,7 @@ typedef struct xfs_param { ...@@ -50,6 +49,7 @@ typedef struct xfs_param {
ulong panic_mask; /* bitmask to specify panics on errors. */ ulong panic_mask; /* bitmask to specify panics on errors. */
ulong error_level; /* Degree of reporting for internal probs*/ ulong error_level; /* Degree of reporting for internal probs*/
ulong sync_interval; /* time between sync calls */ ulong sync_interval; /* time between sync calls */
ulong stats_clear; /* Reset all XFS statistics to zero. */
} xfs_param_t; } xfs_param_t;
/* /*
...@@ -68,13 +68,13 @@ typedef struct xfs_param { ...@@ -68,13 +68,13 @@ typedef struct xfs_param {
*/ */
enum { enum {
XFS_STATS_CLEAR = 1, XFS_RESTRICT_CHOWN = 1,
XFS_RESTRICT_CHOWN = 2, XFS_SGID_INHERIT = 2,
XFS_SGID_INHERIT = 3, XFS_SYMLINK_MODE = 3,
XFS_SYMLINK_MODE = 4, XFS_PANIC_MASK = 4,
XFS_PANIC_MASK = 5, XFS_ERRLEVEL = 5,
XFS_ERRLEVEL = 6, XFS_SYNC_INTERVAL = 6,
XFS_SYNC_INTERVAL = 7, XFS_STATS_CLEAR = 7,
}; };
extern xfs_param_t xfs_params; extern xfs_param_t xfs_params;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment