[Ocfs2-commits] mfasheh commits r1291 - trunk/src

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Tue Jul 20 17:12:56 CDT 2004


Author: mfasheh
Date: 2004-07-20 16:12:54 -0500 (Tue, 20 Jul 2004)
New Revision: 1291

Modified:
   trunk/src/dlm.c
   trunk/src/dlm.h
   trunk/src/inode.c
   trunk/src/nm.c
   trunk/src/super.c
   trunk/src/super.h
   trunk/src/util.c
   trunk/src/util.h
   trunk/src/vote.c
   trunk/src/vote.h
Log:
* include parts of a patch by Christoph Hellwig <hch at lst.de>:
I ran Tridge's findstatic.pl and fixed everything it complained about.



Modified: trunk/src/dlm.c
===================================================================
--- trunk/src/dlm.c	2004-07-20 18:08:17 UTC (rev 1290)
+++ trunk/src/dlm.c	2004-07-20 21:12:54 UTC (rev 1291)
@@ -61,10 +61,10 @@
 static int ocfs_wait_for_vote (ocfs_super * osb, __u64 lock_id, __u32 lock_type, __u32 flags, ocfs_node_map *vote_map, __u32 time_to_wait, __u64 lock_seq_num, ocfs_node_map *open_map);
 static int ocfs_reset_voting (ocfs_super * osb);
 static int ocfs_get_vote_on_disk (ocfs_super * osb, __u64 lock_id, __u32 lock_type, __u32 flags, ocfs_node_map * got_vote_map, ocfs_node_map * vote_map, __u64 lock_seq_num, ocfs_node_map * oin_open_map);
-int ocfs_disk_release_lock (ocfs_super * osb, __u64 lock_id, __u32 lock_type, __u32 flags, struct buffer_head *bh, struct inode *inode);
+static int ocfs_disk_release_lock (ocfs_super * osb, __u64 lock_id, __u32 lock_type, __u32 flags, struct buffer_head *bh, struct inode *inode);
 
 
-void ocfs_set_publish_vote_map(ocfs_super *osb, ocfs_publish *publish, ocfs_node_map *vote_map)
+static void ocfs_set_publish_vote_map(ocfs_super *osb, ocfs_publish *publish, ocfs_node_map *vote_map)
 {
 	ocfs_node_map_set_to_disk(publish->vote_map, vote_map);
 }
@@ -785,8 +785,10 @@
 	num_paths
 };
 
-const char *lock_path_strs[] = {"invalid_path", "fast_path", "become_master",
-				"get_x", "wait_for_release", "master_request" };
+static const char *lock_path_strs[] = {
+	"invalid_path", "fast_path", "become_master",
+	"get_x", "wait_for_release", "master_request"
+};
 
 static inline const char * lock_path_str(int lock_path);
 static inline const char * lock_path_str(int lock_path)
@@ -1026,7 +1028,9 @@
  * ocfs_disk_release_lock()
  * inode is definitely non NULL
  */
