remove dead code and add missing statics
PATCH 1/1 remove dead code and add missing statics
journal.c +0 -30
@@ -63,28 +63,10 @@static int __ocfs_recovery_thread (void *arg);static int ocfs_commit_cache (ocfs_super * osb);static int ocfs_wait_on_mount (ocfs_super *osb); -static int ocfs_journal_flush (ocfs_journal *journal);static void ocfs_handle_move_locks (ocfs_journal *journal,ocfs_journal_handle *handle);static void ocfs_journal_optimize_lock_list (ocfs_journal *journal); -static int ocfs_journal_flush (ocfs_journal *journal) -{ -int retval; - -down_write (&journal->trans_barrier); -journal_lock_updates (journal->k_journal); - - retval =journal_flush (journal->k_journal); - -ocfs_inc_trans_id (journal); - -journal_unlock_updates (journal->k_journal); -up_write (&journal->trans_barrier); - -return (retval); -} -static void ocfs_journal_optimize_lock_list (ocfs_journal *journal) {ocfs_journal_lock *lock =NULL ;
@@ -375,21 +357,9 @@return ret; } -static inline int ocfs_journal_flush24 (ocfs_journal *journal) -{ -int ret; - -lock_kernel (); - ret =ocfs_journal_flush (journal); -unlock_kernel (); -return ret; -} -#undef ocfs_commit_cache -#undef ocfs_journal_flush#define ocfs_commit_cache ocfs_commit_cache24 -#define ocfs_journal_flush ocfs_journal_flush24#undef journal_get_write_access#undef journal_get_undo_access
dlm.c +3 -1
@@ -389,7 +389,9 @@* ocfs_update_disk_lock() * inode is definitely non NULL */ -int ocfs_update_disk_lock (ocfs_super * osb,__u32 flags,struct buffer_head **bh,struct inode *inode,ocfs_journal_handle *handle) +static int ocfs_update_disk_lock (ocfs_super * osb,__u32 flags, +struct buffer_head **bh,struct inode *inode, +ocfs_journal_handle *handle) {int status =0 ;ocfs2_dinode *fe =NULL ;
util.c +0 -81
90 lines not on this page · raw message
vote.c +2 -14
@@ -63,6 +63,7 @@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 int ocfs_node_map_is_equal (ocfs_node_map *map1,ocfs_node_map *map2);static spinlock_t vote_obj_lock =SPIN_LOCK_UNLOCKED ;
@@ -1016,19 +1017,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 bit, prev=0 ; -while (1 ) { - bit =find_next_bit (mask->map, mask->num_nodes, prev); -if (bit > mask->num_nodes) -break ; -ocfs_node_map_set_bit (target, bit); - prev = bit+1 ; - } -} -int ocfs_node_map_test_bit (ocfs_node_map *map,int bit) {if (bit >= map->num_nodes) {
@@ -1075,7 +1063,7 @@return 1 ; } -int ocfs_node_map_is_equal (ocfs_node_map *map1,ocfs_node_map *map2) +static int ocfs_node_map_is_equal (ocfs_node_map *map1,ocfs_node_map *map2) {int num_longs, i;
dlm.h +0 -3
@@ -41,9 +41,6 @@ ocfs_release_lock_full(osb, lock_type, flags, inode, 1)int ocfs_release_lock_full (ocfs_super *osb,__u32 lock_type,__u32 flags,struct inode *inode,__u32 num_ident); -int ocfs_update_disk_lock (ocfs_super *osb,__u32 flags, -struct buffer_head **bh,struct inode *inode, -ocfs_journal_handle *handle);int ocfs_notify_on_open (ocfs_super *osb,struct inode *inode);void ocfs_get_publish_vote_map (ocfs_super *osb,ocfs_publish *publish,ocfs_node_map *vote_map);
vote.h +0 -2
@@ -58,10 +58,8 @@// clear all the bits in "target" which are set in "mask" void ocfs_node_map_clear_bits (ocfs_node_map *target,ocfs_node_map *mask);// 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_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);void ocfs_node_map_set (ocfs_node_map *target,ocfs_node_map *from);void ocfs_node_map_dup (ocfs_super *osb,ocfs_node_map *target,ocfs_node_map *from);
util.h +0 -12
@@ -33,20 +33,8 @@void ocfs_daemonize (char *name,int len);void ocfs_init_timeout (ocfs_timeout *to);void ocfs_set_timeout (ocfs_timeout *to,__u32 timeout); -void ocfs_show_stack (unsigned long *esp);void ocfs_show_trace (unsigned long *stack);int ocfs_sleep (__u32 ms);void ocfs_truncate_inode_pages (struct inode *inode,loff_t off); -int __ocfs_wait_atomic_eq (wait_queue_head_t *wq,atomic_t *var,int val,int ms); -/* exits when var == val, or on timeout */ -static inline int ocfs_wait_atomic_eq (wait_queue_head_t *wq,atomic_t *var,int val,int timeout) -{ -int ret =0 ; -if (atomic_read (var) != val) - ret =__ocfs_wait_atomic_eq (wq, var, val, timeout); -return ret; -} - -#endif /* OCFS2_UTIL_H */
nm.c +1 -1
@@ -57,7 +57,7 @@#define OCFS_DEBUG_CONTEXT OCFS_DEBUG_CONTEXT_NM/* for lack of a better name... protects inode_private->ip_num_extends. */ -spinlock_t oin_num_ext_lock =SPIN_LOCK_UNLOCKED ; +static spinlock_t oin_num_ext_lock =SPIN_LOCK_UNLOCKED ;struct semaphore recovery_list_sem;static inline int get_process_vote_action (ocfs_super * osb,ocfs_lock_res *lockres,__u32 node_num,__u32 flags,int status,int *master_alive,struct inode *inode);
file.c +2 -1
@@ -59,6 +59,7 @@ struct inode *inode);static int ocfs_truncate_file (ocfs_super *osb,__u64 file_size,struct inode *inode); +static int ocfs2_zero_extend (struct inode *inode);static void ocfs_fe_set_attributes (ocfs2_dinode *fe,struct iattr *attr) {
@@ -964,7 +965,7 @@return status; }/* ocfs_truncate_file */ -int ocfs2_zero_extend (struct inode *inode) +static int ocfs2_zero_extend (struct inode *inode) {struct address_space *mapping = inode->i_mapping;struct page *page;
file.h +0 -1
@@ -41,7 +41,6 @@ struct inode *inode);int ocfs_setattr (struct dentry *dentry,struct iattr *attr);int ocfs_sync_inode (struct inode *inode); -int ocfs2_zero_extend (struct inode *inode);#if LINUX_VERSION_CODE >=KERNEL_VERSION (2 ,6 ,0 ) int ocfs_getattr(struct vfsmount *mnt, struct dentry *dentry,
PATCH 1/1 remove dead code and add missing statics
On Fri, Aug 13, 2004 at 12:32:21PM +0200, Christoph Hellwig wrote:
<snip>
Quoted 5 lines
Index:
src/dlm.c
===================================================================
dlm.c line 397
Quoted 10 lines
dlm.c +3
-1@@ -389,7 +389,9 @@* ocfs_update_disk_lock() * inode is definitely non NULL */ -int ocfs_update_disk_lock (ocfs_super * osb,__u32 flags,struct buffer_head **bh,struct inode *inode,ocfs_journal_handle *handle) +static int ocfs_update_disk_lock (ocfs_super * osb,__u32 flags, +struct buffer_head **bh,struct inode *inode, +ocfs_journal_handle *handle) {int status =0 ;ocfs2_dinode *fe =NULL ;
I already beat you to that stuff as of this morning :)
Quoted 14 lines
Index:
src/util.c
===================================================================util.c +0
-6@@ -183,43 +183,6 @@ }/* ocfs_truncate_inode_pages */ -/* -To print the ocfs call stack use: ocfs_show_stack( NULL); - -ocfs_show_trace prints alot of garbage because nothing usefull is exported -by the kernel to determine which addresses are from the kernel/modules -
util.c line 201
Quoted 10 lines
util.c +0
-10-However the following greps will help you filter out most of the garbage -from the syslog : - -alias ocfstrace='tail -200 /var/log/messages | grep -v modules | grep -v \\\[\<' -*/ - - - -void ocfs_show_stack (unsigned long * esp) -{
<snip>
I'm going to leave this in because we use it for debugging...
util.c line 251
Quoted 11 lines
util.c +0
-4-static int ocfs_kernel_text_address (unsigned long addr) {return (addr >=0xc0000000 ) ;@@ -246,47 +209,3 @@ } - -int __ocfs_wait_atomic_eq (wait_queue_head_t *wq,atomic_t *var,int val,int ms) -{
<snip>
I'm also going to defer this one to Kurt as I think it was supposed to replace some uses of the horrible ocfs_wait macro...
<snip>
Quoted 5 lines
Index:
src/vote.h
===================================================================
vote.h line 65
Quoted 10 lines
vote.h +0
-2@@ -58,10 +58,8 @@// clear all the bits in "target" which are set in "mask" void ocfs_node_map_clear_bits (ocfs_node_map *target,ocfs_node_map *mask);// 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_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);void ocfs_node_map_set (ocfs_node_map *target,ocfs_node_map *from);void ocfs_node_map_dup (ocfs_super *osb,ocfs_node_map *target,ocfs_node_map *from);
I'm told we may use these soon :)
Otherwise, everything else has been committed, thanks!
--Mark
--
Mark Fasheh
Software Developer, Oracle Corp
[email protected]