[Ocfs2-commits] mfasheh commits r2133 - trunk/fs/ocfs2
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Mon Apr 11 19:52:48 CDT 2005
Author: mfasheh
Signed-off-by: manish
Date: 2005-04-11 19:52:46 -0500 (Mon, 11 Apr 2005)
New Revision: 2133
Modified:
trunk/fs/ocfs2/heartbeat.c
trunk/fs/ocfs2/heartbeat.h
trunk/fs/ocfs2/super.c
Log:
* remove some ifdef'd out code in ocfs2/heartbeat.c
* provide a sysctl for setting the path to ocfs2_hb_ctl
* clean up the sysctl defines, put ourselves in /proc/sys/fs like every
other file system which uses sysctl.
Signed-off-by: manish
Modified: trunk/fs/ocfs2/heartbeat.c
===================================================================
--- trunk/fs/ocfs2/heartbeat.c 2005-04-12 00:52:08 UTC (rev 2132)
+++ trunk/fs/ocfs2/heartbeat.c 2005-04-12 00:52:46 UTC (rev 2133)
@@ -51,16 +51,7 @@
#define OCFS2_HB_NODE_DOWN_PRI (0x0000002)
#define OCFS2_HB_NODE_UP_PRI OCFS2_HB_NODE_DOWN_PRI
-#if 0
-static void ocfs2_hb_node_down_cb(struct inode *group,
- struct inode *node,
- int node_num,
- void *data);
-static void ocfs2_hb_node_up_cb(struct inode *group,
- struct inode *node,
- int node_num,
- void *data);
-#endif
+char ocfs2_hb_ctl_path[PATH_MAX] = "/sbin/ocfs2_hb_ctl";
static inline void __ocfs_node_map_set_bit(ocfs_node_map *map,
int bit);
@@ -149,8 +140,6 @@
}
-#define OCFS2_HB_CTL_PATH "/sbin/ocfs2_hb_ctl"
-
void ocfs2_stop_heartbeat(ocfs_super *osb)
{
int ret;
@@ -162,7 +151,7 @@
return;
}
- argv[0] = OCFS2_HB_CTL_PATH;
+ argv[0] = ocfs2_hb_ctl_path;
argv[1] = "-K";
argv[2] = "-u";
argv[3] = osb->uuid_str;
Modified: trunk/fs/ocfs2/heartbeat.h
===================================================================
--- trunk/fs/ocfs2/heartbeat.h 2005-04-12 00:52:08 UTC (rev 2132)
+++ trunk/fs/ocfs2/heartbeat.h 2005-04-12 00:52:46 UTC (rev 2133)
@@ -26,6 +26,8 @@
#ifndef OCFS2_HEARTBEAT_H
#define OCFS2_HEARTBEAT_H
+extern char ocfs2_hb_ctl_path[PATH_MAX];
+
void ocfs2_init_node_maps(ocfs_super *osb);
int ocfs2_register_hb_callbacks(ocfs_super *osb);
Modified: trunk/fs/ocfs2/super.c
===================================================================
--- trunk/fs/ocfs2/super.c 2005-04-12 00:52:08 UTC (rev 2132)
+++ trunk/fs/ocfs2/super.c 2005-04-12 00:52:46 UTC (rev 2133)
@@ -87,22 +87,70 @@
#define KERN_OCFS 988
static ctl_table ocfs_dbg_table[] = {
- {1, "debug_level", &debug_level, sizeof (u32), 0644, NULL, &proc_dointvec,
- &sysctl_intvec, NULL, NULL, NULL},
- {2, "debug_context", &debug_context, sizeof (u32), 0644, NULL, &proc_dointvec,
- &sysctl_intvec, NULL, NULL, NULL},
- {3, "debug_exclude", &debug_exclude, sizeof (u32), 0644, NULL, &proc_dointvec,
- &sysctl_intvec, NULL, NULL, NULL},
- {0}
+ {
+ .ctl_name = 1,
+ .procname = "debug_level",
+ .data = &debug_level,
+ .maxlen = sizeof(u32),
+ .mode = 0644,
+ .child = NULL,
+ .proc_handler = &proc_dointvec,
+ .strategy = &sysctl_intvec,
+ },
+ {
+ .ctl_name = 2,
+ .procname = "debug_context",
+ .data = &debug_context,
+ .maxlen = sizeof(u32),
+ .mode = 0644,
+ .child = NULL,
+ .proc_handler = &proc_dointvec,
+ .strategy = &sysctl_intvec
+ },
+ {
+ .ctl_name = 3,
+ .procname = "debug_exclude",
+ .data = &debug_exclude,
+ .maxlen = sizeof(u32),
+ .mode = 0644,
+ .child = NULL,
+ .proc_handler = &proc_dointvec,
+ .strategy = &sysctl_intvec
+ },
+ {
+ .ctl_name = 4,
+ .procname = "hb_ctl_path",
+ .data = ocfs2_hb_ctl_path,
+ .maxlen = PATH_MAX,
+ .mode = 0644,
+ .proc_handler = &proc_dostring,
+ .strategy = &sysctl_string,
+ },
+ { .ctl_name = 0 }
};
static ctl_table ocfs_kern_table[] = {
- {KERN_OCFS, "ocfs2", NULL, 0, 0555, ocfs_dbg_table},
- {0}
+ {
+ .ctl_name = KERN_OCFS,
+ .procname = "ocfs2",
+ .data = NULL,
+ .maxlen = 0,
+ .mode = 0555,
+ .child = ocfs_dbg_table
+ },
+ { .ctl_name = 0}
};
+
static ctl_table ocfs_root_table[] = {
- {CTL_KERN, "kernel", NULL, 0, 0555, ocfs_kern_table},
- {0}
+ {
+ .ctl_name = CTL_FS,
+ .procname = "fs",
+ .data = NULL,
+ .maxlen = 0,
+ .mode = 0555,
+ .child = ocfs_kern_table
+ },
+ { .ctl_name = 0 }
};
static struct ctl_table_header *ocfs_table_header = NULL;
@@ -560,9 +608,9 @@
spin_lock (&osb_id_lock);
osb_id = 0;
spin_unlock (&osb_id_lock);
-
+
/* Initialize the proc interface */
- ocfs_proc_init ();
+ ocfs_proc_init();
leave:
if (status < 0) {
More information about the Ocfs2-commits
mailing list