-int ocfs_disk_release_lock (ocfs_super * osb, __u64 lock_id, __u32 lock_type, __u32 flags, struct buffer_head *bh, struct inode *inode)
+static int ocfs_disk_release_lock(ocfs_super * osb, __u64 lock_id,
+		__u32 lock_type, __u32 flags, struct buffer_head *bh,
+		struct inode *inode)
 {
 	ocfs_node_map votemap;
 	int status = 0, vote_status = 0;

Modified: trunk/src/dlm.h
===================================================================
--- trunk/src/dlm.h	2004-07-20 18:08:17 UTC (rev 1290)
+++ trunk/src/dlm.h	2004-07-20 21:12:54 UTC (rev 1291)
@@ -49,8 +49,6 @@
 int ocfs_wait_for_lock_release(ocfs_super *osb, __u64 offset,
 			       __u32 time_to_wait, __u32 lock_type,
 			       struct inode *inode);
-void ocfs_set_publish_vote_map(ocfs_super *osb, ocfs_publish *publish,
-			       ocfs_node_map *vote_map);
 void ocfs_get_publish_vote_map(ocfs_super *osb, ocfs_publish *publish,
 			       ocfs_node_map *vote_map);
 void ocfs_set_disk_lock_open_map(ocfs_super *osb, ocfs2_disk_lock *lock,

Modified: trunk/src/inode.c
===================================================================
--- trunk/src/inode.c	2004-07-20 18:08:17 UTC (rev 1290)
+++ trunk/src/inode.c	2004-07-20 21:12:54 UTC (rev 1291)
@@ -1313,7 +1313,7 @@
  * called like this: dio->get_blocks(dio->inode, fs_startblk,
  * 					fs_count, map_bh, dio->rw == WRITE);
  */
-int ocfs_direct_IO_get_blocks(struct inode *inode, sector_t iblock, unsigned long max_blocks, struct buffer_head *bh_result, int create)
+static int ocfs_direct_IO_get_blocks(struct inode *inode, sector_t iblock, unsigned long max_blocks, struct buffer_head *bh_result, int create)
 {
 	int ret = -1;
 	int status;

Modified: trunk/src/nm.c
===================================================================
--- trunk/src/nm.c	2004-07-20 18:08:17 UTC (rev 1290)
+++ trunk/src/nm.c	2004-07-20 21:12:54 UTC (rev 1291)
@@ -79,7 +79,7 @@
 static void ocfs_clear_inode_for_extend(ocfs_super *osb, struct inode *inode,
 					__u32 node_num);
 
-void ocfs_process_vote_worker(void *val);
+static void ocfs_process_vote_worker(void *val);
 
 #ifdef VERBOSE_PROCESS_VOTE
 static const char *process_vote_strings[] = {
@@ -170,7 +170,7 @@
 	struct work_struct ipc_wq;
 };
 
-void ocfs_process_vote_worker(void *val)
+static void ocfs_process_vote_worker(void *val)
 {
 	struct ocfs_sched_vote *sv = val;
 	ocfs_super *osb = NULL;

Modified: trunk/src/super.c
===================================================================
--- trunk/src/super.c	2004-07-20 18:08:17 UTC (rev 1290)
+++ trunk/src/super.c	2004-07-20 21:12:54 UTC (rev 1291)
@@ -168,6 +168,7 @@
 static int ocfs_read_params(void);
 static int ocfs_initialize_mem_lists (void);
 static void ocfs_free_mem_lists (void);
+static void ocfs_delete_osb (ocfs_super * osb);
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
 static int ocfs_statfs (struct super_block *sb, struct kstatfs *buf);
@@ -1902,7 +1903,7 @@
  * It will remove the osb from the global list and also free up all the
  * initialized resources and fileobject.
  */
-void ocfs_delete_osb (ocfs_super * osb)
+static void ocfs_delete_osb (ocfs_super * osb)
 {
 	int i;
 	LOG_ENTRY ();

Modified: trunk/src/super.h
===================================================================
--- trunk/src/super.h	2004-07-20 18:08:17 UTC (rev 1290)
+++ trunk/src/super.h	2004-07-20 21:12:54 UTC (rev 1291)
@@ -29,7 +29,6 @@
 #ifndef OCFS2_SUPER_H
 #define OCFS2_SUPER_H
 
-void ocfs_delete_osb(ocfs_super *osb);
 int ocfs_dismount_volume(struct super_block *sb);
 int ocfs_publish_get_mount_state(ocfs_super *osb, int node_num);
 

Modified: trunk/src/util.c
===================================================================
--- trunk/src/util.c	2004-07-20 18:08:17 UTC (rev 1290)
+++ trunk/src/util.c	2004-07-20 21:12:54 UTC (rev 1291)
@@ -175,26 +175,6 @@
 
 #endif				/* !USERSPACE_TOOL */
 
-/*
- * ocfs_compare_qstr()
- *
- */
-int ocfs_compare_qstr (struct qstr * s1, struct qstr * s2)
-{
-	int s = strncmp ((const char *) s1->name, (const char *) s2->name,
-			s1->len < s2->len ? s1->len : s2->len);
-
-	if (s != 0)
-		return s;
-	if (s1->len > s2->len)
-		return 1;
-	else if (s1->len < s2->len)
-		return -1;
-	else
-		return s;
-}				/* ocfs_compare_qstr */
-
-
 void ocfs_truncate_inode_pages(struct inode *inode, loff_t off)
 {
 	LOG_TRACE_ARGS("truncating pages for inode %llu (%p) from offset %llu\n", 

Modified: trunk/src/util.h
===================================================================
--- trunk/src/util.h	2004-07-20 18:08:17 UTC (rev 1290)
+++ trunk/src/util.h	2004-07-20 21:12:54 UTC (rev 1291)
@@ -29,7 +29,6 @@
 #ifndef OCFS2_UTIL_H
 #define OCFS2_UTIL_H
 
-int ocfs_compare_qstr(struct qstr *s1, struct qstr *s2);
 void ocfs_clear_timeout(ocfs_timeout *to);
 void ocfs_daemonize(char *name, int len);
 void ocfs_init_timeout(ocfs_timeout *to);

Modified: trunk/src/vote.c
===================================================================
--- trunk/src/vote.c	2004-07-20 18:08:17 UTC (rev 1290)
+++ trunk/src/vote.c	2004-07-20 21:12:54 UTC (rev 1291)
@@ -62,6 +62,7 @@
 static void ocfs_init_dlm_msg (ocfs_super * osb, ocfs_dlm_msg * dlm_msg, __u32 msg_len, __u32 type);
 
 static int ocfs_send_bcast (ocfs_super * osb, ocfs_node_map *votemap, ocfs_dlm_msg * dlm_msg);
+static int ocfs_node_map_stringify(ocfs_node_map *map, char **str);
 
 static spinlock_t vote_obj_lock = SPIN_LOCK_UNLOCKED;
 
@@ -74,7 +75,7 @@
 	spin_unlock(&vote_obj_lock);
 }
 
-void ocfs_get_vote_obj (ocfs_vote_obj *obj)
+static void ocfs_get_vote_obj (ocfs_vote_obj *obj)
 {
 	spin_lock(&vote_obj_lock);
 	atomic_inc(&obj->refcount);
@@ -1041,7 +1042,7 @@
 	return test_bit(bit, map->map);
 }
 
-int ocfs_node_map_stringify(ocfs_node_map *map, char **str)
+static int ocfs_node_map_stringify(ocfs_node_map *map, char **str)
 {
 	int i, n;
 	char *s;

Modified: trunk/src/vote.h
===================================================================
--- trunk/src/vote.h	2004-07-20 18:08:17 UTC (rev 1290)
+++ trunk/src/vote.h	2004-07-20 21:12:54 UTC (rev 1291)
@@ -29,7 +29,6 @@
 #ifndef OCFS2_VOTE_H
 #define OCFS2_VOTE_H
 
-void ocfs_get_vote_obj(ocfs_vote_obj *obj);
 int ocfs_init_udp_sock(struct socket **send_sock,
 		       struct socket **recv_sock);
 int ocfs_lookup_obj_for_proc(ocfs_vote_obj *obj,
@@ -60,7 +59,6 @@
 // set all the bits in "target" which are set in "mask"
 void ocfs_node_map_set_bits(ocfs_node_map *target, ocfs_node_map *mask);
 int ocfs_node_map_test_bit(ocfs_node_map *map, int bit);
-int ocfs_node_map_stringify(ocfs_node_map *map, char **str);
 int ocfs_node_map_is_empty(ocfs_node_map *map);
 int ocfs_node_map_is_equal(ocfs_node_map *map1, ocfs_node_map *map2);
 void ocfs_node_map_and(ocfs_node_map *target, ocfs_node_map *mask);



More information about the Ocfs2-commits mailing list