On Wed, 19 Feb 2003 17:00:43 -0800,
Scott Jepson <scott@xxxxxxxx> wrote:
>Has anyone seen or fixed this problem?:
>fs/fs.o: In function `xfs_cmn_err':
>fs/fs.o(.text+0x6a172): undefined reference to `xfs_params'
XFS did not build with CONFIG_SYSCTL=n.
diff fs/xfs/linux/Makefile
--- fs/xfs/linux/Makefile
+++ fs/xfs/linux/Makefile
@@ -49,9 +49,9 @@
export-objs := xfs_globals.o
obj-$(CONFIG_PROC_FS) += xfs_stats.o
-obj-$(CONFIG_SYSCTL) += xfs_sysctl.o
-obj-y += xfs_aops.o \
+obj-y += xfs_sysctl.o \
+ xfs_aops.o \
xfs_behavior.o \
xfs_file.o \
xfs_fs_subr.o \
diff fs/xfs/linux/xfs_sysctl.c
--- fs/xfs/linux/xfs_sysctl.c
+++ fs/xfs/linux/xfs_sysctl.c
@@ -35,9 +35,13 @@
#include <linux/proc_fs.h>
/*
- * Tunable XFS parameters
+ * Tunable XFS parameters. xfs_params is required even when CONFIG_SYSCTL=n,
+ * other XFS code uses these values.
*/
+xfs_param_t xfs_params = { 128, 32, 0, 1, 0, 0, 0 };
+
+#ifdef CONFIG_SYSCTL
extern struct xfsstats xfsstats;
STATIC ulong xfs_min[XFS_PARAM] = { \
@@ -45,8 +49,6 @@
STATIC ulong xfs_max[XFS_PARAM] = { \
XFS_REFCACHE_SIZE_MAX, XFS_REFCACHE_SIZE_MAX, 1, 1, 1, 1, 127 };
-xfs_param_t xfs_params = { 128, 32, 0, 1, 0, 0, 0 };
-
static struct ctl_table_header *xfs_table_header;
@@ -143,16 +145,21 @@
{CTL_FS, "fs", NULL, 0, 0555, xfs_dir_table},
{0}
};
+#endif /* CONFIG_SYSCTL */
void
xfs_sysctl_register(void)
{
+#ifdef CONFIG_SYSCTL
xfs_table_header = register_sysctl_table(xfs_root_table, 1);
+#endif
}
void
xfs_sysctl_unregister(void)
{
+#ifdef CONFIG_SYSCTL
if (xfs_table_header)
unregister_sysctl_table(xfs_table_header);
+#endif
}
diff fs/xfs/linux/xfs_sysctl.h
--- fs/xfs/linux/xfs_sysctl.h
+++ fs/xfs/linux/xfs_sysctl.h
@@ -64,12 +64,7 @@
extern xfs_param_t xfs_params;
-#ifdef CONFIG_SYSCTL
extern void xfs_sysctl_register(void);
extern void xfs_sysctl_unregister(void);
-#else
-static __inline void xfs_sysctl_register(void) { };
-static __inline void xfs_sysctl_unregister(void) { };
-#endif
#endif /* __XFS_SYSCTL_H__ */
|