The first try of adding trace event to ocfs2.
cover The first try of adding trace event to ocfs2.
Hi all,
This patch set is my first try to add trace event to ocfs2.
Wengang Wang has did some work in this field about one year ago.
http://oss.oracle.com/pipermail/ocfs2-devel/2009-September/005230.html
But at that time we don't have ocfs2 1.6 introduced, so we delay this work until now after ocfs2 1.6 and UEK(Unbreakable Enterprise Kernel) are released.
Patch 1 is actually a clean up and unrelated to trace event, but if we don't have this one, patch 2/3/4/5 won't be applied cleanly, so I'd like to include it here.
Patch 2 and 3 are my attempt to remove ML_ENTRY and ML_EXIT. These 2 flags are overused and actually enabling them means disasters in our debugging.
Patch 4/5 are the real patches for trace event. Please review these 2 patches. And if it is ok, I will go ahead with other files under fs/ocfs2/.
Regards,
Tao
PATCH 1/5 ocfs2: Remove unused truncate function from alloc.c
Tristan Ye has done some refactoring against our truncate process, so some functions like ocfs2_prepare_truncate and ocfs2_free_truncate_context are no use and we'd better remove them.
--- fs/ocfs2/alloc.c | 74 ------------------------------------------------------ fs/ocfs2/alloc.h | 4 --- 2 files changed, 0 insertions(+), 78 deletions(-)
fs/ocfs2/alloc.c +0 -74
@@ -565,7 +565,6 @@ static inline int ocfs2_et_sanity_check(struct ocfs2_extent_tree *et)return ret; } -static void ocfs2_free_truncate_context (struct ocfs2_truncate_context *tc);static int ocfs2_cache_extent_block_free (struct ocfs2_cached_dealloc_ctxt *ctxt,struct ocfs2_extent_block *eb); static void ocfs2_adjust_rightmost_records(handle_t *handle,
@@ -7139,64 +7138,6 @@ bail: }/* -* Expects the inode to already be locked. -*/ -int ocfs2_prepare_truncate (struct ocfs2_super *osb, -struct inode *inode, -struct buffer_head *fe_bh, -struct ocfs2_truncate_context **tc) -{ -int status; -unsigned int new_i_clusters; -struct ocfs2_dinode *fe; -struct ocfs2_extent_block *eb; -struct buffer_head *last_eb_bh =NULL ; - -mlog_entry_void (); - - *tc =NULL ; - - new_i_clusters =ocfs2_clusters_for_bytes (osb->sb, -i_size_read (inode)); - fe = (struct ocfs2_dinode *) fe_bh->b_data; - -mlog (0 ,"fe->i_clusters = %u, new_i_clusters = %u, fe->i_size =" -"%llu\n" ,le32_to_cpu (fe->i_clusters), new_i_clusters, - (unsigned long long )le64_to_cpu (fe->i_size)); - - *tc =kzalloc (sizeof (struct ocfs2_truncate_context ),GFP_KERNEL ); -if (!(*tc)) { - status = -ENOMEM ; -mlog_errno (status); - goto bail; - } -ocfs2_init_dealloc_ctxt (&(*tc)->tc_dealloc); - -if (fe->id2.i_list.l_tree_depth) { - status =ocfs2_read_extent_block (INODE_CACHE (inode), -le64_to_cpu (fe->i_last_eb_blk), - &last_eb_bh); -if (status <0 ) { -mlog_errno (status); - goto bail; - } - eb = (struct ocfs2_extent_block *) last_eb_bh->b_data; - } - - (*tc)->tc_last_eb_bh = last_eb_bh; - - status =0 ; -bail: -if (status <0 ) { -if (*tc) -ocfs2_free_truncate_context (*tc); - *tc =NULL ; - } -mlog_exit_void (); -return status; -} - -/* * 'start' is inclusive, 'end' is not. */ int ocfs2_truncate_inline(struct inode *inode, struct buffer_head *di_bh,
@@ -7270,18 +7211,3 @@ out_commit: out:return ret; } - -static void ocfs2_free_truncate_context (struct ocfs2_truncate_context *tc) -{ -/* -* The caller is responsible for completing deallocation -* before freeing the context. -*/ -if (tc->tc_dealloc.c_first_suballocator !=NULL ) -mlog (ML_NOTICE , -"Truncate completion has non-empty dealloc context\n" ); - -brelse (tc->tc_last_eb_bh); - -kfree (tc); -}
fs/ocfs2/alloc.h +0 -4
@@ -228,10 +228,6 @@ struct ocfs2_truncate_context {int ocfs2_zero_range_for_truncate (struct inode *inode,handle_t *handle,u64 range_start,u64 range_end); -int ocfs2_prepare_truncate (struct ocfs2_super *osb, -struct inode *inode, -struct buffer_head *fe_bh, -struct ocfs2_truncate_context **tc);int ocfs2_commit_truncate (struct ocfs2_super *osb,struct inode *inode,struct buffer_head *di_bh);
Signature · 1 line
1.7.1.GIT
PATCH 1/5 ocfs2: Remove unused truncate function from alloc.c
Quoted 6 lines · Tao Ma
Tristan Ye has done some refactoring against our truncate process, so some functions like
ocfs2_prepare_truncateandocfs2_free_truncate_contextare no use and we'd better remove them.Signed-off-by Tao Ma <[email protected]>
Obviously correct.
Joel
Signature · 8 lines
"Hell is oneself, hell is alone, the other figures in it, merely projections."
- T. S. Eliot
Joel Becker
Senior Development Manager
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127PATCH 2/5 ocfs2: Remove ENTRY from masklog.
In reply to Tao MaENTRY is used to record the entry of a function.
But because it is added in so many functions, if we enable it, the system logs get filled up quickly and cause too much I/O. So actually no one can open it for a production system or even for a test.
So for mlog_entry_void, we just remove it. for mlog_entry(...), we replace it with mlog(0,...).
--- fs/ocfs2/alloc.c | 28 +-------------- fs/ocfs2/aops.c | 16 ++++----- fs/ocfs2/buffer_head_io.c | 10 ++--- fs/ocfs2/cluster/heartbeat.c | 2 - fs/ocfs2/cluster/masklog.c | 1 - fs/ocfs2/cluster/masklog.h | 13 +------ fs/ocfs2/dcache.c | 4 +- fs/ocfs2/dir.c | 20 +++-------- fs/ocfs2/dlm/dlmast.c | 19 ++-------- fs/ocfs2/dlm/dlmconvert.c | 6 ++-- fs/ocfs2/dlm/dlmdomain.c | 8 ++-- fs/ocfs2/dlm/dlmlock.c | 10 ++---- fs/ocfs2/dlm/dlmmaster.c | 6 +--- fs/ocfs2/dlm/dlmrecovery.c | 4 -- fs/ocfs2/dlm/dlmthread.c | 8 ++-- fs/ocfs2/dlm/dlmunlock.c | 4 +-- fs/ocfs2/dlmglue.c | 78 ------------------------------------------ fs/ocfs2/export.c | 12 +++--- fs/ocfs2/extent_map.c | 8 ++-- fs/ocfs2/file.c | 73 +++++++++++++++++---------------------- fs/ocfs2/inode.c | 28 ++++++--------- fs/ocfs2/journal.c | 43 ++++++---------------- fs/ocfs2/localalloc.c | 26 +++----------- fs/ocfs2/mmap.c | 2 +- fs/ocfs2/namei.c | 74 +++++++++++++++++++--------------------- fs/ocfs2/quota_global.c | 14 +++----- fs/ocfs2/quota_local.c | 2 +- fs/ocfs2/resize.c | 8 +--- fs/ocfs2/slot_map.c | 2 - fs/ocfs2/suballoc.c | 35 +++--------------- fs/ocfs2/super.c | 32 +++-------------- fs/ocfs2/symlink.c | 6 --- fs/ocfs2/xattr.c | 4 +- 33 files changed, 168 insertions(+), 438 deletions(-)
fs/ocfs2/alloc.c +2 -26
@@ -965,8 +965,6 @@ int ocfs2_num_free_extents(struct ocfs2_super *osb,struct buffer_head *eb_bh =NULL ;u64 last_eb_blk =0 ; -mlog_entry_void (); - el = et->et_root_el; last_eb_blk =ocfs2_et_get_last_eb_blk (et);
@@ -1010,8 +1008,6 @@ static int ocfs2_create_new_meta_bhs(handle_t *handle,OCFS2_SB (ocfs2_metadata_cache_get_super (et->et_ci));struct ocfs2_extent_block *eb; -mlog_entry_void (); - count =0 ;while (count < wanted) { status = ocfs2_claim_metadata(handle,
@@ -1173,8 +1169,6 @@ static int ocfs2_add_branch(handle_t *handle,struct ocfs2_extent_list *el;u32 new_cpos, root_end; -mlog_entry_void (); -BUG_ON (!last_eb_bh || !*last_eb_bh);if (eb_bh) {
@@ -1353,8 +1347,6 @@ static int ocfs2_shift_tree_depth(handle_t *handle,struct ocfs2_extent_list *root_el;struct ocfs2_extent_list *eb_el; -mlog_entry_void (); - status =ocfs2_create_new_meta_bhs (handle, et,1 , meta_ac, &new_eb_bh);if (status <0 ) {
@@ -1446,8 +1438,6 @@ static int ocfs2_find_branch_target(struct ocfs2_extent_tree *et,struct buffer_head *bh =NULL ;struct buffer_head *lowest_bh =NULL ; -mlog_entry_void (); - *target_bh =NULL ; el = et->et_root_el;
@@ -5795,8 +5785,8 @@ int ocfs2_truncate_log_append(struct ocfs2_super *osb,struct ocfs2_dinode *di;struct ocfs2_truncate_log *tl; -mlog_entry ("start_blk = %llu, num_clusters = %u\n" , - (unsigned long long )start_blk, num_clusters); +mlog (0 ,"start_blk = %llu, num_clusters = %u\n" , + (unsigned long long )start_blk, num_clusters);BUG_ON (mutex_trylock (&tl_inode->i_mutex));
@@ -5877,8 +5867,6 @@ static int ocfs2_replay_truncate_records(struct ocfs2_super *osb,struct inode *tl_inode = osb->osb_tl_inode;struct buffer_head *tl_bh = osb->osb_tl_bh; -mlog_entry_void (); - di = (struct ocfs2_dinode *) tl_bh->b_data; tl = &di->id2.i_dealloc; i =le16_to_cpu (tl->tl_used) -1 ;
@@ -5946,8 +5934,6 @@ int __ocfs2_flush_truncate_log(struct ocfs2_super *osb)struct ocfs2_dinode *di;struct ocfs2_truncate_log *tl; -mlog_entry_void (); -BUG_ON (mutex_trylock (&tl_inode->i_mutex)); di = (struct ocfs2_dinode *) tl_bh->b_data;
@@ -6029,8 +6015,6 @@ static void ocfs2_truncate_log_worker(struct work_struct *work) container_of(work, struct ocfs2_super, osb_truncate_log_wq.work); -mlog_entry_void (); - status =ocfs2_flush_truncate_log (osb);if (status <0 )mlog_errno (status);
@@ -6171,8 +6155,6 @@ int ocfs2_complete_truncate_log_recovery(struct ocfs2_super *osb,struct inode *tl_inode = osb->osb_tl_inode;struct ocfs2_truncate_log *tl; -mlog_entry_void (); -if (OCFS2_I (tl_inode)->ip_blkno ==le64_to_cpu (tl_copy->i_blkno)) {mlog (ML_ERROR ,"Asked to recover my own truncate log!\n" );return -EINVAL ;
@@ -6225,8 +6207,6 @@ void ocfs2_truncate_log_shutdown(struct ocfs2_super *osb)int status;struct inode *tl_inode = osb->osb_tl_inode; -mlog_entry_void (); -if (tl_inode) {cancel_delayed_work (&osb->osb_truncate_log_wq);flush_workqueue (ocfs2_wq);
@@ -6248,8 +6228,6 @@ int ocfs2_truncate_log_init(struct ocfs2_super *osb)struct inode *tl_inode =NULL ;struct buffer_head *tl_bh =NULL ; -mlog_entry_void (); - status = ocfs2_get_truncate_log_info(osb, osb->slot_num, &tl_inode,
@@ -7002,8 +6980,6 @@ int ocfs2_commit_truncate(struct ocfs2_super *osb,struct ocfs2_extent_tree et;struct ocfs2_cached_dealloc_ctxt dealloc; -mlog_entry_void (); -ocfs2_init_dinode_extent_tree (&et,INODE_CACHE (inode), di_bh);ocfs2_init_dealloc_ctxt (&dealloc);
fs/ocfs2/aops.c +7 -9
@@ -59,8 +59,8 @@ static int ocfs2_symlink_get_block(struct inode *inode, sector_t iblock,struct ocfs2_super *osb =OCFS2_SB (inode->i_sb);void *kaddr; -mlog_entry ("(0x%p, %llu, 0x%p, %d)\n" , inode, - (unsigned long long )iblock, bh_result, create); +mlog (0 ,"(0x%p, %llu, 0x%p, %d)\n" , inode, + (unsigned long long )iblock, bh_result, create);BUG_ON (ocfs2_inode_is_fast_symlink (inode));
@@ -136,8 +136,8 @@ int ocfs2_get_block(struct inode *inode, sector_t iblock,u64 p_blkno, count, past_eof;struct ocfs2_super *osb =OCFS2_SB (inode->i_sb); -mlog_entry ("(0x%p, %llu, 0x%p, %d)\n" , inode, - (unsigned long long )iblock, bh_result, create); +mlog (0 ,"(0x%p, %llu, 0x%p, %d)\n" , inode, + (unsigned long long )iblock, bh_result, create);if (OCFS2_I (inode)->ip_flags &OCFS2_INODE_SYSTEM_FILE ) mlog(ML_NOTICE, "get_block on system inode 0x%p (%lu)\n",
@@ -278,7 +278,7 @@ static int ocfs2_readpage(struct file *file, struct page *page)loff_t start = (loff_t )page->index <<PAGE_CACHE_SHIFT ;int ret, unlock =1 ; -mlog_entry ("(0x%p, %lu)\n" , file, (page ? page->index :0 )); +mlog (0 ,"(0x%p, %lu)\n" , file, (page ? page->index :0 )); ret =ocfs2_inode_lock_with_page (inode,NULL ,0 , page);if (ret !=0 ) {
@@ -398,7 +398,7 @@ static int ocfs2_writepage(struct page *page, struct writeback_control *wbc) {int ret; -mlog_entry ("(0x%p)\n" , page); +mlog (0 ,"(0x%p)\n" , page); ret =block_write_full_page (page, ocfs2_get_block, wbc);
@@ -450,7 +450,7 @@ static sector_t ocfs2_bmap(struct address_space *mapping, sector_t block)int err =0 ;struct inode *inode = mapping->host; -mlog_entry ("(block = %llu)\n" , (unsigned long long )block); +mlog (0 ,"(block = %llu)\n" , (unsigned long long )block);/* We don't need to lock journal system files, since they aren't * accessed concurrently from multiple nodes.
@@ -615,8 +615,6 @@ static ssize_t ocfs2_direct_IO(int rw,struct inode *inode = file->f_path.dentry->d_inode->i_mapping->host;int ret; -mlog_entry_void (); -/* * Fallback to buffered I/O if we see an inode without * extents.
fs/ocfs2/buffer_head_io.c +4 -6
@@ -55,8 +55,8 @@ int ocfs2_write_block(struct ocfs2_super *osb, struct buffer_head *bh, {int ret =0 ; -mlog_entry ("(bh->b_blocknr = %llu, ci=%p)\n" , - (unsigned long long )bh->b_blocknr, ci); +mlog (0 ,"(bh->b_blocknr = %llu, ci=%p)\n" , + (unsigned long long )bh->b_blocknr, ci);BUG_ON (bh->b_blocknr <OCFS2_SUPER_BLOCK_BLKNO );BUG_ON (buffer_jbd (bh));
@@ -186,8 +186,8 @@ int ocfs2_read_blocks(struct ocfs2_caching_info *ci, u64 block, int nr,struct buffer_head *bh;struct super_block *sb =ocfs2_metadata_cache_get_super (ci); -mlog_entry ("(ci=%p, block=(%llu), nr=(%d), flags=%d)\n" , - ci, (unsigned long long )block, nr, flags); +mlog (0 ,"(ci=%p, block=(%llu), nr=(%d), flags=%d)\n" , + ci, (unsigned long long )block, nr, flags);BUG_ON (!ci); BUG_ON((flags & OCFS2_BH_READAHEAD) &&
@@ -408,8 +408,6 @@ int ocfs2_write_super_or_backup(struct ocfs2_super *osb,int ret =0 ;struct ocfs2_dinode *di = (struct ocfs2_dinode *)bh->b_data; -mlog_entry_void (); -BUG_ON (buffer_jbd (bh));ocfs2_check_super_or_backup (osb->sb, bh->b_blocknr);
fs/ocfs2/cluster/heartbeat.c +0 -2
@@ -1603,8 +1603,6 @@ static int o2hb_populate_slot_data(struct o2hb_region *reg)struct o2hb_disk_slot *slot;struct o2hb_disk_heartbeat_block *hb_block; -mlog_entry_void (); - ret =o2hb_read_slots (reg, reg->hr_blocks);if (ret) {mlog_errno (ret);
fs/ocfs2/cluster/masklog.c +0 -1
@@ -80,7 +80,6 @@ struct mlog_attribute { }static struct mlog_attribute mlog_attrs[MLOG_MAX_BITS ] = { -define_mask (ENTRY ),define_mask (EXIT ),define_mask (TCP ),define_mask (MSG ),
fs/ocfs2/cluster/masklog.h +1 -12
@@ -82,7 +82,6 @@/* bits that are frequently given and infrequently matched in the low word */ /* NOTE: If you add a flag, you need to also update mlog.c! */ -#define ML_ENTRY 0x0000000000000001ULL/* func call entry */ #define ML_EXIT 0x0000000000000002ULL/* func call exit */ #define ML_TCP 0x0000000000000004ULL/* net cluster/tcp.c */ #define ML_MSG 0x0000000000000008ULL/* net network messages */
@@ -123,7 +122,7 @@#define ML_CLUSTER 0x0000001000000000ULL/* cluster stack */ #define MLOG_INITIAL_AND_MASK (ML_ERROR|ML_NOTICE) -#define MLOG_INITIAL_NOT_MASK (ML_ENTRY|ML_EXIT) +#define MLOG_INITIAL_NOT_MASK (ML_EXIT)#ifndef MLOG_MASK_PREFIX #define MLOG_MASK_PREFIX 0#endif
@@ -222,14 +221,6 @@ extern struct mlog_bits mlog_and_bits, mlog_not_bits; } while (0)#if defined(CONFIG_OCFS2_DEBUG_MASKLOG ) -#define mlog_entry(fmt, args...) do { \ - mlog(ML_ENTRY, "ENTRY:" fmt , ##args); \ -} while (0) - -#define mlog_entry_void () do { \ - mlog(ML_ENTRY, "ENTRY:\n"); \ -} while (0) -/* * We disable this for sparse. */
@@ -266,8 +257,6 @@ extern struct mlog_bits mlog_and_bits, mlog_not_bits;mlog (ML_EXIT ,"EXIT\n" ); \ } while (0) #else -#define mlog_entry (...) do { } while (0) -#define mlog_entry_void (...) do { } while (0)#define mlog_exit (...) do { } while (0)#define mlog_exit_ptr (...) do { } while (0)#define mlog_exit_void (...) do { } while (0)
fs/ocfs2/dcache.c +2 -2
@@ -56,8 +56,8 @@ static int ocfs2_dentry_revalidate(struct dentry *dentry,int ret =0 ;/* if all else fails, just return false */ struct ocfs2_super *osb =OCFS2_SB (dentry->d_sb); -mlog_entry ("(0x%p, '%.*s')\n" , dentry, - dentry->d_name.len, dentry->d_name.name); +mlog (0 ,"(0x%p, '%.*s')\n" , dentry, + dentry->d_name.len, dentry->d_name.name);/* For a negative dentry - * check the generation number of the parent and compare with the
fs/ocfs2/dir.c +5 -15
@@ -367,8 +367,6 @@ static int inline ocfs2_search_dirblock(struct buffer_head *bh,int de_len;int ret =0 ; -mlog_entry_void (); - de_buf = first_de; dlimit = de_buf + bytes;
@@ -706,8 +704,6 @@ static struct buffer_head *ocfs2_find_entry_el(const char *name, int namelen,int num =0 ;int nblocks, i, err; -mlog_entry_void (); - sb = dir->i_sb; nblocks =i_size_read (dir) >> sb->s_blocksize_bits;
@@ -1166,7 +1162,7 @@ static int __ocfs2_delete_entry(handle_t *handle, struct inode *dir,int i, status = -ENOENT ;ocfs2_journal_access_func access = ocfs2_journal_access_db; -mlog_entry ("(0x%p, 0x%p, 0x%p, 0x%p)\n" , handle, dir, de_del, bh); +mlog (0 ,"(0x%p, 0x%p, 0x%p, 0x%p)\n" , handle, dir, de_del, bh);if (OCFS2_I (dir)->ip_dyn_features &OCFS2_INLINE_DATA_FL ) access = ocfs2_journal_access_di;
@@ -1632,8 +1628,6 @@ int __ocfs2_add_entry(handle_t *handle,struct buffer_head *insert_bh = lookup->dl_leaf_bh;char *data_start = insert_bh->b_data; -mlog_entry_void (); -if (!namelen)return -EINVAL ;
@@ -2028,8 +2022,8 @@ int ocfs2_readdir(struct file * filp, void * dirent, filldir_t filldir)struct inode *inode = filp->f_path.dentry->d_inode;int lock_level =0 ; -mlog_entry ("dirino=%llu\n" , - (unsigned long long )OCFS2_I (inode)->ip_blkno); +mlog (0 ,"dirino=%llu\n" , + (unsigned long long )OCFS2_I (inode)->ip_blkno); error =ocfs2_inode_lock_atime (inode, filp->f_vfsmnt, &lock_level);if (lock_level && error >=0 ) {
@@ -2114,8 +2108,8 @@ int ocfs2_check_dir_for_entry(struct inode *dir,int ret;struct ocfs2_dir_lookup_result lookup = {NULL , }; -mlog_entry ("dir %llu, name '%.*s'\n" , - (unsigned long long )OCFS2_I (dir)->ip_blkno, namelen, name); +mlog (0 ,"dir %llu, name '%.*s'\n" , + (unsigned long long )OCFS2_I (dir)->ip_blkno, namelen, name); ret = -EEXIST ;if (ocfs2_find_entry (name, namelen, dir, &lookup) ==0 )
@@ -2324,8 +2318,6 @@ static int ocfs2_fill_new_dir_el(struct ocfs2_super *osb,struct buffer_head *new_bh =NULL ;struct ocfs2_dir_entry *de; -mlog_entry_void (); -if (ocfs2_new_dir_wants_trailer (inode)) size =ocfs2_dir_trailer_blk_off (parent->i_sb);
@@ -3268,8 +3260,6 @@ static int ocfs2_extend_dir(struct ocfs2_super *osb,struct ocfs2_extent_tree et;struct buffer_head *dx_root_bh = lookup->dl_dx_root_bh; -mlog_entry_void (); -if (OCFS2_I (dir)->ip_dyn_features &OCFS2_INLINE_DATA_FL ) {/* * This would be a code error as an inline directory should
fs/ocfs2/dlm/dlmast.c +3 -16
@@ -90,8 +90,6 @@ static int dlm_should_cancel_bast(struct dlm_ctxt *dlm, struct dlm_lock *lock)void __dlm_queue_ast (struct dlm_ctxt *dlm,struct dlm_lock *lock) { -mlog_entry_void (); -BUG_ON (!dlm);BUG_ON (!lock);
@@ -134,8 +132,6 @@ void __dlm_queue_ast(struct dlm_ctxt *dlm, struct dlm_lock *lock)void dlm_queue_ast (struct dlm_ctxt *dlm,struct dlm_lock *lock) { -mlog_entry_void (); -BUG_ON (!dlm);BUG_ON (!lock);
@@ -147,8 +143,6 @@ void dlm_queue_ast(struct dlm_ctxt *dlm, struct dlm_lock *lock)void __dlm_queue_bast (struct dlm_ctxt *dlm,struct dlm_lock *lock) { -mlog_entry_void (); -BUG_ON (!dlm);BUG_ON (!lock);assert_spin_locked (&dlm->ast_lock);
@@ -167,8 +161,6 @@ void __dlm_queue_bast(struct dlm_ctxt *dlm, struct dlm_lock *lock)void dlm_queue_bast (struct dlm_ctxt *dlm,struct dlm_lock *lock) { -mlog_entry_void (); -BUG_ON (!dlm);BUG_ON (!lock);
@@ -213,8 +205,6 @@ void dlm_do_local_ast(struct dlm_ctxt *dlm, struct dlm_lock_resource *res,dlm_astlockfunc_t *fn;struct dlm_lockstatus *lksb; -mlog_entry_void (); - lksb = lock->lksb; fn = lock->ast;BUG_ON (lock->ml.node != dlm->node_num);
@@ -231,8 +221,6 @@ int dlm_do_remote_ast(struct dlm_ctxt *dlm, struct dlm_lock_resource *res,struct dlm_lockstatus *lksb;int lksbflags; -mlog_entry_void (); - lksb = lock->lksb;BUG_ON (lock->ml.node == dlm->node_num);
@@ -250,7 +238,6 @@ void dlm_do_local_bast(struct dlm_ctxt *dlm, struct dlm_lock_resource *res, {dlm_bastlockfunc_t *fn = lock->bast; -mlog_entry_void ();BUG_ON (lock->ml.node != dlm->node_num); (*fn)(lock->astdata, blocked_type);
@@ -426,9 +413,9 @@ int dlm_send_proxy_ast_msg(struct dlm_ctxt *dlm, struct dlm_lock_resource *res,size_t veclen =1 ;int status; -mlog_entry ("res %.*s, to=%u, type=%d, blocked_type=%d\n" , - res->lockname.len, res->lockname.name, lock->ml.node, - msg_type, blocked_type); +mlog (0 ,"res %.*s, to=%u, type=%d, blocked_type=%d\n" , + res->lockname.len, res->lockname.name, lock->ml.node, + msg_type, blocked_type);memset (&past,0 ,sizeof (struct dlm_proxy_ast )); past.node_idx = dlm->node_num;
fs/ocfs2/dlm/dlmconvert.c +3 -3
@@ -128,8 +128,8 @@ static enum dlm_status __dlmconvert_master(struct dlm_ctxt *dlm,assert_spin_locked (&res->spinlock); -mlog_entry ("type=%d, convert_type=%d, new convert_type=%d\n" , - lock->ml.type, lock->ml.convert_type, type); +mlog (0 ,"type=%d, convert_type=%d, new convert_type=%d\n" , + lock->ml.type, lock->ml.convert_type, type);spin_lock (&lock->spinlock);
@@ -353,7 +353,7 @@ static enum dlm_status dlm_send_remote_convert_request(struct dlm_ctxt *dlm,struct kvec vec[2 ];size_t veclen =1 ; -mlog_entry ("%.*s\n" , res->lockname.len, res->lockname.name); +mlog (0 ,"%.*s\n" , res->lockname.len, res->lockname.name);memset (&convert,0 ,sizeof (struct dlm_convert_lock )); convert.node_idx = dlm->node_num;
fs/ocfs2/dlm/dlmdomain.c +4 -4
@@ -188,7 +188,7 @@ struct dlm_lock_resource * __dlm_lookup_lockres_full(struct dlm_ctxt *dlm,struct hlist_head *bucket;struct hlist_node *list; -mlog_entry ("%.*s\n" , len, name); +mlog (0 ,"%.*s\n" , len, name);assert_spin_locked (&dlm->spinlock);
@@ -222,7 +222,7 @@ struct dlm_lock_resource * __dlm_lookup_lockres(struct dlm_ctxt *dlm, {struct dlm_lock_resource *res =NULL ; -mlog_entry ("%.*s\n" , len, name); +mlog (0 ,"%.*s\n" , len, name);assert_spin_locked (&dlm->spinlock);
@@ -533,7 +533,7 @@ static int dlm_exit_domain_handler(struct o2net_msg *msg, u32 len, void *data,unsigned int node;struct dlm_exit_domain *exit_msg = (struct dlm_exit_domain *) msg->buf; -mlog_entry ("%p %u %p" , msg, len, data); +mlog (0 ,"%p %u %p" , msg, len, data);if (!dlm_grab (dlm))return 0 ;
@@ -1555,7 +1555,7 @@ static int dlm_try_to_join_domain(struct dlm_ctxt *dlm)struct domain_join_ctxt *ctxt;enum dlm_query_join_response_code response =JOIN_DISALLOW ; -mlog_entry ("%p" , dlm); +mlog (0 ,"%p" , dlm); ctxt =kzalloc (sizeof (*ctxt),GFP_KERNEL );if (!ctxt) {
fs/ocfs2/dlm/dlmlock.c +3 -7
@@ -125,7 +125,7 @@ static enum dlm_status dlmlock_master(struct dlm_ctxt *dlm,int call_ast =0 , kick_thread =0 ;enum dlm_status status =DLM_NORMAL ; -mlog_entry ("type=%d\n" , lock->ml.type); +mlog (0 ,"type=%d\n" , lock->ml.type);spin_lock (&res->spinlock);/* if called from dlm_create_lock_handler, need to
@@ -224,8 +224,8 @@ static enum dlm_status dlmlock_remote(struct dlm_ctxt *dlm,enum dlm_status status =DLM_DENIED ;int lockres_changed =1 ; -mlog_entry ("type=%d\n" , lock->ml.type); -mlog (0 ,"lockres %.*s, flags = 0x%x\n" , res->lockname.len, +mlog (0 ,"type=%d, lockres %.*s, flags = 0x%x\n" , + lock->ml.type, res->lockname.len, res->lockname.name, flags);spin_lock (&res->spinlock);
@@ -305,8 +305,6 @@ static enum dlm_status dlm_send_remote_lock_request(struct dlm_ctxt *dlm,int tmpret, status =0 ;enum dlm_status ret; -mlog_entry_void (); -memset (&create,0 ,sizeof (create)); create.node_idx = dlm->node_num; create.requested_type = lock->ml.type;
@@ -474,8 +472,6 @@ int dlm_create_lock_handler(struct o2net_msg *msg, u32 len, void *data,BUG_ON (!dlm); -mlog_entry_void (); -if (!dlm_grab (dlm))return DLM_REJECTED ;
fs/ocfs2/dlm/dlmmaster.c +1 -5
@@ -426,8 +426,6 @@ static void dlm_mle_release(struct kref *kref)struct dlm_master_list_entry *mle;struct dlm_ctxt *dlm; -mlog_entry_void (); - mle = container_of(kref, struct dlm_master_list_entry, mle_refs); dlm = mle->dlm;
@@ -3106,8 +3104,6 @@ static int dlm_add_migration_mle(struct dlm_ctxt *dlm, *oldmle =NULL ; -mlog_entry_void (); -assert_spin_locked (&dlm->spinlock);assert_spin_locked (&dlm->master_lock);
@@ -3247,7 +3243,7 @@ void dlm_clean_master_list(struct dlm_ctxt *dlm, u8 dead_node)struct hlist_node *list;unsigned int i; -mlog_entry ("dlm=%s, dead node=%u\n" , dlm->name, dead_node); +mlog (0 ,"dlm=%s, dead node=%u\n" , dlm->name, dead_node); top:assert_spin_locked (&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c +0 -4
@@ -2083,8 +2083,6 @@ static void dlm_finish_local_lockres_recovery(struct dlm_ctxt *dlm,struct hlist_head *bucket;struct dlm_lock_resource *res, *next; -mlog_entry_void (); -assert_spin_locked (&dlm->spinlock);list_for_each_entry_safe (res, next, &dlm->reco.resources, recovering) {
@@ -2607,8 +2605,6 @@ static int dlm_send_begin_reco_message(struct dlm_ctxt *dlm, u8 dead_node)int nodenum;int status; -mlog_entry ("%u\n" , dead_node); -mlog (0 ,"%s: dead node is %u\n" , dlm->name, dead_node);spin_lock (&dlm->spinlock);
fs/ocfs2/dlm/dlmthread.c +4 -4
@@ -122,7 +122,7 @@ int __dlm_lockres_unused(struct dlm_lock_resource *res)void __dlm_lockres_calc_usage (struct dlm_ctxt *dlm,struct dlm_lock_resource *res) { -mlog_entry ("%.*s\n" , res->lockname.len, res->lockname.name); +mlog (0 ,"%.*s\n" , res->lockname.len, res->lockname.name);assert_spin_locked (&dlm->spinlock);assert_spin_locked (&res->spinlock);
@@ -150,7 +150,7 @@ void __dlm_lockres_calc_usage(struct dlm_ctxt *dlm,void dlm_lockres_calc_usage (struct dlm_ctxt *dlm,struct dlm_lock_resource *res) { -mlog_entry ("%.*s\n" , res->lockname.len, res->lockname.name); +mlog (0 ,"%.*s\n" , res->lockname.len, res->lockname.name);spin_lock (&dlm->spinlock);spin_lock (&res->spinlock);
@@ -453,7 +453,7 @@ leave:/* must have NO locks when calling this with res !=NULL * */ void dlm_kick_thread (struct dlm_ctxt *dlm,struct dlm_lock_resource *res) { -mlog_entry ("dlm=%p, res=%p\n" , dlm, res); +mlog (0 ,"dlm=%p, res=%p\n" , dlm, res);if (res) {spin_lock (&dlm->spinlock);spin_lock (&res->spinlock);
@@ -466,7 +466,7 @@ void dlm_kick_thread(struct dlm_ctxt *dlm, struct dlm_lock_resource *res)void __dlm_dirty_lockres (struct dlm_ctxt *dlm,struct dlm_lock_resource *res) { -mlog_entry ("dlm=%p, res=%p\n" , dlm, res); +mlog (0 ,"dlm=%p, res=%p\n" , dlm, res);assert_spin_locked (&dlm->spinlock);assert_spin_locked (&res->spinlock);
fs/ocfs2/dlm/dlmunlock.c +1 -3
@@ -317,7 +317,7 @@ static enum dlm_status dlm_send_remote_unlock_request(struct dlm_ctxt *dlm,struct kvec vec[2 ];size_t veclen =1 ; -mlog_entry ("%.*s\n" , res->lockname.len, res->lockname.name); +mlog (0 ,"%.*s\n" , res->lockname.len, res->lockname.name);if (owner == dlm->node_num) {/* ended up trying to contact ourself. this means
@@ -588,8 +588,6 @@ enum dlm_status dlmunlock(struct dlm_ctxt *dlm, struct dlm_lockstatus *lksb,struct dlm_lock *lock =NULL ;int call_ast, is_master; -mlog_entry_void (); -if (!lksb) {dlm_error (DLM_BADARGS );return DLM_BADARGS ;
fs/ocfs2/dlmglue.c +0 -78
330 lines not on this page · raw message
fs/ocfs2/export.c +6 -6
@@ -56,7 +56,7 @@ static struct dentry *ocfs2_get_dentry(struct super_block *sb,int status, set;struct dentry *result; -mlog_entry ("(0x%p, 0x%p)\n" , sb, handle); +mlog (0 ,"(0x%p, 0x%p)\n" , sb, handle);if (blkno ==0 ) {mlog (0 ,"nfs wants inode with blkno: 0\n" );
@@ -154,8 +154,8 @@ static struct dentry *ocfs2_get_parent(struct dentry *child)struct dentry *parent;struct inode *dir = child->d_inode; -mlog_entry ("(0x%p, '%.*s')\n" , child, - child->d_name.len, child->d_name.name); +mlog (0 ,"(0x%p, '%.*s')\n" , child, + child->d_name.len, child->d_name.name);mlog (0 ,"find parent of directory %llu\n" , (unsigned long long )OCFS2_I (dir)->ip_blkno);
@@ -197,9 +197,9 @@ static int ocfs2_encode_fh(struct dentry *dentry, u32 *fh_in, int *max_len,u32 generation;__le32 *fh = (__force __le32 *) fh_in; -mlog_entry ("(0x%p, '%.*s', 0x%p, %d, %d)\n" , dentry, - dentry->d_name.len, dentry->d_name.name, - fh, len, connectable); +mlog (0 ,"(0x%p, '%.*s', 0x%p, %d, %d)\n" , dentry, + dentry->d_name.len, dentry->d_name.name, + fh, len, connectable);if (len <3 || (connectable && len <6 )) {mlog (ML_ERROR ,"fh buffer is too small for encoding\n" );
fs/ocfs2/extent_map.c +4 -4
@@ -841,10 +841,10 @@ int ocfs2_read_virt_blocks(struct inode *inode, u64 v_block, int nr,u64 p_block, p_count;int i, count, done =0 ; -mlog_entry ("(inode = %p, v_block = %llu, nr = %d, bhs = %p, " -"flags = %x, validate = %p)\n" , - inode, (unsigned long long )v_block, nr, bhs, flags, - validate); +mlog (0 ,"(inode = %p, v_block = %llu, nr = %d, bhs = %p, " +"flags = %x, validate = %p)\n" , + inode, (unsigned long long )v_block, nr, bhs, flags, + validate);if (((v_block + nr -1 ) << inode->i_sb->s_blocksize_bits) >=i_size_read (inode)) {
fs/ocfs2/file.c +32 -41
169 lines not on this page · raw message
fs/ocfs2/inode.c +11 -17
@@ -131,7 +131,7 @@ struct inode *ocfs2_iget(struct ocfs2_super *osb, u64 blkno, unsigned flags,struct super_block *sb = osb->sb;struct ocfs2_find_inode_args args; -mlog_entry ("(blkno = %llu)\n" , (unsigned long long )blkno); +mlog (0 ,"(blkno = %llu)\n" , (unsigned long long )blkno);/* Ok. By now we've either got the offsets passed to us by the * caller, or we just pulled them off the bh. Lets do some
@@ -192,7 +192,7 @@ static int ocfs2_find_actor(struct inode *inode, void *opaque)struct ocfs2_inode_info *oi =OCFS2_I (inode);int ret =0 ; -mlog_entry ("(0x%p, %lu, 0x%p)\n" , inode, inode->i_ino, opaque); +mlog (0 ,"(0x%p, %lu, 0x%p)\n" , inode, inode->i_ino, opaque); args = opaque;
@@ -218,7 +218,7 @@ static int ocfs2_init_locked_inode(struct inode *inode, void *opaque)static struct lock_class_key ocfs2_quota_ip_alloc_sem_key, ocfs2_file_ip_alloc_sem_key; -mlog_entry ("inode = %p, opaque = %p\n" , inode, opaque); +mlog (0 ,"inode = %p, opaque = %p\n" , inode, opaque); inode->i_ino = args->fi_ino;OCFS2_I (inode)->ip_blkno = args->fi_blkno;
@@ -246,8 +246,8 @@ void ocfs2_populate_inode(struct inode *inode, struct ocfs2_dinode *fe,struct ocfs2_super *osb;int use_plocks =1 ; -mlog_entry ("(0x%p, size:%llu)\n" , inode, - (unsigned long long )le64_to_cpu (fe->i_size)); +mlog (0 ,"(0x%p, size:%llu)\n" , inode, + (unsigned long long )le64_to_cpu (fe->i_size)); sb = inode->i_sb; osb =OCFS2_SB (sb);
@@ -394,7 +394,7 @@ static int ocfs2_read_locked_inode(struct inode *inode,int status, can_lock;u32 generation =0 ; -mlog_entry ("(0x%p, 0x%p)\n" , inode, args); +mlog (0 ,"(0x%p, 0x%p)\n" , inode, args); status = -EINVAL ;if (inode ==NULL || inode->i_sb ==NULL ) {
@@ -551,8 +551,6 @@ static int ocfs2_truncate_for_delete(struct ocfs2_super *osb,struct ocfs2_dinode *fe;handle_t *handle =NULL ; -mlog_entry_void (); - fe = (struct ocfs2_dinode *) fe_bh->b_data;/*
@@ -980,7 +978,7 @@ static void ocfs2_delete_inode(struct inode *inode)sigset_t oldset;struct buffer_head *di_bh =NULL ; -mlog_entry ("(inode->i_ino = %lu)\n" , inode->i_ino); +mlog (0 ,"(inode->i_ino = %lu)\n" , inode->i_ino);/* When we fail in read_inode() we mark inode as bad. The second test * catches the case when inode allocation fails before allocating
@@ -1088,8 +1086,6 @@ static void ocfs2_clear_inode(struct inode *inode)int status;struct ocfs2_inode_info *oi =OCFS2_I (inode); -mlog_entry_void (); -end_writeback (inode);mlog (0 ,"Clearing inode: %llu, nlink = %u\n" , (unsigned long long )OCFS2_I (inode)->ip_blkno, inode->i_nlink);
@@ -1204,8 +1200,6 @@ int ocfs2_drop_inode(struct inode *inode)struct ocfs2_inode_info *oi =OCFS2_I (inode);int res; -mlog_entry_void (); -mlog (0 ,"Drop inode %llu, nlink = %u, ip_flags = 0x%x\n" , (unsigned long long )oi->ip_blkno, inode->i_nlink, oi->ip_flags);
@@ -1226,8 +1220,8 @@ int ocfs2_inode_revalidate(struct dentry *dentry)struct inode *inode = dentry->d_inode;int status =0 ; -mlog_entry ("(inode = 0x%p, ino = %llu)\n" , inode, - inode ? (unsigned long long )OCFS2_I (inode)->ip_blkno :0ULL ); +mlog (0 ,"(inode = 0x%p, ino = %llu)\n" , inode, + inode ? (unsigned long long )OCFS2_I (inode)->ip_blkno :0ULL );if (!inode) {mlog (0 ,"eep, no inode!\n" );
@@ -1271,8 +1265,8 @@ int ocfs2_mark_inode_dirty(handle_t *handle,int status;struct ocfs2_dinode *fe = (struct ocfs2_dinode *) bh->b_data; -mlog_entry ("(inode %llu)\n" , - (unsigned long long )OCFS2_I (inode)->ip_blkno); +mlog (0 ,"(inode %llu)\n" , + (unsigned long long )OCFS2_I (inode)->ip_blkno); status =ocfs2_journal_access_di (handle,INODE_CACHE (inode), bh,OCFS2_JOURNAL_ACCESS_WRITE );
fs/ocfs2/journal.c +12 -31
127 lines not on this page · raw message
fs/ocfs2/localalloc.c +5 -21
@@ -291,8 +291,6 @@ int ocfs2_load_local_alloc(struct ocfs2_super *osb)struct inode *inode =NULL ;struct ocfs2_local_alloc *la; -mlog_entry_void (); -if (osb->local_alloc_bits ==0 ) goto bail;
@@ -388,8 +386,6 @@ void ocfs2_shutdown_local_alloc(struct ocfs2_super *osb)struct ocfs2_dinode *alloc_copy =NULL ;struct ocfs2_dinode *alloc =NULL ; -mlog_entry_void (); -cancel_delayed_work (&osb->la_enable_wq);flush_workqueue (ocfs2_wq);
@@ -502,7 +498,7 @@ int ocfs2_begin_local_alloc_recovery(struct ocfs2_super *osb,struct inode *inode =NULL ;struct ocfs2_dinode *alloc; -mlog_entry ("(slot_num = %d)\n" , slot_num); +mlog (0 ,"(slot_num = %d)\n" , slot_num); *alloc_copy =NULL ;
@@ -570,8 +566,6 @@ int ocfs2_complete_local_alloc_recovery(struct ocfs2_super *osb,struct buffer_head *main_bm_bh =NULL ;struct inode *main_bm_inode; -mlog_entry_void (); - main_bm_inode =ocfs2_get_system_file_inode (osb,GLOBAL_BITMAP_SYSTEM_INODE ,OCFS2_INVALID_SLOT );
@@ -640,8 +634,6 @@ int ocfs2_reserve_local_alloc_bits(struct ocfs2_super *osb,struct inode *local_alloc_inode;unsigned int free_bits; -mlog_entry_void (); -BUG_ON (!ac); local_alloc_inode =
@@ -749,7 +741,6 @@ int ocfs2_claim_local_alloc_bits(struct ocfs2_super *osb,struct ocfs2_dinode *alloc;struct ocfs2_local_alloc *la; -mlog_entry_void ();BUG_ON (ac->ac_which !=OCFS2_AC_USE_LOCAL ); local_alloc_inode = ac->ac_inode;
@@ -799,8 +790,6 @@ static u32 ocfs2_local_alloc_count_bits(struct ocfs2_dinode *alloc)u32 count =0 ;struct ocfs2_local_alloc *la =OCFS2_LOCAL_ALLOC (alloc); -mlog_entry_void (); - buffer = la->la_bitmap;for (i =0 ; i <le16_to_cpu (la->la_size); i++) count +=hweight8 (buffer[i]);
@@ -820,7 +809,7 @@ static int ocfs2_local_alloc_find_clear_bits(struct ocfs2_super *osb,void *bitmap =NULL ;struct ocfs2_reservation_map *resmap = &osb->osb_la_resmap; -mlog_entry ("(numbits wanted = %u)\n" , *numbits); +mlog (0 ,"(numbits wanted = %u)\n" , *numbits);if (!alloc->id1.bitmap1.i_total) {mlog (0 ,"No bits in my window!\n" );
@@ -903,7 +892,6 @@ static void ocfs2_clear_local_alloc(struct ocfs2_dinode *alloc) {struct ocfs2_local_alloc *la =OCFS2_LOCAL_ALLOC (alloc);int i; -mlog_entry_void (); alloc->id1.bitmap1.i_total =0 ; alloc->id1.bitmap1.i_used =0 ;
@@ -952,9 +940,9 @@ static int ocfs2_sync_local_to_main(struct ocfs2_super *osb,void *bitmap;struct ocfs2_local_alloc *la =OCFS2_LOCAL_ALLOC (alloc); -mlog_entry ("total = %u, used = %u\n" , -le32_to_cpu (alloc->id1.bitmap1.i_total), -le32_to_cpu (alloc->id1.bitmap1.i_used)); +mlog (0 ,"total = %u, used = %u\n" , +le32_to_cpu (alloc->id1.bitmap1.i_total), +le32_to_cpu (alloc->id1.bitmap1.i_used));if (!alloc->id1.bitmap1.i_total) {mlog (0 ,"nothing to sync!\n" );
@@ -1148,8 +1136,6 @@ static int ocfs2_local_alloc_new_window(struct ocfs2_super *osb,struct ocfs2_dinode *alloc =NULL ;struct ocfs2_local_alloc *la; -mlog_entry_void (); - alloc = (struct ocfs2_dinode *) osb->local_alloc_bh->b_data; la =OCFS2_LOCAL_ALLOC (alloc);
@@ -1243,8 +1229,6 @@ static int ocfs2_local_alloc_slide_window(struct ocfs2_super *osb,struct ocfs2_dinode *alloc_copy =NULL ;struct ocfs2_alloc_context *ac =NULL ; -mlog_entry_void (); -ocfs2_recalc_la_window (osb,OCFS2_LA_EVENT_SLIDE );/* This will lock the main bitmap for us. */
fs/ocfs2/mmap.c +1 -1
@@ -49,7 +49,7 @@ static int ocfs2_fault(struct vm_area_struct *area, struct vm_fault *vmf)sigset_t oldset;int ret; -mlog_entry ("(area=%p, page offset=%lu)\n" , area, vmf->pgoff); +mlog (0 ,"(area=%p, page offset=%lu)\n" , area, vmf->pgoff);ocfs2_block_signals (&oldset); ret =filemap_fault (area, vmf);
fs/ocfs2/namei.c +35 -39
170 lines not on this page · raw message
fs/ocfs2/quota_global.c +5 -9
@@ -343,8 +343,6 @@ int ocfs2_global_read_info(struct super_block *sb, int type)u64 pcount;int status; -mlog_entry_void (); -/* Read global header */ gqinode =ocfs2_get_system_file_inode (OCFS2_SB (sb), ino[type],OCFS2_INVALID_SLOT );
@@ -596,7 +594,7 @@ static int ocfs2_sync_dquot_helper(struct dquot *dquot, unsigned long type)struct ocfs2_super *osb =OCFS2_SB (sb);int status =0 ; -mlog_entry ("id=%u qtype=%u type=%lu device=%s\n" , dquot->dq_id, +mlog (0 ,"id=%u qtype=%u type=%lu device=%s\n" , dquot->dq_id, dquot->dq_type, type, sb->s_id);if (type != dquot->dq_type) goto out;
@@ -649,7 +647,7 @@ static int ocfs2_write_dquot(struct dquot *dquot)struct ocfs2_super *osb =OCFS2_SB (dquot->dq_sb);int status =0 ; -mlog_entry ("id=%u, type=%d" , dquot->dq_id, dquot->dq_type); +mlog (0 ,"id=%u, type=%d" , dquot->dq_id, dquot->dq_type); handle =ocfs2_start_trans (osb,OCFS2_QWRITE_CREDITS );if (IS_ERR (handle)) {
@@ -688,7 +686,7 @@ static int ocfs2_release_dquot(struct dquot *dquot)struct ocfs2_super *osb =OCFS2_SB (dquot->dq_sb);int status =0 ; -mlog_entry ("id=%u, type=%d" , dquot->dq_id, dquot->dq_type); +mlog (0 ,"id=%u, type=%d" , dquot->dq_id, dquot->dq_type);mutex_lock (&dquot->dq_lock);/* Check whether we are not racing with some other dqget() */
@@ -745,7 +743,7 @@ static int ocfs2_acquire_dquot(struct dquot *dquot)int need_alloc =ocfs2_global_qinit_alloc (sb, type);handle_t *handle; -mlog_entry ("id=%u, type=%d" , dquot->dq_id, type); +mlog (0 ,"id=%u, type=%d" , dquot->dq_id, type);mutex_lock (&dquot->dq_lock);/* * We need an exclusive lock, because we're going to update use count
@@ -831,7 +829,7 @@ static int ocfs2_mark_dquot_dirty(struct dquot *dquot)handle_t *handle;struct ocfs2_super *osb =OCFS2_SB (sb); -mlog_entry ("id=%u, type=%d" , dquot->dq_id, type); +mlog (0 ,"id=%u, type=%d" , dquot->dq_id, type);/* In case user set some limits, sync dquot immediately to global * quota file so that information propagates quicker */
@@ -879,8 +877,6 @@ static int ocfs2_write_info(struct super_block *sb, int type)int status =0 ;struct ocfs2_mem_dqinfo *oinfo =sb_dqinfo (sb, type)->dqi_priv; -mlog_entry_void (); - status =ocfs2_lock_global_qf (oinfo,1 );if (status <0 ) goto out;
fs/ocfs2/quota_local.c +1 -1
@@ -475,7 +475,7 @@ static int ocfs2_recover_local_quota_file(struct inode *lqinode,struct ocfs2_recovery_chunk *rchunk, *next;qsize_t spacechange, inodechange; -mlog_entry ("ino=%lu type=%u" , (unsigned long )lqinode->i_ino, type); +mlog (0 ,"ino=%lu type=%u" , (unsigned long )lqinode->i_ino, type);list_for_each_entry_safe (rchunk, next, &(rec->r_list[type]), rc_list) { chunk = rchunk->rc_chunk;
fs/ocfs2/resize.c +2 -6
@@ -103,8 +103,8 @@ static int ocfs2_update_last_group_and_inode(handle_t *handle,u16 cl_bpc =le16_to_cpu (cl->cl_bpc);u16 cl_cpg =le16_to_cpu (cl->cl_cpg); -mlog_entry ("(new_clusters=%d, first_new_cluster = %u)\n" , - new_clusters, first_new_cluster); +mlog (0 ,"(new_clusters=%d, first_new_cluster = %u)\n" , + new_clusters, first_new_cluster); ret =ocfs2_journal_access_gd (handle,INODE_CACHE (bm_inode), group_bh,OCFS2_JOURNAL_ACCESS_WRITE );
@@ -281,8 +281,6 @@ int ocfs2_group_extend(struct inode * inode, int new_clusters)u32 first_new_cluster;u64 lgd_blkno; -mlog_entry_void (); -if (ocfs2_is_hard_readonly (osb) ||ocfs2_is_soft_readonly (osb))return -EROFS ;
@@ -472,8 +470,6 @@ int ocfs2_group_add(struct inode *inode, struct ocfs2_new_group_input *input)struct ocfs2_chain_rec *cr;u16 cl_bpc; -mlog_entry_void (); -if (ocfs2_is_hard_readonly (osb) ||ocfs2_is_soft_readonly (osb))return -EROFS ;
fs/ocfs2/slot_map.c +0 -2
@@ -475,8 +475,6 @@ int ocfs2_find_slot(struct ocfs2_super *osb)int slot;struct ocfs2_slot_info *si; -mlog_entry_void (); - si = osb->slot_info;spin_lock (&osb->osb_lock);
fs/ocfs2/suballoc.c +6 -29
@@ -389,8 +389,6 @@ static int ocfs2_block_group_fill(handle_t *handle,struct ocfs2_group_desc *bg = (struct ocfs2_group_desc *) bg_bh->b_data;struct super_block * sb = alloc_inode->i_sb; -mlog_entry_void (); -if (((unsigned long long ) bg_bh->b_blocknr) != group_blkno) { ocfs2_error(alloc_inode->i_sb, "group block (%llu) != " "b_blocknr (%llu)",
@@ -707,8 +705,6 @@ static int ocfs2_block_group_alloc(struct ocfs2_super *osb,BUG_ON (ocfs2_is_cluster_bitmap (alloc_inode)); -mlog_entry_void (); - cl = &fe->id2.i_chain; status = ocfs2_reserve_clusters_with_limit(osb, le16_to_cpu(cl->cl_cpg),
@@ -814,8 +810,6 @@ static int ocfs2_reserve_suballoc_bits(struct ocfs2_super *osb,struct ocfs2_dinode *fe;u32 free_bits; -mlog_entry_void (); - alloc_inode =ocfs2_get_system_file_inode (osb, type, slot);if (!alloc_inode) {mlog_errno (-EINVAL );
@@ -1189,8 +1183,6 @@ static int ocfs2_reserve_clusters_with_limit(struct ocfs2_super *osb, {int status; -mlog_entry_void (); - *ac =kzalloc (sizeof (struct ocfs2_alloc_context ),GFP_KERNEL );if (!(*ac)) { status = -ENOMEM ;
@@ -1357,8 +1349,6 @@ static inline int ocfs2_block_group_set_bits(handle_t *handle,void *bitmap = bg->bg_bitmap;int journal_type =OCFS2_JOURNAL_ACCESS_WRITE ; -mlog_entry_void (); -/* All callers get the descriptor via * ocfs2_read_group_descriptor(). Any corruption is a code bug. */ BUG_ON (!OCFS2_IS_VALID_GROUP_DESC (bg));
@@ -1888,8 +1878,6 @@ static int ocfs2_claim_suballoc_bits(struct ocfs2_alloc_context *ac,struct ocfs2_chain_list *cl;struct ocfs2_dinode *fe; -mlog_entry_void (); -BUG_ON (ac->ac_bits_given >= ac->ac_bits_wanted);BUG_ON (bits_wanted > (ac->ac_bits_wanted - ac->ac_bits_given));BUG_ON (!ac->ac_bh);
@@ -2201,8 +2189,6 @@ int ocfs2_claim_new_inode(handle_t *handle,int status;struct ocfs2_suballoc_result res; -mlog_entry_void (); -BUG_ON (!ac);BUG_ON (ac->ac_bits_given !=0 );BUG_ON (ac->ac_bits_wanted !=1 );
@@ -2307,8 +2293,6 @@ int __ocfs2_claim_clusters(handle_t *handle,struct ocfs2_suballoc_result res = { .sr_blkno =0 , };struct ocfs2_super *osb =OCFS2_SB (ac->ac_inode->i_sb); -mlog_entry_void (); -BUG_ON (ac->ac_bits_given >= ac->ac_bits_wanted); BUG_ON(ac->ac_which != OCFS2_AC_USE_LOCAL
@@ -2392,8 +2376,6 @@ static int ocfs2_block_group_clear_bits(handle_t *handle,unsigned int tmp;struct ocfs2_group_desc *undo_bg =NULL ; -mlog_entry_void (); -/* The caller got this descriptor from * ocfs2_read_group_descriptor(). Any corruption is a code bug. */ BUG_ON (!OCFS2_IS_VALID_GROUP_DESC (bg));
@@ -2463,8 +2445,6 @@ static int _ocfs2_free_suballoc_bits(handle_t *handle,struct buffer_head *group_bh =NULL ;struct ocfs2_group_desc *group; -mlog_entry_void (); -/* The alloc_bh comes from ocfs2_free_dinode() or * ocfs2_free_clusters(). The callers have all locked the * allocator and gotten alloc_bh from the lock call. This
@@ -2556,11 +2536,8 @@ static int _ocfs2_free_clusters(handle_t *handle,/* You can't ever have a contiguous set of clusters * bigger than a block group bitmap so we never have to worry -* about looping on them. */ - -mlog_entry_void (); - -/* This is expensive. We can safely remove once this stuff has +* about looping on them. +* This is expensive. We can safely remove once this stuff has * gotten tested really well. */ BUG_ON (start_blk !=ocfs2_clusters_to_blocks (bitmap_inode->i_sb,ocfs2_blocks_to_clusters (bitmap_inode->i_sb, start_blk)));
@@ -2756,7 +2733,7 @@ static int ocfs2_get_suballoc_slot_bit(struct ocfs2_super *osb, u64 blkno,struct buffer_head *inode_bh =NULL ;struct ocfs2_dinode *inode_fe; -mlog_entry ("blkno: %llu\n" , (unsigned long long )blkno); +mlog (0 ,"blkno: %llu\n" , (unsigned long long )blkno);/* dirty read disk */ status =ocfs2_read_blocks_sync (osb, blkno,1 , &inode_bh);
@@ -2816,8 +2793,8 @@ static int ocfs2_test_suballoc_bit(struct ocfs2_super *osb,u64 bg_blkno;int status; -mlog_entry ("blkno: %llu bit: %u\n" , (unsigned long long )blkno, - (unsigned int )bit); +mlog (0 ,"blkno: %llu bit: %u\n" , (unsigned long long )blkno, + (unsigned int )bit); alloc_di = (struct ocfs2_dinode *)alloc_bh->b_data;if ((bit +1 ) >ocfs2_bits_per_group (&alloc_di->id2.i_chain)) {
@@ -2869,7 +2846,7 @@ int ocfs2_test_inode_bit(struct ocfs2_super *osb, u64 blkno, int *res)struct inode *inode_alloc_inode;struct buffer_head *alloc_bh =NULL ; -mlog_entry ("blkno: %llu" , (unsigned long long )blkno); +mlog (0 ,"blkno: %llu" , (unsigned long long )blkno); status =ocfs2_get_suballoc_slot_bit (osb, blkno, &suballoc_slot, &group_blkno, &suballoc_bit);
fs/ocfs2/super.c +6 -26
@@ -442,8 +442,6 @@ static int ocfs2_init_global_system_inodes(struct ocfs2_super *osb)int status =0 ;int i; -mlog_entry_void (); - new =ocfs2_iget (osb, osb->root_blkno,OCFS2_FI_FLAG_SYSFILE ,0 );if (IS_ERR (new)) { status =PTR_ERR (new);
@@ -489,8 +487,6 @@ static int ocfs2_init_local_system_inodes(struct ocfs2_super *osb)int status =0 ;int i; -mlog_entry_void (); -for (i =OCFS2_LAST_GLOBAL_SYSTEM_INODE +1 ; i <NUM_SYSTEM_INODES ; i++) {
@@ -518,8 +514,6 @@ static void ocfs2_release_system_inodes(struct ocfs2_super *osb)int i;struct inode *inode; -mlog_entry_void (); -for (i =0 ; i <NUM_GLOBAL_SYSTEM_INODES ; i++) { inode = osb->global_system_inodes[i];if (inode) {
@@ -1027,7 +1021,7 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent)char nodestr[8 ];struct ocfs2_blockcheck_stats stats; -mlog_entry ("%p, %p, %i" , sb, data, silent); +mlog (0 ,"%p, %p, %i" , sb, data, silent);if (!ocfs2_parse_options (sb, data, &parsed_options,0 )) { status = -EINVAL ;
@@ -1318,8 +1312,8 @@ static int ocfs2_parse_options(struct super_block *sb,char *p;u32 tmp; -mlog_entry ("remount: %d, options: \"%s\"\n" , is_remount, - options ? options :"(none)" ); +mlog (0 ,"remount: %d, options: \"%s\"\n" , is_remount, + options ? options :"(none)" ); mopt->commit_interval =0 ; mopt->mount_opt =OCFS2_MOUNT_NOINTR ;
@@ -1615,8 +1609,6 @@ static int __init ocfs2_init(void) {int status; -mlog_entry_void (); -ocfs2_print_version (); status =init_ocfs2_uptodate_cache ();
@@ -1667,8 +1659,6 @@ leave: static void __exit ocfs2_exit(void) { -mlog_entry_void (); -ocfs2_quota_shutdown ();if (ocfs2_wq) {
@@ -1691,7 +1681,7 @@ static void __exit ocfs2_exit(void)static void ocfs2_put_super (struct super_block *sb) { -mlog_entry ("(0x%p)\n" , sb); +mlog (0 ,"(0x%p)\n" , sb);ocfs2_sync_blockdev (sb);ocfs2_dismount_volume (sb,0 );
@@ -1708,7 +1698,7 @@ static int ocfs2_statfs(struct dentry *dentry, struct kstatfs *buf)struct buffer_head *bh =NULL ;struct inode *inode =NULL ; -mlog_entry ("(%p, %p)\n" , dentry->d_sb, buf); +mlog (0 ,"(%p, %p)\n" , dentry->d_sb, buf); osb =OCFS2_SB (dentry->d_sb);
@@ -1875,8 +1865,6 @@ static int ocfs2_mount_volume(struct super_block *sb)int unlock_super =0 ;struct ocfs2_super *osb =OCFS2_SB (sb); -mlog_entry_void (); -if (ocfs2_is_hard_readonly (osb)) goto leave;
@@ -1931,7 +1919,7 @@ static void ocfs2_dismount_volume(struct super_block *sb, int mnt_err)struct ocfs2_super *osb =NULL ;char nodestr[8 ]; -mlog_entry ("(0x%p)\n" , sb); +mlog (0 ,"(0x%p)\n" , sb);BUG_ON (!sb); osb =OCFS2_SB (sb);
@@ -2083,8 +2071,6 @@ static int ocfs2_initialize_super(struct super_block *sb,struct ocfs2_super *osb;u64 total_blocks; -mlog_entry_void (); - osb =kzalloc (sizeof (struct ocfs2_super ),GFP_KERNEL );if (!osb) { status = -ENOMEM ;
@@ -2388,8 +2374,6 @@ static int ocfs2_verify_volume(struct ocfs2_dinode *di, {int status = -EAGAIN ; -mlog_entry_void (); -if (memcmp (di->i_signature,OCFS2_SUPER_BLOCK_SIGNATURE ,strlen (OCFS2_SUPER_BLOCK_SIGNATURE )) ==0 ) {/* We have to do a raw check of the feature here */
@@ -2457,8 +2441,6 @@ static int ocfs2_check_volume(struct ocfs2_super *osb)* recover * ourselves. */ -mlog_entry_void (); -/* Init our journal object. */ status =ocfs2_journal_init (osb->journal, &dirty);if (status <0 ) {
@@ -2553,8 +2535,6 @@ finally:*/ static void ocfs2_delete_osb (struct ocfs2_super *osb) { -mlog_entry_void (); -/* This function assumes that the caller has the main osb resource */ ocfs2_free_slot_info (osb);
fs/ocfs2/symlink.c +0 -6
@@ -62,8 +62,6 @@ static char *ocfs2_fast_symlink_getlink(struct inode *inode,char *link =NULL ;struct ocfs2_dinode *fe; -mlog_entry_void (); - status =ocfs2_read_inode_block (inode, bh);if (status <0 ) {mlog_errno (status);
@@ -88,8 +86,6 @@ static int ocfs2_readlink(struct dentry *dentry,struct buffer_head *bh =NULL ;struct inode *inode = dentry->d_inode; -mlog_entry_void (); - link =ocfs2_fast_symlink_getlink (inode, &bh);if (IS_ERR (link)) { ret =PTR_ERR (link);
@@ -117,8 +113,6 @@ static void *ocfs2_fast_follow_link(struct dentry *dentry,struct inode *inode = dentry->d_inode;struct buffer_head *bh =NULL ; -mlog_entry_void (); -BUG_ON (!ocfs2_inode_is_fast_symlink (inode)); target =ocfs2_fast_symlink_getlink (inode, &bh);if (IS_ERR (target)) {
fs/ocfs2/xattr.c +2 -2
@@ -5538,7 +5538,7 @@ static int ocfs2_xattr_set_entry_bucket(struct inode *inode,int ret;struct ocfs2_xa_loc loc; -mlog_entry ("Set xattr %s in xattr bucket\n" , xi->xi_name); +mlog (0 ,"Set xattr %s in xattr bucket\n" , xi->xi_name);ocfs2_init_xattr_bucket_xa_loc (&loc, xs->bucket, xs->not_found ?NULL : xs->here);
@@ -5581,7 +5581,7 @@ static int ocfs2_xattr_set_entry_index_block(struct inode *inode, {int ret; -mlog_entry ("Set xattr %s in xattr index block\n" , xi->xi_name); +mlog (0 ,"Set xattr %s in xattr index block\n" , xi->xi_name); ret =ocfs2_xattr_set_entry_bucket (inode, xi, xs, ctxt);if (!ret)
Signature · 1 line
1.7.1.GIT
PATCH 2/5 ocfs2: Remove ENTRY from masklog.
Quoted 8 lines · Tao Ma
ENTRY is used to record the entry of a function.
But because it is added in so many functions, if we enable it, the system logs get filled up quickly and cause too much I/O. So actually no one can open it for a production system or even for a test.So for
mlog_entry_void, we just remove it. formlog_entry(...), we replace it withmlog(0,...).
I'm not sure I like this. One of the benefits of mlog_entry()
was that you could turn on ML_xxx and not see these entry lines. By replacing it with mlog(0, ...), all of those entry lines will appear if the file is enabled.
I realize that many of them will be replaced in later patches.
I just hope they all are ;-)
Joel
Quoted 2,375 lines
Signed-off-by Tao Ma <[email protected]>--- fs/ocfs2/alloc.c | 28 +-------------- fs/ocfs2/aops.c | 16 ++++----- fs/ocfs2/buffer_head_io.c | 10 ++--- fs/ocfs2/cluster/heartbeat.c | 2 - fs/ocfs2/cluster/masklog.c | 1 - fs/ocfs2/cluster/masklog.h | 13 +------ fs/ocfs2/dcache.c | 4 +- fs/ocfs2/dir.c | 20 +++-------- fs/ocfs2/dlm/dlmast.c | 19 ++-------- fs/ocfs2/dlm/dlmconvert.c | 6 ++-- fs/ocfs2/dlm/dlmdomain.c | 8 ++-- fs/ocfs2/dlm/dlmlock.c | 10 ++---- fs/ocfs2/dlm/dlmmaster.c | 6 +--- fs/ocfs2/dlm/dlmrecovery.c | 4 -- fs/ocfs2/dlm/dlmthread.c | 8 ++-- fs/ocfs2/dlm/dlmunlock.c | 4 +-- fs/ocfs2/dlmglue.c | 78 ------------------------------------------ fs/ocfs2/export.c | 12 +++--- fs/ocfs2/extent_map.c | 8 ++-- fs/ocfs2/file.c | 73 +++++++++++++++++---------------------- fs/ocfs2/inode.c | 28 ++++++--------- fs/ocfs2/journal.c | 43 ++++++---------------- fs/ocfs2/localalloc.c | 26 +++----------- fs/ocfs2/mmap.c | 2 +- fs/ocfs2/namei.c | 74 +++++++++++++++++++--------------------- fs/ocfs2/quota_global.c | 14 +++----- fs/ocfs2/quota_local.c | 2 +- fs/ocfs2/resize.c | 8 +--- fs/ocfs2/slot_map.c | 2 - fs/ocfs2/suballoc.c | 35 +++--------------- fs/ocfs2/super.c | 32 +++-------------- fs/ocfs2/symlink.c | 6 --- fs/ocfs2/xattr.c | 4 +- 33 files changed, 168 insertions(+), 438 deletions(-)fs/ocfs2/alloc.c +2
-26@@ -965,8 +965,6 @@ int ocfs2_num_free_extents(struct ocfs2_super *osb,struct buffer_head *eb_bh =NULL ;u64 last_eb_blk =0 ; -mlog_entry_void (); - el = et->et_root_el; last_eb_blk =ocfs2_et_get_last_eb_blk (et);@@ -1010,8 +1008,6 @@ static int ocfs2_create_new_meta_bhs(handle_t *handle,OCFS2_SB (ocfs2_metadata_cache_get_super (et->et_ci));struct ocfs2_extent_block *eb; -mlog_entry_void (); - count =0 ;while (count < wanted) { status = ocfs2_claim_metadata(handle,@@ -1173,8 +1169,6 @@ static int ocfs2_add_branch(handle_t *handle,struct ocfs2_extent_list *el;u32 new_cpos, root_end; -mlog_entry_void (); -BUG_ON (!last_eb_bh || !*last_eb_bh);if (eb_bh) {@@ -1353,8 +1347,6 @@ static int ocfs2_shift_tree_depth(handle_t *handle,struct ocfs2_extent_list *root_el;struct ocfs2_extent_list *eb_el; -mlog_entry_void (); - status =ocfs2_create_new_meta_bhs (handle, et,1 , meta_ac, &new_eb_bh);if (status <0 ) {@@ -1446,8 +1438,6 @@ static int ocfs2_find_branch_target(struct ocfs2_extent_tree *et,struct buffer_head *bh =NULL ;struct buffer_head *lowest_bh =NULL ; -mlog_entry_void (); - *target_bh =NULL ; el = et->et_root_el;@@ -5795,8 +5785,8 @@ int ocfs2_truncate_log_append(struct ocfs2_super *osb,struct ocfs2_dinode *di;struct ocfs2_truncate_log *tl; -mlog_entry ("start_blk = %llu, num_clusters = %u\n" , - (unsigned long long )start_blk, num_clusters); +mlog (0 ,"start_blk = %llu, num_clusters = %u\n" , + (unsigned long long )start_blk, num_clusters);BUG_ON (mutex_trylock (&tl_inode->i_mutex));@@ -5877,8 +5867,6 @@ static int ocfs2_replay_truncate_records(struct ocfs2_super *osb,struct inode *tl_inode = osb->osb_tl_inode;struct buffer_head *tl_bh = osb->osb_tl_bh; -mlog_entry_void (); - di = (struct ocfs2_dinode *) tl_bh->b_data; tl = &di->id2.i_dealloc; i =le16_to_cpu (tl->tl_used) -1 ;@@ -5946,8 +5934,6 @@ int __ocfs2_flush_truncate_log(struct ocfs2_super *osb)struct ocfs2_dinode *di;struct ocfs2_truncate_log *tl; -mlog_entry_void (); -BUG_ON (mutex_trylock (&tl_inode->i_mutex)); di = (struct ocfs2_dinode *) tl_bh->b_data;@@ -6029,8 +6015,6 @@ static void ocfs2_truncate_log_worker(struct work_struct *work) container_of(work, struct ocfs2_super, osb_truncate_log_wq.work); -mlog_entry_void (); - status =ocfs2_flush_truncate_log (osb);if (status <0 )mlog_errno (status);@@ -6171,8 +6155,6 @@ int ocfs2_complete_truncate_log_recovery(struct ocfs2_super *osb,struct inode *tl_inode = osb->osb_tl_inode;struct ocfs2_truncate_log *tl; -mlog_entry_void (); -if (OCFS2_I (tl_inode)->ip_blkno ==le64_to_cpu (tl_copy->i_blkno)) {mlog (ML_ERROR ,"Asked to recover my own truncate log!\n" );return -EINVAL ;@@ -6225,8 +6207,6 @@ void ocfs2_truncate_log_shutdown(struct ocfs2_super *osb)int status;struct inode *tl_inode = osb->osb_tl_inode; -mlog_entry_void (); -if (tl_inode) {cancel_delayed_work (&osb->osb_truncate_log_wq);flush_workqueue (ocfs2_wq);@@ -6248,8 +6228,6 @@ int ocfs2_truncate_log_init(struct ocfs2_super *osb)struct inode *tl_inode =NULL ;struct buffer_head *tl_bh =NULL ; -mlog_entry_void (); - status = ocfs2_get_truncate_log_info(osb, osb->slot_num, &tl_inode,@@ -7002,8 +6980,6 @@ int ocfs2_commit_truncate(struct ocfs2_super *osb,struct ocfs2_extent_tree et;struct ocfs2_cached_dealloc_ctxt dealloc; -mlog_entry_void (); -ocfs2_init_dinode_extent_tree (&et,INODE_CACHE (inode), di_bh);ocfs2_init_dealloc_ctxt (&dealloc);fs/ocfs2/aops.c +7
-9@@ -59,8 +59,8 @@ static int ocfs2_symlink_get_block(struct inode *inode, sector_t iblock,struct ocfs2_super *osb =OCFS2_SB (inode->i_sb);void *kaddr; -mlog_entry ("(0x%p, %llu, 0x%p, %d)\n" , inode, - (unsigned long long )iblock, bh_result, create); +mlog (0 ,"(0x%p, %llu, 0x%p, %d)\n" , inode, + (unsigned long long )iblock, bh_result, create);BUG_ON (ocfs2_inode_is_fast_symlink (inode));@@ -136,8 +136,8 @@ int ocfs2_get_block(struct inode *inode, sector_t iblock,u64 p_blkno, count, past_eof;struct ocfs2_super *osb =OCFS2_SB (inode->i_sb); -mlog_entry ("(0x%p, %llu, 0x%p, %d)\n" , inode, - (unsigned long long )iblock, bh_result, create); +mlog (0 ,"(0x%p, %llu, 0x%p, %d)\n" , inode, + (unsigned long long )iblock, bh_result, create);if (OCFS2_I (inode)->ip_flags &OCFS2_INODE_SYSTEM_FILE ) mlog(ML_NOTICE, "get_block on system inode 0x%p (%lu)\n",@@ -278,7 +278,7 @@ static int ocfs2_readpage(struct file *file, struct page *page)loff_t start = (loff_t )page->index <<PAGE_CACHE_SHIFT ;int ret, unlock =1 ; -mlog_entry ("(0x%p, %lu)\n" , file, (page ? page->index :0 )); +mlog (0 ,"(0x%p, %lu)\n" , file, (page ? page->index :0 )); ret =ocfs2_inode_lock_with_page (inode,NULL ,0 , page);if (ret !=0 ) {@@ -398,7 +398,7 @@ static int ocfs2_writepage(struct page *page, struct writeback_control *wbc) {int ret; -mlog_entry ("(0x%p)\n" , page); +mlog (0 ,"(0x%p)\n" , page); ret =block_write_full_page (page, ocfs2_get_block, wbc);@@ -450,7 +450,7 @@ static sector_t ocfs2_bmap(struct address_space *mapping, sector_t block)int err =0 ;struct inode *inode = mapping->host; -mlog_entry ("(block = %llu)\n" , (unsigned long long )block); +mlog (0 ,"(block = %llu)\n" , (unsigned long long )block);/* We don't need to lock journal system files, since they aren't * accessed concurrently from multiple nodes. @@ -615,8 +615,6 @@ static ssize_t ocfs2_direct_IO(int rw,struct inode *inode = file->f_path.dentry->d_inode->i_mapping->host;int ret; -mlog_entry_void (); -/* * Fallback to buffered I/O if we see an inode without * extents. fs/ocfs2/buffer_head_io.c +4
-6@@ -55,8 +55,8 @@ int ocfs2_write_block(struct ocfs2_super *osb, struct buffer_head *bh, {int ret =0 ; -mlog_entry ("(bh->b_blocknr = %llu, ci=%p)\n" , - (unsigned long long )bh->b_blocknr, ci); +mlog (0 ,"(bh->b_blocknr = %llu, ci=%p)\n" , + (unsigned long long )bh->b_blocknr, ci);BUG_ON (bh->b_blocknr <OCFS2_SUPER_BLOCK_BLKNO );BUG_ON (buffer_jbd (bh));@@ -186,8 +186,8 @@ int ocfs2_read_blocks(struct ocfs2_caching_info *ci, u64 block, int nr,struct buffer_head *bh;struct super_block *sb =ocfs2_metadata_cache_get_super (ci); -mlog_entry ("(ci=%p, block=(%llu), nr=(%d), flags=%d)\n" , - ci, (unsigned long long )block, nr, flags); +mlog (0 ,"(ci=%p, block=(%llu), nr=(%d), flags=%d)\n" , + ci, (unsigned long long )block, nr, flags);BUG_ON (!ci); BUG_ON((flags & OCFS2_BH_READAHEAD) &&@@ -408,8 +408,6 @@ int ocfs2_write_super_or_backup(struct ocfs2_super *osb,int ret =0 ;struct ocfs2_dinode *di = (struct ocfs2_dinode *)bh->b_data; -mlog_entry_void (); -BUG_ON (buffer_jbd (bh));ocfs2_check_super_or_backup (osb->sb, bh->b_blocknr);fs/ocfs2/cluster/heartbeat.c +0
-2@@ -1603,8 +1603,6 @@ static int o2hb_populate_slot_data(struct o2hb_region *reg)struct o2hb_disk_slot *slot;struct o2hb_disk_heartbeat_block *hb_block; -mlog_entry_void (); - ret =o2hb_read_slots (reg, reg->hr_blocks);if (ret) {mlog_errno (ret);fs/ocfs2/cluster/masklog.c +0
-1@@ -80,7 +80,6 @@ struct mlog_attribute { }static struct mlog_attribute mlog_attrs[MLOG_MAX_BITS ] = { -define_mask (ENTRY ),define_mask (EXIT ),define_mask (TCP ),define_mask (MSG ),fs/ocfs2/cluster/masklog.h +1
-12@@ -82,7 +82,6 @@/* bits that are frequently given and infrequently matched in the low word */ /* NOTE: If you add a flag, you need to also update mlog.c! */ -#define ML_ENTRY 0x0000000000000001ULL/* func call entry */ #define ML_EXIT 0x0000000000000002ULL/* func call exit */ #define ML_TCP 0x0000000000000004ULL/* net cluster/tcp.c */ #define ML_MSG 0x0000000000000008ULL/* net network messages */ @@ -123,7 +122,7 @@#define ML_CLUSTER 0x0000001000000000ULL/* cluster stack */ #define MLOG_INITIAL_AND_MASK (ML_ERROR|ML_NOTICE) -#define MLOG_INITIAL_NOT_MASK (ML_ENTRY|ML_EXIT) +#define MLOG_INITIAL_NOT_MASK (ML_EXIT)#ifndef MLOG_MASK_PREFIX #define MLOG_MASK_PREFIX 0#endif @@ -222,14 +221,6 @@ extern struct mlog_bits mlog_and_bits, mlog_not_bits; } while (0)#if defined(CONFIG_OCFS2_DEBUG_MASKLOG ) -#define mlog_entry(fmt, args...) do { \ - mlog(ML_ENTRY, "ENTRY:" fmt , ##args); \ -} while (0) - -#define mlog_entry_void () do { \ - mlog(ML_ENTRY, "ENTRY:\n"); \ -} while (0) -/* * We disable this for sparse. */ @@ -266,8 +257,6 @@ extern struct mlog_bits mlog_and_bits, mlog_not_bits;mlog (ML_EXIT ,"EXIT\n" ); \ } while (0) #else -#define mlog_entry (...) do { } while (0) -#define mlog_entry_void (...) do { } while (0)#define mlog_exit (...) do { } while (0)#define mlog_exit_ptr (...) do { } while (0)#define mlog_exit_void (...) do { } while (0)fs/ocfs2/dcache.c +2
-2@@ -56,8 +56,8 @@ static int ocfs2_dentry_revalidate(struct dentry *dentry,int ret =0 ;/* if all else fails, just return false */ struct ocfs2_super *osb =OCFS2_SB (dentry->d_sb); -mlog_entry ("(0x%p, '%.*s')\n" , dentry, - dentry->d_name.len, dentry->d_name.name); +mlog (0 ,"(0x%p, '%.*s')\n" , dentry, + dentry->d_name.len, dentry->d_name.name);/* For a negative dentry - * check the generation number of the parent and compare with the fs/ocfs2/dir.c +5
-15@@ -367,8 +367,6 @@ static int inline ocfs2_search_dirblock(struct buffer_head *bh,int de_len;int ret =0 ; -mlog_entry_void (); - de_buf = first_de; dlimit = de_buf + bytes;@@ -706,8 +704,6 @@ static struct buffer_head *ocfs2_find_entry_el(const char *name, int namelen,int num =0 ;int nblocks, i, err; -mlog_entry_void (); - sb = dir->i_sb; nblocks =i_size_read (dir) >> sb->s_blocksize_bits;@@ -1166,7 +1162,7 @@ static int __ocfs2_delete_entry(handle_t *handle, struct inode *dir,int i, status = -ENOENT ;ocfs2_journal_access_func access = ocfs2_journal_access_db; -mlog_entry ("(0x%p, 0x%p, 0x%p, 0x%p)\n" , handle, dir, de_del, bh); +mlog (0 ,"(0x%p, 0x%p, 0x%p, 0x%p)\n" , handle, dir, de_del, bh);if (OCFS2_I (dir)->ip_dyn_features &OCFS2_INLINE_DATA_FL ) access = ocfs2_journal_access_di;@@ -1632,8 +1628,6 @@ int __ocfs2_add_entry(handle_t *handle,struct buffer_head *insert_bh = lookup->dl_leaf_bh;char *data_start = insert_bh->b_data; -mlog_entry_void (); -if (!namelen)return -EINVAL ;@@ -2028,8 +2022,8 @@ int ocfs2_readdir(struct file * filp, void * dirent, filldir_t filldir)struct inode *inode = filp->f_path.dentry->d_inode;int lock_level =0 ; -mlog_entry ("dirino=%llu\n" , - (unsigned long long )OCFS2_I (inode)->ip_blkno); +mlog (0 ,"dirino=%llu\n" , + (unsigned long long )OCFS2_I (inode)->ip_blkno); error =ocfs2_inode_lock_atime (inode, filp->f_vfsmnt, &lock_level);if (lock_level && error >=0 ) {@@ -2114,8 +2108,8 @@ int ocfs2_check_dir_for_entry(struct inode *dir,int ret;struct ocfs2_dir_lookup_result lookup = {NULL , }; -mlog_entry ("dir %llu, name '%.*s'\n" , - (unsigned long long )OCFS2_I (dir)->ip_blkno, namelen, name); +mlog (0 ,"dir %llu, name '%.*s'\n" , + (unsigned long long )OCFS2_I (dir)->ip_blkno, namelen, name); ret = -EEXIST ;if (ocfs2_find_entry (name, namelen, dir, &lookup) ==0 )@@ -2324,8 +2318,6 @@ static int ocfs2_fill_new_dir_el(struct ocfs2_super *osb,struct buffer_head *new_bh =NULL ;struct ocfs2_dir_entry *de; -mlog_entry_void (); -if (ocfs2_new_dir_wants_trailer (inode)) size =ocfs2_dir_trailer_blk_off (parent->i_sb);@@ -3268,8 +3260,6 @@ static int ocfs2_extend_dir(struct ocfs2_super *osb,struct ocfs2_extent_tree et;struct buffer_head *dx_root_bh = lookup->dl_dx_root_bh; -mlog_entry_void (); -if (OCFS2_I (dir)->ip_dyn_features &OCFS2_INLINE_DATA_FL ) {/* * This would be a code error as an inline directory should fs/ocfs2/dlm/dlmast.c +3
-16@@ -90,8 +90,6 @@ static int dlm_should_cancel_bast(struct dlm_ctxt *dlm, struct dlm_lock *lock)void __dlm_queue_ast (struct dlm_ctxt *dlm,struct dlm_lock *lock) { -mlog_entry_void (); -BUG_ON (!dlm);BUG_ON (!lock);@@ -134,8 +132,6 @@ void __dlm_queue_ast(struct dlm_ctxt *dlm, struct dlm_lock *lock)void dlm_queue_ast (struct dlm_ctxt *dlm,struct dlm_lock *lock) { -mlog_entry_void (); -BUG_ON (!dlm);BUG_ON (!lock);@@ -147,8 +143,6 @@ void dlm_queue_ast(struct dlm_ctxt *dlm, struct dlm_lock *lock)void __dlm_queue_bast (struct dlm_ctxt *dlm,struct dlm_lock *lock) { -mlog_entry_void (); -BUG_ON (!dlm);BUG_ON (!lock);assert_spin_locked (&dlm->ast_lock);@@ -167,8 +161,6 @@ void __dlm_queue_bast(struct dlm_ctxt *dlm, struct dlm_lock *lock)void dlm_queue_bast (struct dlm_ctxt *dlm,struct dlm_lock *lock) { -mlog_entry_void (); -BUG_ON (!dlm);BUG_ON (!lock);@@ -213,8 +205,6 @@ void dlm_do_local_ast(struct dlm_ctxt *dlm, struct dlm_lock_resource *res,dlm_astlockfunc_t *fn;struct dlm_lockstatus *lksb; -mlog_entry_void (); - lksb = lock->lksb; fn = lock->ast;BUG_ON (lock->ml.node != dlm->node_num);@@ -231,8 +221,6 @@ int dlm_do_remote_ast(struct dlm_ctxt *dlm, struct dlm_lock_resource *res,struct dlm_lockstatus *lksb;int lksbflags; -mlog_entry_void (); - lksb = lock->lksb;BUG_ON (lock->ml.node == dlm->node_num);@@ -250,7 +238,6 @@ void dlm_do_local_bast(struct dlm_ctxt *dlm, struct dlm_lock_resource *res, {dlm_bastlockfunc_t *fn = lock->bast; -mlog_entry_void ();BUG_ON (lock->ml.node != dlm->node_num); (*fn)(lock->astdata, blocked_type);@@ -426,9 +413,9 @@ int dlm_send_proxy_ast_msg(struct dlm_ctxt *dlm, struct dlm_lock_resource *res,size_t veclen =1 ;int status; -mlog_entry ("res %.*s, to=%u, type=%d, blocked_type=%d\n" , - res->lockname.len, res->lockname.name, lock->ml.node, - msg_type, blocked_type); +mlog (0 ,"res %.*s, to=%u, type=%d, blocked_type=%d\n" , + res->lockname.len, res->lockname.name, lock->ml.node, + msg_type, blocked_type);memset (&past,0 ,sizeof (struct dlm_proxy_ast )); past.node_idx = dlm->node_num;fs/ocfs2/dlm/dlmconvert.c +3
-3@@ -128,8 +128,8 @@ static enum dlm_status __dlmconvert_master(struct dlm_ctxt *dlm,assert_spin_locked (&res->spinlock); -mlog_entry ("type=%d, convert_type=%d, new convert_type=%d\n" , - lock->ml.type, lock->ml.convert_type, type); +mlog (0 ,"type=%d, convert_type=%d, new convert_type=%d\n" , + lock->ml.type, lock->ml.convert_type, type);spin_lock (&lock->spinlock);@@ -353,7 +353,7 @@ static enum dlm_status dlm_send_remote_convert_request(struct dlm_ctxt *dlm,struct kvec vec[2 ];size_t veclen =1 ; -mlog_entry ("%.*s\n" , res->lockname.len, res->lockname.name); +mlog (0 ,"%.*s\n" , res->lockname.len, res->lockname.name);memset (&convert,0 ,sizeof (struct dlm_convert_lock )); convert.node_idx = dlm->node_num;fs/ocfs2/dlm/dlmdomain.c +4
-4@@ -188,7 +188,7 @@ struct dlm_lock_resource * __dlm_lookup_lockres_full(struct dlm_ctxt *dlm,struct hlist_head *bucket;struct hlist_node *list; -mlog_entry ("%.*s\n" , len, name); +mlog (0 ,"%.*s\n" , len, name);assert_spin_locked (&dlm->spinlock);@@ -222,7 +222,7 @@ struct dlm_lock_resource * __dlm_lookup_lockres(struct dlm_ctxt *dlm, {struct dlm_lock_resource *res =NULL ; -mlog_entry ("%.*s\n" , len, name); +mlog (0 ,"%.*s\n" , len, name);assert_spin_locked (&dlm->spinlock);@@ -533,7 +533,7 @@ static int dlm_exit_domain_handler(struct o2net_msg *msg, u32 len, void *data,unsigned int node;struct dlm_exit_domain *exit_msg = (struct dlm_exit_domain *) msg->buf; -mlog_entry ("%p %u %p" , msg, len, data); +mlog (0 ,"%p %u %p" , msg, len, data);if (!dlm_grab (dlm))return 0 ;@@ -1555,7 +1555,7 @@ static int dlm_try_to_join_domain(struct dlm_ctxt *dlm)struct domain_join_ctxt *ctxt;enum dlm_query_join_response_code response =JOIN_DISALLOW ; -mlog_entry ("%p" , dlm); +mlog (0 ,"%p" , dlm); ctxt =kzalloc (sizeof (*ctxt),GFP_KERNEL );if (!ctxt) {fs/ocfs2/dlm/dlmlock.c +3
-7@@ -125,7 +125,7 @@ static enum dlm_status dlmlock_master(struct dlm_ctxt *dlm,int call_ast =0 , kick_thread =0 ;enum dlm_status status =DLM_NORMAL ; -mlog_entry ("type=%d\n" , lock->ml.type); +mlog (0 ,"type=%d\n" , lock->ml.type);spin_lock (&res->spinlock);/* if called from dlm_create_lock_handler, need to @@ -224,8 +224,8 @@ static enum dlm_status dlmlock_remote(struct dlm_ctxt *dlm,enum dlm_status status =DLM_DENIED ;int lockres_changed =1 ; -mlog_entry ("type=%d\n" , lock->ml.type); -mlog (0 ,"lockres %.*s, flags = 0x%x\n" , res->lockname.len, +mlog (0 ,"type=%d, lockres %.*s, flags = 0x%x\n" , + lock->ml.type, res->lockname.len, res->lockname.name, flags);spin_lock (&res->spinlock);@@ -305,8 +305,6 @@ static enum dlm_status dlm_send_remote_lock_request(struct dlm_ctxt *dlm,int tmpret, status =0 ;enum dlm_status ret; -mlog_entry_void (); -memset (&create,0 ,sizeof (create)); create.node_idx = dlm->node_num; create.requested_type = lock->ml.type;@@ -474,8 +472,6 @@ int dlm_create_lock_handler(struct o2net_msg *msg, u32 len, void *data,BUG_ON (!dlm); -mlog_entry_void (); -if (!dlm_grab (dlm))return DLM_REJECTED ;fs/ocfs2/dlm/dlmmaster.c +1
-5@@ -426,8 +426,6 @@ static void dlm_mle_release(struct kref *kref)struct dlm_master_list_entry *mle;struct dlm_ctxt *dlm; -mlog_entry_void (); - mle = container_of(kref, struct dlm_master_list_entry, mle_refs); dlm = mle->dlm;@@ -3106,8 +3104,6 @@ static int dlm_add_migration_mle(struct dlm_ctxt *dlm, *oldmle =NULL ; -mlog_entry_void (); -assert_spin_locked (&dlm->spinlock);assert_spin_locked (&dlm->master_lock);@@ -3247,7 +3243,7 @@ void dlm_clean_master_list(struct dlm_ctxt *dlm, u8 dead_node)struct hlist_node *list;unsigned int i; -mlog_entry ("dlm=%s, dead node=%u\n" , dlm->name, dead_node); +mlog (0 ,"dlm=%s, dead node=%u\n" , dlm->name, dead_node); top:assert_spin_locked (&dlm->spinlock);fs/ocfs2/dlm/dlmrecovery.c +0
-4@@ -2083,8 +2083,6 @@ static void dlm_finish_local_lockres_recovery(struct dlm_ctxt *dlm,struct hlist_head *bucket;struct dlm_lock_resource *res, *next; -mlog_entry_void (); -assert_spin_locked (&dlm->spinlock);list_for_each_entry_safe (res, next, &dlm->reco.resources, recovering) {@@ -2607,8 +2605,6 @@ static int dlm_send_begin_reco_message(struct dlm_ctxt *dlm, u8 dead_node)int nodenum;int status; -mlog_entry ("%u\n" , dead_node); -mlog (0 ,"%s: dead node is %u\n" , dlm->name, dead_node);spin_lock (&dlm->spinlock);fs/ocfs2/dlm/dlmthread.c +4
-4@@ -122,7 +122,7 @@ int __dlm_lockres_unused(struct dlm_lock_resource *res)void __dlm_lockres_calc_usage (struct dlm_ctxt *dlm,struct dlm_lock_resource *res) { -mlog_entry ("%.*s\n" , res->lockname.len, res->lockname.name); +mlog (0 ,"%.*s\n" , res->lockname.len, res->lockname.name);assert_spin_locked (&dlm->spinlock);assert_spin_locked (&res->spinlock);@@ -150,7 +150,7 @@ void __dlm_lockres_calc_usage(struct dlm_ctxt *dlm,void dlm_lockres_calc_usage (struct dlm_ctxt *dlm,struct dlm_lock_resource *res) { -mlog_entry ("%.*s\n" , res->lockname.len, res->lockname.name); +mlog (0 ,"%.*s\n" , res->lockname.len, res->lockname.name);spin_lock (&dlm->spinlock);spin_lock (&res->spinlock);@@ -453,7 +453,7 @@ leave:/* must have NO locks when calling this with res !=NULL * */ void dlm_kick_thread (struct dlm_ctxt *dlm,struct dlm_lock_resource *res) { -mlog_entry ("dlm=%p, res=%p\n" , dlm, res); +mlog (0 ,"dlm=%p, res=%p\n" , dlm, res);if (res) {spin_lock (&dlm->spinlock);spin_lock (&res->spinlock);@@ -466,7 +466,7 @@ void dlm_kick_thread(struct dlm_ctxt *dlm, struct dlm_lock_resource *res)void __dlm_dirty_lockres (struct dlm_ctxt *dlm,struct dlm_lock_resource *res) { -mlog_entry ("dlm=%p, res=%p\n" , dlm, res); +mlog (0 ,"dlm=%p, res=%p\n" , dlm, res);assert_spin_locked (&dlm->spinlock);assert_spin_locked (&res->spinlock);fs/ocfs2/dlm/dlmunlock.c +1
-3@@ -317,7 +317,7 @@ static enum dlm_status dlm_send_remote_unlock_request(struct dlm_ctxt *dlm,struct kvec vec[2 ];size_t veclen =1 ; -mlog_entry ("%.*s\n" , res->lockname.len, res->lockname.name); +mlog (0 ,"%.*s\n" , res->lockname.len, res->lockname.name);if (owner == dlm->node_num) {/* ended up trying to contact ourself. this means @@ -588,8 +588,6 @@ enum dlm_status dlmunlock(struct dlm_ctxt *dlm, struct dlm_lockstatus *lksb,struct dlm_lock *lock =NULL ;int call_ast, is_master; -mlog_entry_void (); -if (!lksb) {dlm_error (DLM_BADARGS );return DLM_BADARGS ;fs/ocfs2/dlmglue.c +0
-78@@ -397,8 +397,6 @@ static void ocfs2_build_lock_name(enum ocfs2_lock_type type, {int len; -mlog_entry_void (); -BUG_ON (type >=OCFS2_NUM_LOCK_TYPES ); len = snprintf(name, OCFS2_LOCK_ID_MAX_LEN, "%c%s%016llx%08x",@@ -729,8 +727,6 @@ void ocfs2_refcount_lock_res_init(struct ocfs2_lock_res *lockres,void ocfs2_lock_res_free (struct ocfs2_lock_res *res) { -mlog_entry_void (); -if (!(res->l_flags &OCFS2_LOCK_INITIALIZED ))return ;@@ -762,8 +758,6 @@ void ocfs2_lock_res_free(struct ocfs2_lock_res *res)static inline void ocfs2_inc_holders (struct ocfs2_lock_res *lockres,int level) { -mlog_entry_void (); -BUG_ON (!lockres);switch (level) {@@ -783,8 +777,6 @@ static inline void ocfs2_inc_holders(struct ocfs2_lock_res *lockres,static inline void ocfs2_dec_holders (struct ocfs2_lock_res *lockres,int level) { -mlog_entry_void (); -BUG_ON (!lockres);switch (level) {@@ -846,8 +838,6 @@ static void lockres_clear_flags(struct ocfs2_lock_res *lockres,static inline void ocfs2_generic_handle_downconvert_action (struct ocfs2_lock_res *lockres) { -mlog_entry_void (); -BUG_ON (!(lockres->l_flags &OCFS2_LOCK_BUSY ));BUG_ON (!(lockres->l_flags &OCFS2_LOCK_ATTACHED ));BUG_ON (!(lockres->l_flags &OCFS2_LOCK_BLOCKED ));@@ -866,8 +856,6 @@ static inline void ocfs2_generic_handle_downconvert_action(struct ocfs2_lock_resstatic inline void ocfs2_generic_handle_convert_action (struct ocfs2_lock_res *lockres) { -mlog_entry_void (); -BUG_ON (!(lockres->l_flags &OCFS2_LOCK_BUSY ));BUG_ON (!(lockres->l_flags &OCFS2_LOCK_ATTACHED ));@@ -895,8 +883,6 @@ static inline void ocfs2_generic_handle_convert_action(struct ocfs2_lock_res *lostatic inline void ocfs2_generic_handle_attach_action (struct ocfs2_lock_res *lockres) { -mlog_entry_void (); -BUG_ON ((!(lockres->l_flags &OCFS2_LOCK_BUSY )));BUG_ON (lockres->l_flags &OCFS2_LOCK_ATTACHED );@@ -916,7 +902,6 @@ static int ocfs2_generic_handle_bast(struct ocfs2_lock_res *lockres, int level) {int needs_downconvert =0 ; -mlog_entry_void ();assert_spin_locked (&lockres->l_lock);@@ -1151,8 +1136,6 @@ static void ocfs2_unlock_ast(struct ocfs2_dlm_lksb *lksb, int error)struct ocfs2_lock_res *lockres =ocfs2_lksb_to_lock_res (lksb);unsigned long flags; -mlog_entry_void (); -mlog (ML_BASTS ,"UNLOCK AST fired for lockres %s, action = %d\n" , lockres->l_name, lockres->l_unlock_action);@@ -1233,7 +1216,6 @@ static inline void ocfs2_recover_from_dlm_error(struct ocfs2_lock_res *lockres, {unsigned long flags; -mlog_entry_void ();spin_lock_irqsave (&lockres->l_lock, flags);lockres_clear_flags (lockres,OCFS2_LOCK_BUSY );lockres_clear_flags (lockres,OCFS2_LOCK_UPCONVERT_FINISHING );@@ -1260,8 +1242,6 @@ static int ocfs2_lock_create(struct ocfs2_super *osb,unsigned long flags;unsigned int gen; -mlog_entry_void (); -mlog (0 ,"lock %s, level = %d, flags = %u\n" , lockres->l_name, level, dlm_flags);@@ -1416,8 +1396,6 @@ static int __ocfs2_cluster_lock(struct ocfs2_super *osb,unsigned int gen;int noqueue_attempted =0 ; -mlog_entry_void (); -ocfs2_init_mask_waiter (&mw);if (lockres->l_ops->flags &LOCK_TYPE_USES_LVB )@@ -1605,7 +1583,6 @@ static void __ocfs2_cluster_unlock(struct ocfs2_super *osb, {unsigned long flags; -mlog_entry_void ();spin_lock_irqsave (&lockres->l_lock, flags);ocfs2_dec_holders (lockres, level);ocfs2_downconvert_on_unlock (osb, lockres);@@ -1648,8 +1625,6 @@ int ocfs2_create_new_inode_locks(struct inode *inode)BUG_ON (!inode);BUG_ON (!ocfs2_inode_is_new (inode)); -mlog_entry_void (); -mlog (0 ,"Inode %llu\n" , (unsigned long long )OCFS2_I (inode)->ip_blkno);/* NOTE: That we don't increment any of the holder counts, nor @@ -1695,8 +1670,6 @@ int ocfs2_rw_lock(struct inode *inode, int write)BUG_ON (!inode); -mlog_entry_void (); -mlog (0 ,"inode %llu take %s RW lock\n" , (unsigned long long )OCFS2_I (inode)->ip_blkno, write ?"EXMODE" :"PRMODE" );@@ -1725,8 +1698,6 @@ void ocfs2_rw_unlock(struct inode *inode, int write)struct ocfs2_lock_res *lockres = &OCFS2_I (inode)->ip_rw_lockres;struct ocfs2_super *osb =OCFS2_SB (inode->i_sb); -mlog_entry_void (); -mlog (0 ,"inode %llu drop %s RW lock\n" , (unsigned long long )OCFS2_I (inode)->ip_blkno, write ?"EXMODE" :"PRMODE" );@@ -1748,8 +1719,6 @@ int ocfs2_open_lock(struct inode *inode)BUG_ON (!inode); -mlog_entry_void (); -mlog (0 ,"inode %llu take PRMODE open lock\n" , (unsigned long long )OCFS2_I (inode)->ip_blkno);@@ -1776,8 +1745,6 @@ int ocfs2_try_open_lock(struct inode *inode, int write)BUG_ON (!inode); -mlog_entry_void (); -mlog (0 ,"inode %llu try to take %s open lock\n" , (unsigned long long )OCFS2_I (inode)->ip_blkno, write ?"EXMODE" :"PRMODE" );@@ -1811,8 +1778,6 @@ void ocfs2_open_unlock(struct inode *inode)struct ocfs2_lock_res *lockres = &OCFS2_I (inode)->ip_open_lockres;struct ocfs2_super *osb =OCFS2_SB (inode->i_sb); -mlog_entry_void (); -mlog (0 ,"inode %llu drop open lock\n" , (unsigned long long )OCFS2_I (inode)->ip_blkno);@@ -2043,8 +2008,6 @@ static void ocfs2_downconvert_on_unlock(struct ocfs2_super *osb, {int kick =0 ; -mlog_entry_void (); -/* If we know that another node is waiting on our lock, kick * the downconvert thread * pre-emptively when we reach a release * condition. */ @@ -2095,8 +2058,6 @@ static void __ocfs2_stuff_meta_lvb(struct inode *inode)struct ocfs2_lock_res *lockres = &oi->ip_inode_lockres;struct ocfs2_meta_lvb *lvb; -mlog_entry_void (); - lvb =ocfs2_dlm_lvb (&lockres->l_lksb);/* @@ -2145,8 +2106,6 @@ static void ocfs2_refresh_inode_from_lvb(struct inode *inode)struct ocfs2_lock_res *lockres = &oi->ip_inode_lockres;struct ocfs2_meta_lvb *lvb; -mlog_entry_void (); -mlog_meta_lvb (0 , lockres); lvb =ocfs2_dlm_lvb (&lockres->l_lksb);@@ -2205,8 +2164,6 @@ static int ocfs2_should_refresh_lock_res(struct ocfs2_lock_res *lockres)unsigned long flags;int status =0 ; -mlog_entry_void (); - refresh_check:spin_lock_irqsave (&lockres->l_lock, flags);if (!(lockres->l_flags &OCFS2_LOCK_NEEDS_REFRESH )) {@@ -2237,7 +2194,6 @@ static inline void ocfs2_complete_lock_res_refresh(struct ocfs2_lock_res *lockre int status) {unsigned long flags; -mlog_entry_void ();spin_lock_irqsave (&lockres->l_lock, flags);lockres_clear_flags (lockres,OCFS2_LOCK_REFRESHING );@@ -2260,8 +2216,6 @@ static int ocfs2_inode_lock_update(struct inode *inode,struct ocfs2_dinode *fe;struct ocfs2_super *osb =OCFS2_SB (inode->i_sb); -mlog_entry_void (); -if (ocfs2_mount_local (osb)) goto bail;@@ -2374,8 +2328,6 @@ int ocfs2_inode_lock_full_nested(struct inode *inode,BUG_ON (!inode); -mlog_entry_void (); -mlog (0 ,"inode %llu, take %s META lock\n" , (unsigned long long )OCFS2_I (inode)->ip_blkno, ex ?"EXMODE" :"PRMODE" );@@ -2517,7 +2469,6 @@ int ocfs2_inode_lock_atime(struct inode *inode, {int ret; -mlog_entry_void (); ret =ocfs2_inode_lock (inode,NULL ,0 );if (ret <0 ) {mlog_errno (ret);@@ -2556,8 +2507,6 @@ void ocfs2_inode_unlock(struct inode *inode,struct ocfs2_lock_res *lockres = &OCFS2_I (inode)->ip_inode_lockres;struct ocfs2_super *osb =OCFS2_SB (inode->i_sb); -mlog_entry_void (); -mlog (0 ,"inode %llu drop %s META lock\n" , (unsigned long long )OCFS2_I (inode)->ip_blkno, ex ?"EXMODE" :"PRMODE" );@@ -2617,8 +2566,6 @@ int ocfs2_super_lock(struct ocfs2_super *osb,int level = ex ?DLM_LOCK_EX :DLM_LOCK_PR ;struct ocfs2_lock_res *lockres = &osb->osb_super_lockres; -mlog_entry_void (); -if (ocfs2_is_hard_readonly (osb))return -EROFS ;@@ -3054,8 +3001,6 @@ int ocfs2_dlm_init(struct ocfs2_super *osb)int status =0 ;struct ocfs2_cluster_connection *conn =NULL ; -mlog_entry_void (); -if (ocfs2_mount_local (osb)) { osb->node_num =0 ; goto local;@@ -3119,8 +3064,6 @@ bail:void ocfs2_dlm_shutdown (struct ocfs2_super *osb,int hangup_pending) { -mlog_entry_void (); -ocfs2_drop_osb_locks (osb);/* @@ -3284,8 +3227,6 @@ int ocfs2_drop_inode_locks(struct inode *inode) {int status, err; -mlog_entry_void (); -/* No need to call ocfs2_mark_lockres_freeing here - * ocfs2_clear_inode has done it for us. */ @@ -3352,8 +3293,6 @@ static int ocfs2_downconvert_lock(struct ocfs2_super *osb,int ret;u32 dlm_flags =DLM_LKF_CONVERT ; -mlog_entry_void (); -mlog (ML_BASTS ,"lockres %s, level %d => %d\n" , lockres->l_name, lockres->l_level, new_level);@@ -3385,8 +3324,6 @@ static int ocfs2_prepare_cancel_convert(struct ocfs2_super *osb, {assert_spin_locked (&lockres->l_lock); -mlog_entry_void (); -if (lockres->l_unlock_action ==OCFS2_UNLOCK_CANCEL_CONVERT ) {/* If we're already trying to cancel a lock conversion * then just drop the spinlock and allow the caller to @@ -3416,8 +3353,6 @@ static int ocfs2_cancel_convert(struct ocfs2_super *osb, {int ret; -mlog_entry_void (); - ret =ocfs2_dlm_unlock (osb->cconn, &lockres->l_lksb,DLM_LKF_CANCEL );if (ret) {@@ -3443,8 +3378,6 @@ static int ocfs2_unblock_lock(struct ocfs2_super *osb,int set_lvb =0 ;unsigned int gen; -mlog_entry_void (); -spin_lock_irqsave (&lockres->l_lock, flags); recheck:@@ -3859,8 +3792,6 @@ static void ocfs2_set_qinfo_lvb(struct ocfs2_lock_res *lockres)struct mem_dqinfo *info =sb_dqinfo (oinfo->dqi_gi.dqi_sb, oinfo->dqi_gi.dqi_type); -mlog_entry_void (); - lvb =ocfs2_dlm_lvb (&lockres->l_lksb); lvb->lvb_version =OCFS2_QINFO_LVB_VERSION ; lvb->lvb_bgrace =cpu_to_be32 (info->dqi_bgrace);@@ -3879,7 +3810,6 @@ void ocfs2_qinfo_unlock(struct ocfs2_mem_dqinfo *oinfo, int ex)struct ocfs2_super *osb =OCFS2_SB (oinfo->dqi_gi.dqi_sb);int level = ex ?DLM_LOCK_EX :DLM_LOCK_PR ; -mlog_entry_void ();if (!ocfs2_is_hard_readonly (osb) && !ocfs2_mount_local (osb))ocfs2_cluster_unlock (osb, lockres, level);mlog_exit_void ();@@ -3937,8 +3867,6 @@ int ocfs2_qinfo_lock(struct ocfs2_mem_dqinfo *oinfo, int ex)int level = ex ?DLM_LOCK_EX :DLM_LOCK_PR ;int status =0 ; -mlog_entry_void (); -/* On RO devices, locking really isn't needed... */ if (ocfs2_is_hard_readonly (osb)) {if (ex)@@ -4007,8 +3935,6 @@ static void ocfs2_process_blocked_lock(struct ocfs2_super *osb,* considered valid until we remove the OCFS2_LOCK_QUEUED * flag. */ -mlog_entry_void (); -BUG_ON (!lockres);BUG_ON (!lockres->l_ops);@@ -4049,8 +3975,6 @@ unqueue:static void ocfs2_schedule_blocked_lock (struct ocfs2_super *osb,struct ocfs2_lock_res *lockres) { -mlog_entry_void (); -assert_spin_locked (&lockres->l_lock);if (lockres->l_flags &OCFS2_LOCK_FREEING ) {@@ -4080,8 +4004,6 @@ static void ocfs2_downconvert_thread_do_work(struct ocfs2_super *osb)unsigned long processed;struct ocfs2_lock_res *lockres; -mlog_entry_void (); -spin_lock (&osb->dc_task_lock);/* grab this early so we know to try again if a state change and * wake happens part-way through our work */ fs/ocfs2/export.c +6
-6@@ -56,7 +56,7 @@ static struct dentry *ocfs2_get_dentry(struct super_block *sb,int status, set;struct dentry *result; -mlog_entry ("(0x%p, 0x%p)\n" , sb, handle); +mlog (0 ,"(0x%p, 0x%p)\n" , sb, handle);if (blkno ==0 ) {mlog (0 ,"nfs wants inode with blkno: 0\n" );@@ -154,8 +154,8 @@ static struct dentry *ocfs2_get_parent(struct dentry *child)struct dentry *parent;struct inode *dir = child->d_inode; -mlog_entry ("(0x%p, '%.*s')\n" , child, - child->d_name.len, child->d_name.name); +mlog (0 ,"(0x%p, '%.*s')\n" , child, + child->d_name.len, child->d_name.name);mlog (0 ,"find parent of directory %llu\n" , (unsigned long long )OCFS2_I (dir)->ip_blkno);@@ -197,9 +197,9 @@ static int ocfs2_encode_fh(struct dentry *dentry, u32 *fh_in, int *max_len,u32 generation;__le32 *fh = (__force __le32 *) fh_in; -mlog_entry ("(0x%p, '%.*s', 0x%p, %d, %d)\n" , dentry, - dentry->d_name.len, dentry->d_name.name, - fh, len, connectable); +mlog (0 ,"(0x%p, '%.*s', 0x%p, %d, %d)\n" , dentry, + dentry->d_name.len, dentry->d_name.name, + fh, len, connectable);if (len <3 || (connectable && len <6 )) {mlog (ML_ERROR ,"fh buffer is too small for encoding\n" );fs/ocfs2/extent_map.c +4
-4@@ -841,10 +841,10 @@ int ocfs2_read_virt_blocks(struct inode *inode, u64 v_block, int nr,u64 p_block, p_count;int i, count, done =0 ; -mlog_entry ("(inode = %p, v_block = %llu, nr = %d, bhs = %p, " -"flags = %x, validate = %p)\n" , - inode, (unsigned long long )v_block, nr, bhs, flags, - validate); +mlog (0 ,"(inode = %p, v_block = %llu, nr = %d, bhs = %p, " +"flags = %x, validate = %p)\n" , + inode, (unsigned long long )v_block, nr, bhs, flags, + validate);if (((v_block + nr -1 ) << inode->i_sb->s_blocksize_bits) >=i_size_read (inode)) {fs/ocfs2/file.c +32
-41@@ -99,8 +99,8 @@ static int ocfs2_file_open(struct inode *inode, struct file *file)int mode = file->f_flags;struct ocfs2_inode_info *oi =OCFS2_I (inode); -mlog_entry ("(0x%p, 0x%p, '%.*s')\n" , inode, file, - file->f_path.dentry->d_name.len, file->f_path.dentry->d_name.name); +mlog (0 ,"(0x%p, 0x%p, '%.*s')\n" , inode, file, + file->f_path.dentry->d_name.len, file->f_path.dentry->d_name.name);if (file->f_mode &FMODE_WRITE )dquot_initialize (inode);@@ -143,9 +143,9 @@ static int ocfs2_file_release(struct inode *inode, struct file *file) {struct ocfs2_inode_info *oi =OCFS2_I (inode); -mlog_entry ("(0x%p, 0x%p, '%.*s')\n" , inode, file, - file->f_path.dentry->d_name.len, - file->f_path.dentry->d_name.name); +mlog (0 ,"(0x%p, 0x%p, '%.*s')\n" , inode, file, + file->f_path.dentry->d_name.len, + file->f_path.dentry->d_name.name);spin_lock (&oi->ip_lock);if (!--oi->ip_open_count)@@ -177,9 +177,9 @@ static int ocfs2_sync_file(struct file *file, int datasync)struct inode *inode = file->f_mapping->host;struct ocfs2_super *osb =OCFS2_SB (inode->i_sb); -mlog_entry ("(0x%p, %d, 0x%p, '%.*s')\n" , file, datasync, - file->f_path.dentry, file->f_path.dentry->d_name.len, - file->f_path.dentry->d_name.name); +mlog (0 ,"(0x%p, %d, 0x%p, '%.*s')\n" , file, datasync, + file->f_path.dentry, file->f_path.dentry->d_name.len, + file->f_path.dentry->d_name.name);if (datasync && !(inode->i_state &I_DIRTY_DATASYNC )) {/* @@ -251,8 +251,6 @@ int ocfs2_update_inode_atime(struct inode *inode,handle_t *handle;struct ocfs2_dinode *di = (struct ocfs2_dinode *) bh->b_data; -mlog_entry_void (); - handle =ocfs2_start_trans (osb,OCFS2_INODE_UPDATE_CREDITS );if (IS_ERR (handle)) { ret =PTR_ERR (handle);@@ -291,7 +289,6 @@ static int ocfs2_set_inode_size(handle_t *handle, {int status; -mlog_entry_void ();i_size_write (inode, new_i_size); inode->i_blocks =ocfs2_inode_sector_count (inode); inode->i_ctime = inode->i_mtime =CURRENT_TIME ;@@ -375,8 +372,6 @@ static int ocfs2_orphan_for_truncate(struct ocfs2_super *osb,struct ocfs2_dinode *di;u64 cluster_bytes; -mlog_entry_void (); -/* * We need to CoW the cluster contains the offset if it is reflinked * since we will call ocfs2_zero_range_for_truncate later which will @@ -442,9 +437,9 @@ static int ocfs2_truncate_file(struct inode *inode,struct ocfs2_dinode *fe =NULL ;struct ocfs2_super *osb =OCFS2_SB (inode->i_sb); -mlog_entry ("(inode = %llu, new_i_size = %llu\n" , - (unsigned long long )OCFS2_I (inode)->ip_blkno, - (unsigned long long )new_i_size); +mlog (0 ,"(inode = %llu, new_i_size = %llu\n" , + (unsigned long long )OCFS2_I (inode)->ip_blkno, + (unsigned long long )new_i_size);/* We trust di_bh because it comes from ocfs2_inode_lock(), which * already validated it */ @@ -578,7 +573,7 @@ static int __ocfs2_extend_allocation(struct inode *inode, u32 logical_start,struct ocfs2_extent_tree et;int did_quota =0 ; -mlog_entry ("(clusters_to_add = %u)\n" , clusters_to_add); +mlog (0 ,"(clusters_to_add = %u)\n" , clusters_to_add);/* * This function only exists for file systems which don't @@ -1113,8 +1108,8 @@ int ocfs2_setattr(struct dentry *dentry, struct iattr *attr)struct dquot *transfer_to[MAXQUOTAS ] = { };int qtype; -mlog_entry ("(0x%p, '%.*s')\n" , dentry, - dentry->d_name.len, dentry->d_name.name); +mlog (0 ,"(0x%p, '%.*s')\n" , dentry, + dentry->d_name.len, dentry->d_name.name);/* ensuring we don't even attempt to truncate a symlink */ if (S_ISLNK (inode->i_mode))@@ -1287,8 +1282,6 @@ int ocfs2_getattr(struct vfsmount *mnt,struct ocfs2_super *osb = sb->s_fs_info;int err; -mlog_entry_void (); - err =ocfs2_inode_revalidate (dentry);if (err) {if (err != -ENOENT )@@ -1311,8 +1304,6 @@ int ocfs2_permission(struct inode *inode, int mask) {int ret; -mlog_entry_void (); - ret =ocfs2_inode_lock (inode,NULL ,0 );if (ret) {if (ret != -ENOENT )@@ -1336,8 +1327,8 @@ static int __ocfs2_write_remove_suid(struct inode *inode,struct ocfs2_super *osb =OCFS2_SB (inode->i_sb);struct ocfs2_dinode *di; -mlog_entry ("(Inode %llu, mode 0%o)\n" , - (unsigned long long )OCFS2_I (inode)->ip_blkno, inode->i_mode); +mlog (0 ,"(Inode %llu, mode 0%o)\n" , + (unsigned long long )OCFS2_I (inode)->ip_blkno, inode->i_mode); handle =ocfs2_start_trans (osb,OCFS2_INODE_UPDATE_CREDITS );if (IS_ERR (handle)) {@@ -2226,10 +2217,10 @@ static ssize_t ocfs2_file_aio_write(struct kiocb *iocb,int full_coherency = !(osb->s_mount_opt &OCFS2_MOUNT_COHERENCY_BUFFERED ); -mlog_entry ("(0x%p, %u, '%.*s')\n" , file, - (unsigned int )nr_segs, - file->f_path.dentry->d_name.len, - file->f_path.dentry->d_name.name); +mlog (0 ,"(0x%p, %u, '%.*s')\n" , file, + (unsigned int )nr_segs, + file->f_path.dentry->d_name.len, + file->f_path.dentry->d_name.name);if (iocb->ki_left ==0 )return 0 ;@@ -2425,10 +2416,10 @@ static ssize_t ocfs2_file_splice_write(struct pipe_inode_info *pipe, .u.file = out, }; -mlog_entry ("(0x%p, 0x%p, %u, '%.*s')\n" , out, pipe, - (unsigned int )len, - out->f_path.dentry->d_name.len, - out->f_path.dentry->d_name.name); +mlog (0 ,"(0x%p, 0x%p, %u, '%.*s')\n" , out, pipe, + (unsigned int )len, + out->f_path.dentry->d_name.len, + out->f_path.dentry->d_name.name);if (pipe->inode)mutex_lock_nested (&pipe->inode->i_mutex,I_MUTEX_PARENT );@@ -2485,10 +2476,10 @@ static ssize_t ocfs2_file_splice_read(struct file *in,int ret =0 , lock_level =0 ;struct inode *inode = in->f_path.dentry->d_inode; -mlog_entry ("(0x%p, 0x%p, %u, '%.*s')\n" , in, pipe, - (unsigned int )len, - in->f_path.dentry->d_name.len, - in->f_path.dentry->d_name.name); +mlog (0 ,"(0x%p, 0x%p, %u, '%.*s')\n" , in, pipe, + (unsigned int )len, + in->f_path.dentry->d_name.len, + in->f_path.dentry->d_name.name);/* * See the comment in ocfs2_file_aio_read() @@ -2516,10 +2507,10 @@ static ssize_t ocfs2_file_aio_read(struct kiocb *iocb,struct file *filp = iocb->ki_filp;struct inode *inode = filp->f_path.dentry->d_inode; -mlog_entry ("(0x%p, %u, '%.*s')\n" , filp, - (unsigned int )nr_segs, - filp->f_path.dentry->d_name.len, - filp->f_path.dentry->d_name.name); +mlog (0 ,"(0x%p, %u, '%.*s')\n" , filp, + (unsigned int )nr_segs, + filp->f_path.dentry->d_name.len, + filp->f_path.dentry->d_name.name);if (!inode) { ret = -EINVAL ;fs/ocfs2/inode.c +11
-17@@ -131,7 +131,7 @@ struct inode *ocfs2_iget(struct ocfs2_super *osb, u64 blkno, unsigned flags,struct super_block *sb = osb->sb;struct ocfs2_find_inode_args args; -mlog_entry ("(blkno = %llu)\n" , (unsigned long long )blkno); +mlog (0 ,"(blkno = %llu)\n" , (unsigned long long )blkno);/* Ok. By now we've either got the offsets passed to us by the * caller, or we just pulled them off the bh. Lets do some @@ -192,7 +192,7 @@ static int ocfs2_find_actor(struct inode *inode, void *opaque)struct ocfs2_inode_info *oi =OCFS2_I (inode);int ret =0 ; -mlog_entry ("(0x%p, %lu, 0x%p)\n" , inode, inode->i_ino, opaque); +mlog (0 ,"(0x%p, %lu, 0x%p)\n" , inode, inode->i_ino, opaque); args = opaque;@@ -218,7 +218,7 @@ static int ocfs2_init_locked_inode(struct inode *inode, void *opaque)static struct lock_class_key ocfs2_quota_ip_alloc_sem_key, ocfs2_file_ip_alloc_sem_key; -mlog_entry ("inode = %p, opaque = %p\n" , inode, opaque); +mlog (0 ,"inode = %p, opaque = %p\n" , inode, opaque); inode->i_ino = args->fi_ino;OCFS2_I (inode)->ip_blkno = args->fi_blkno;@@ -246,8 +246,8 @@ void ocfs2_populate_inode(struct inode *inode, struct ocfs2_dinode *fe,struct ocfs2_super *osb;int use_plocks =1 ; -mlog_entry ("(0x%p, size:%llu)\n" , inode, - (unsigned long long )le64_to_cpu (fe->i_size)); +mlog (0 ,"(0x%p, size:%llu)\n" , inode, + (unsigned long long )le64_to_cpu (fe->i_size)); sb = inode->i_sb; osb =OCFS2_SB (sb);@@ -394,7 +394,7 @@ static int ocfs2_read_locked_inode(struct inode *inode,int status, can_lock;u32 generation =0 ; -mlog_entry ("(0x%p, 0x%p)\n" , inode, args); +mlog (0 ,"(0x%p, 0x%p)\n" , inode, args); status = -EINVAL ;if (inode ==NULL || inode->i_sb ==NULL ) {@@ -551,8 +551,6 @@ static int ocfs2_truncate_for_delete(struct ocfs2_super *osb,struct ocfs2_dinode *fe;handle_t *handle =NULL ; -mlog_entry_void (); - fe = (struct ocfs2_dinode *) fe_bh->b_data;/* @@ -980,7 +978,7 @@ static void ocfs2_delete_inode(struct inode *inode)sigset_t oldset;struct buffer_head *di_bh =NULL ; -mlog_entry ("(inode->i_ino = %lu)\n" , inode->i_ino); +mlog (0 ,"(inode->i_ino = %lu)\n" , inode->i_ino);/* When we fail in read_inode() we mark inode as bad. The second test * catches the case when inode allocation fails before allocating @@ -1088,8 +1086,6 @@ static void ocfs2_clear_inode(struct inode *inode)int status;struct ocfs2_inode_info *oi =OCFS2_I (inode); -mlog_entry_void (); -end_writeback (inode);mlog (0 ,"Clearing inode: %llu, nlink = %u\n" , (unsigned long long )OCFS2_I (inode)->ip_blkno, inode->i_nlink);@@ -1204,8 +1200,6 @@ int ocfs2_drop_inode(struct inode *inode)struct ocfs2_inode_info *oi =OCFS2_I (inode);int res; -mlog_entry_void (); -mlog (0 ,"Drop inode %llu, nlink = %u, ip_flags = 0x%x\n" , (unsigned long long )oi->ip_blkno, inode->i_nlink, oi->ip_flags);@@ -1226,8 +1220,8 @@ int ocfs2_inode_revalidate(struct dentry *dentry)struct inode *inode = dentry->d_inode;int status =0 ; -mlog_entry ("(inode = 0x%p, ino = %llu)\n" , inode, - inode ? (unsigned long long )OCFS2_I (inode)->ip_blkno :0ULL ); +mlog (0 ,"(inode = 0x%p, ino = %llu)\n" , inode, + inode ? (unsigned long long )OCFS2_I (inode)->ip_blkno :0ULL );if (!inode) {mlog (0 ,"eep, no inode!\n" );@@ -1271,8 +1265,8 @@ int ocfs2_mark_inode_dirty(handle_t *handle,int status;struct ocfs2_dinode *fe = (struct ocfs2_dinode *) bh->b_data; -mlog_entry ("(inode %llu)\n" , - (unsigned long long )OCFS2_I (inode)->ip_blkno); +mlog (0 ,"(inode %llu)\n" , + (unsigned long long )OCFS2_I (inode)->ip_blkno); status =ocfs2_journal_access_di (handle,INODE_CACHE (inode), bh,OCFS2_JOURNAL_ACCESS_WRITE );fs/ocfs2/journal.c +12
-31@@ -303,8 +303,6 @@ static int ocfs2_commit_cache(struct ocfs2_super *osb)unsigned int flushed;struct ocfs2_journal *journal =NULL ; -mlog_entry_void (); - journal = osb->journal;/* Flush all pending commits and checkpoint the journal. */ @@ -425,7 +423,6 @@ int ocfs2_extend_trans(handle_t *handle, int nblocks)return 0 ; old_nblocks = handle->h_buffer_credits; -mlog_entry_void ();mlog (0 ,"Trying to extend transaction by %d blocks\n" , nblocks);@@ -622,12 +619,12 @@ static int __ocfs2_journal_access(handle_t *handle,BUG_ON (!handle);BUG_ON (!bh); -mlog_entry ("bh->b_blocknr=%llu, type=%d (\"%s\"), bh->b_size = %zu\n" , - (unsigned long long )bh->b_blocknr, type, - (type ==OCFS2_JOURNAL_ACCESS_CREATE ) ? -"OCFS2_JOURNAL_ACCESS_CREATE" : -"OCFS2_JOURNAL_ACCESS_WRITE" , - bh->b_size); +mlog (0 ,"bh->b_blocknr=%llu, type=%d (\"%s\"), bh->b_size = %zu\n" , + (unsigned long long )bh->b_blocknr, type, + (type ==OCFS2_JOURNAL_ACCESS_CREATE ) ? +"OCFS2_JOURNAL_ACCESS_CREATE" : +"OCFS2_JOURNAL_ACCESS_WRITE" , + bh->b_size);/* we can safely remove this assertion after testing. */ if (!buffer_uptodate (bh)) {@@ -737,8 +734,8 @@ void ocfs2_journal_dirty(handle_t *handle, struct buffer_head *bh) {int status; -mlog_entry ("(bh->b_blocknr=%llu)\n" , - (unsigned long long )bh->b_blocknr); +mlog (0 ,"(bh->b_blocknr=%llu)\n" , + (unsigned long long )bh->b_blocknr); status =jbd2_journal_dirty_metadata (handle, bh);BUG_ON (status);@@ -775,8 +772,6 @@ int ocfs2_journal_init(struct ocfs2_journal *journal, int *dirty)struct ocfs2_super *osb;int inode_lock =0 ; -mlog_entry_void (); -BUG_ON (!journal); osb = journal->j_osb;@@ -882,8 +877,6 @@ static int ocfs2_journal_toggle_dirty(struct ocfs2_super *osb,struct buffer_head *bh = journal->j_bh;struct ocfs2_dinode *fe; -mlog_entry_void (); - fe = (struct ocfs2_dinode *)bh->b_data;/* The journal bh on the osb always comes from ocfs2_journal_init() @@ -921,8 +914,6 @@ void ocfs2_journal_shutdown(struct ocfs2_super *osb)struct inode *inode =NULL ;int num_running_trans =0 ; -mlog_entry_void (); -BUG_ON (!osb); journal = osb->journal;@@ -1024,8 +1015,6 @@ int ocfs2_journal_load(struct ocfs2_journal *journal, int local, int replayed)int status =0 ;struct ocfs2_super *osb; -mlog_entry_void (); -BUG_ON (!journal); osb = journal->j_osb;@@ -1070,8 +1059,6 @@ int ocfs2_journal_wipe(struct ocfs2_journal *journal, int full) {int status; -mlog_entry_void (); -BUG_ON (!journal); status =jbd2_journal_wipe (journal->j_journal, full);@@ -1124,8 +1111,6 @@ static int ocfs2_force_read_journal(struct inode *inode)#define CONCURRENT_JOURNAL_FILL 32ULLstruct buffer_head *bhs[CONCURRENT_JOURNAL_FILL ]; -mlog_entry_void (); -memset (bhs,0 ,sizeof (struct buffer_head *) *CONCURRENT_JOURNAL_FILL ); num_blocks =ocfs2_blocks_for_bytes (inode->i_sb, inode->i_size);@@ -1194,8 +1179,6 @@ void ocfs2_complete_recovery(struct work_struct *work)struct ocfs2_quota_recovery *qrec;LIST_HEAD (tmp_la_list); -mlog_entry_void (); -mlog (0 ,"completing recovery from keventd\n" );spin_lock (&journal->j_lock);@@ -1339,8 +1322,6 @@ static int __ocfs2_recovery_thread(void *arg)int rm_quota_used =0 , i;struct ocfs2_quota_recovery *qrec; -mlog_entry_void (); - status =ocfs2_wait_on_mount (osb);if (status <0 ) { goto bail;@@ -1461,8 +1442,8 @@ bail:void ocfs2_recovery_thread (struct ocfs2_super *osb,int node_num) { -mlog_entry ("(node_num=%d, osb->node_num = %d)\n" , - node_num, osb->node_num); +mlog (0 ,"(node_num=%d, osb->node_num = %d)\n" , + node_num, osb->node_num);mutex_lock (&osb->recovery_lock);if (osb->disable_recovery)@@ -1688,8 +1669,8 @@ static int ocfs2_recover_node(struct ocfs2_super *osb,struct ocfs2_dinode *la_copy =NULL ;struct ocfs2_dinode *tl_copy =NULL ; -mlog_entry ("(node_num=%d, slot_num=%d, osb->node_num = %d)\n" , - node_num, slot_num, osb->node_num); +mlog (0 ,"(node_num=%d, slot_num=%d, osb->node_num = %d)\n" , + node_num, slot_num, osb->node_num);/* Should not ever be called to recover ourselves -- in that * case we should've called ocfs2_journal_load instead. */ fs/ocfs2/localalloc.c +5
-21@@ -291,8 +291,6 @@ int ocfs2_load_local_alloc(struct ocfs2_super *osb)struct inode *inode =NULL ;struct ocfs2_local_alloc *la; -mlog_entry_void (); -if (osb->local_alloc_bits ==0 ) goto bail;@@ -388,8 +386,6 @@ void ocfs2_shutdown_local_alloc(struct ocfs2_super *osb)struct ocfs2_dinode *alloc_copy =NULL ;struct ocfs2_dinode *alloc =NULL ; -mlog_entry_void (); -cancel_delayed_work (&osb->la_enable_wq);flush_workqueue (ocfs2_wq);@@ -502,7 +498,7 @@ int ocfs2_begin_local_alloc_recovery(struct ocfs2_super *osb,struct inode *inode =NULL ;struct ocfs2_dinode *alloc; -mlog_entry ("(slot_num = %d)\n" , slot_num); +mlog (0 ,"(slot_num = %d)\n" , slot_num); *alloc_copy =NULL ;@@ -570,8 +566,6 @@ int ocfs2_complete_local_alloc_recovery(struct ocfs2_super *osb,struct buffer_head *main_bm_bh =NULL ;struct inode *main_bm_inode; -mlog_entry_void (); - main_bm_inode =ocfs2_get_system_file_inode (osb,GLOBAL_BITMAP_SYSTEM_INODE ,OCFS2_INVALID_SLOT );@@ -640,8 +634,6 @@ int ocfs2_reserve_local_alloc_bits(struct ocfs2_super *osb,struct inode *local_alloc_inode;unsigned int free_bits; -mlog_entry_void (); -BUG_ON (!ac); local_alloc_inode =@@ -749,7 +741,6 @@ int ocfs2_claim_local_alloc_bits(struct ocfs2_super *osb,struct ocfs2_dinode *alloc;struct ocfs2_local_alloc *la; -mlog_entry_void ();BUG_ON (ac->ac_which !=OCFS2_AC_USE_LOCAL ); local_alloc_inode = ac->ac_inode;@@ -799,8 +790,6 @@ static u32 ocfs2_local_alloc_count_bits(struct ocfs2_dinode *alloc)u32 count =0 ;struct ocfs2_local_alloc *la =OCFS2_LOCAL_ALLOC (alloc); -mlog_entry_void (); - buffer = la->la_bitmap;for (i =0 ; i <le16_to_cpu (la->la_size); i++) count +=hweight8 (buffer[i]);@@ -820,7 +809,7 @@ static int ocfs2_local_alloc_find_clear_bits(struct ocfs2_super *osb,void *bitmap =NULL ;struct ocfs2_reservation_map *resmap = &osb->osb_la_resmap; -mlog_entry ("(numbits wanted = %u)\n" , *numbits); +mlog (0 ,"(numbits wanted = %u)\n" , *numbits);if (!alloc->id1.bitmap1.i_total) {mlog (0 ,"No bits in my window!\n" );@@ -903,7 +892,6 @@ static void ocfs2_clear_local_alloc(struct ocfs2_dinode *alloc) {struct ocfs2_local_alloc *la =OCFS2_LOCAL_ALLOC (alloc);int i; -mlog_entry_void (); alloc->id1.bitmap1.i_total =0 ; alloc->id1.bitmap1.i_used =0 ;@@ -952,9 +940,9 @@ static int ocfs2_sync_local_to_main(struct ocfs2_super *osb,void *bitmap;struct ocfs2_local_alloc *la =OCFS2_LOCAL_ALLOC (alloc); -mlog_entry ("total = %u, used = %u\n" , -le32_to_cpu (alloc->id1.bitmap1.i_total), -le32_to_cpu (alloc->id1.bitmap1.i_used)); +mlog (0 ,"total = %u, used = %u\n" , +le32_to_cpu (alloc->id1.bitmap1.i_total), +le32_to_cpu (alloc->id1.bitmap1.i_used));if (!alloc->id1.bitmap1.i_total) {mlog (0 ,"nothing to sync!\n" );@@ -1148,8 +1136,6 @@ static int ocfs2_local_alloc_new_window(struct ocfs2_super *osb,struct ocfs2_dinode *alloc =NULL ;struct ocfs2_local_alloc *la; -mlog_entry_void (); - alloc = (struct ocfs2_dinode *) osb->local_alloc_bh->b_data; la =OCFS2_LOCAL_ALLOC (alloc);@@ -1243,8 +1229,6 @@ static int ocfs2_local_alloc_slide_window(struct ocfs2_super *osb,struct ocfs2_dinode *alloc_copy =NULL ;struct ocfs2_alloc_context *ac =NULL ; -mlog_entry_void (); -ocfs2_recalc_la_window (osb,OCFS2_LA_EVENT_SLIDE );/* This will lock the main bitmap for us. */ fs/ocfs2/mmap.c +1
-1@@ -49,7 +49,7 @@ static int ocfs2_fault(struct vm_area_struct *area, struct vm_fault *vmf)sigset_t oldset;int ret; -mlog_entry ("(area=%p, page offset=%lu)\n" , area, vmf->pgoff); +mlog (0 ,"(area=%p, page offset=%lu)\n" , area, vmf->pgoff);ocfs2_block_signals (&oldset); ret =filemap_fault (area, vmf);fs/ocfs2/namei.c +35
-39@@ -106,8 +106,8 @@ static struct dentry *ocfs2_lookup(struct inode *dir, struct dentry *dentry,struct dentry *ret;struct ocfs2_inode_info *oi; -mlog_entry ("(0x%p, 0x%p, '%.*s')\n" , dir, dentry, - dentry->d_name.len, dentry->d_name.name); +mlog (0 ,"(0x%p, 0x%p, '%.*s')\n" , dir, dentry, + dentry->d_name.len, dentry->d_name.name);if (dentry->d_name.len >OCFS2_MAX_FILENAME_LEN ) { ret =ERR_PTR (-ENAMETOOLONG );@@ -236,9 +236,9 @@ static int ocfs2_mknod(struct inode *dir,sigset_t oldset;int did_block_signals =0 ; -mlog_entry ("(0x%p, 0x%p, %d, %lu, '%.*s')\n" , dir, dentry, mode, - (unsigned long )dev, dentry->d_name.len, - dentry->d_name.name); +mlog (0 ,"(0x%p, 0x%p, %d, %lu, '%.*s')\n" , dir, dentry, mode, + (unsigned long )dev, dentry->d_name.len, + dentry->d_name.name);dquot_initialize (dir);@@ -355,9 +355,9 @@ static int ocfs2_mknod(struct inode *dir, goto leave; did_quota_inode =1 ; -mlog_entry ("(0x%p, 0x%p, %d, %lu, '%.*s')\n" , dir, dentry, - inode->i_mode, (unsigned long )dev, dentry->d_name.len, - dentry->d_name.name); +mlog (0 ,"(0x%p, 0x%p, %d, %lu, '%.*s')\n" , dir, dentry, + inode->i_mode, (unsigned long )dev, dentry->d_name.len, + dentry->d_name.name);/* do the real work now. */ status = ocfs2_mknod_locked(osb, dir, inode, dev,@@ -617,8 +617,8 @@ static int ocfs2_mkdir(struct inode *dir, {int ret; -mlog_entry ("(0x%p, 0x%p, %d, '%.*s')\n" , dir, dentry, mode, - dentry->d_name.len, dentry->d_name.name); +mlog (0 ,"(0x%p, 0x%p, %d, '%.*s')\n" , dir, dentry, mode, + dentry->d_name.len, dentry->d_name.name); ret =ocfs2_mknod (dir, dentry, mode |S_IFDIR ,0 );mlog_exit (ret);@@ -632,8 +632,8 @@ static int ocfs2_create(struct inode *dir, {int ret; -mlog_entry ("(0x%p, 0x%p, %d, '%.*s')\n" , dir, dentry, mode, - dentry->d_name.len, dentry->d_name.name); +mlog (0 ,"(0x%p, 0x%p, %d, '%.*s')\n" , dir, dentry, mode, + dentry->d_name.len, dentry->d_name.name); ret =ocfs2_mknod (dir, dentry, mode |S_IFREG ,0 );mlog_exit (ret);@@ -654,9 +654,9 @@ static int ocfs2_link(struct dentry *old_dentry,struct ocfs2_dir_lookup_result lookup = {NULL , };sigset_t oldset; -mlog_entry ("(inode=%lu, old='%.*s' new='%.*s')\n" , inode->i_ino, - old_dentry->d_name.len, old_dentry->d_name.name, - dentry->d_name.len, dentry->d_name.name); +mlog (0 ,"(inode=%lu, old='%.*s' new='%.*s')\n" , inode->i_ino, + old_dentry->d_name.len, old_dentry->d_name.name, + dentry->d_name.len, dentry->d_name.name);if (S_ISDIR (inode->i_mode))return -EPERM ;@@ -812,8 +812,8 @@ static int ocfs2_unlink(struct inode *dir,struct ocfs2_dir_lookup_result lookup = {NULL , };struct ocfs2_dir_lookup_result orphan_insert = {NULL , }; -mlog_entry ("(0x%p, 0x%p, '%.*s')\n" , dir, dentry, - dentry->d_name.len, dentry->d_name.name); +mlog (0 ,"(0x%p, 0x%p, '%.*s')\n" , dir, dentry, + dentry->d_name.len, dentry->d_name.name);dquot_initialize (dir);@@ -978,9 +978,9 @@ static int ocfs2_double_lock(struct ocfs2_super *osb,struct buffer_head **tmpbh;struct inode *tmpinode; -mlog_entry ("(inode1 = %llu, inode2 = %llu)\n" , - (unsigned long long )oi1->ip_blkno, - (unsigned long long )oi2->ip_blkno); +mlog (0 ,"(inode1 = %llu, inode2 = %llu)\n" , + (unsigned long long )oi1->ip_blkno, + (unsigned long long )oi2->ip_blkno);if (*bh1) *bh1 =NULL ;@@ -1067,10 +1067,10 @@ static int ocfs2_rename(struct inode *old_dir,/* At some point it might be nice to break this function up a * bit. */ -mlog_entry ("(0x%p, 0x%p, 0x%p, 0x%p, from='%.*s' to='%.*s')\n" , - old_dir, old_dentry, new_dir, new_dentry, - old_dentry->d_name.len, old_dentry->d_name.name, - new_dentry->d_name.len, new_dentry->d_name.name); +mlog (0 ,"(0x%p, 0x%p, 0x%p, 0x%p, from='%.*s' to='%.*s')\n" , + old_dir, old_dentry, new_dir, new_dentry, + old_dentry->d_name.len, old_dentry->d_name.name, + new_dentry->d_name.len, new_dentry->d_name.name);dquot_initialize (old_dir);dquot_initialize (new_dir);@@ -1501,9 +1501,9 @@ static int ocfs2_create_symlink_data(struct ocfs2_super *osb,* write i_size + 1 bytes. */ blocks = (bytes_left + sb->s_blocksize -1 ) >> sb->s_blocksize_bits; -mlog_entry ("i_blocks = %llu, i_size = %llu, blocks = %d\n" , - (unsigned long long )inode->i_blocks, -i_size_read (inode), blocks); +mlog (0 ,"i_blocks = %llu, i_size = %llu, blocks = %d\n" , + (unsigned long long )inode->i_blocks, +i_size_read (inode), blocks);/* Sanity check -- make sure we're going to fit. */ if (bytes_left >@@ -1610,8 +1610,8 @@ static int ocfs2_symlink(struct inode *dir,sigset_t oldset;int did_block_signals =0 ; -mlog_entry ("(0x%p, 0x%p, symname='%s' actual='%.*s')\n" , dir, - dentry, symname, dentry->d_name.len, dentry->d_name.name); +mlog (0 ,"(0x%p, 0x%p, symname='%s' actual='%.*s')\n" , dir, + dentry, symname, dentry->d_name.len, dentry->d_name.name);dquot_initialize (dir);@@ -1713,9 +1713,9 @@ static int ocfs2_symlink(struct inode *dir, goto bail; did_quota_inode =1 ; -mlog_entry ("(0x%p, 0x%p, %d, '%.*s')\n" , dir, dentry, - inode->i_mode, dentry->d_name.len, - dentry->d_name.name); +mlog (0 ,"(0x%p, 0x%p, %d, '%.*s')\n" , dir, dentry, + inode->i_mode, dentry->d_name.len, + dentry->d_name.name); status = ocfs2_mknod_locked(osb, dir, inode, 0, &new_fe_bh, parent_fe_bh, handle,@@ -1845,8 +1845,6 @@ static int ocfs2_blkno_stringify(u64 blkno, char *name) {int status, namelen; -mlog_entry_void (); - namelen =snprintf (name,OCFS2_ORPHAN_NAMELEN +1 ,"%016llx" , (long long )blkno);if (namelen <=0 ) {@@ -1998,7 +1996,7 @@ static int ocfs2_orphan_add(struct ocfs2_super *osb,struct ocfs2_dinode *orphan_fe;struct ocfs2_dinode *fe = (struct ocfs2_dinode *) fe_bh->b_data; -mlog_entry ("(inode->i_ino = %lu)\n" , inode->i_ino); +mlog (0 ,"(inode->i_ino = %lu)\n" , inode->i_ino); status =ocfs2_read_inode_block (orphan_dir_inode, &orphan_dir_bh);if (status <0 ) {@@ -2079,8 +2077,6 @@ int ocfs2_orphan_del(struct ocfs2_super *osb,int status =0 ;struct ocfs2_dir_lookup_result lookup = {NULL , }; -mlog_entry_void (); - status =ocfs2_blkno_stringify (OCFS2_I (inode)->ip_blkno, name);if (status <0 ) {mlog_errno (status);@@ -2359,8 +2355,8 @@ int ocfs2_mv_orphaned_inode_to_new(struct inode *dir,struct buffer_head *di_bh =NULL ;struct ocfs2_dir_lookup_result lookup = {NULL , }; -mlog_entry ("(0x%p, 0x%p, %.*s')\n" , dir, dentry, - dentry->d_name.len, dentry->d_name.name); +mlog (0 ,"(0x%p, 0x%p, %.*s')\n" , dir, dentry, + dentry->d_name.len, dentry->d_name.name); status =ocfs2_inode_lock (dir, &parent_di_bh,1 );if (status <0 ) {fs/ocfs2/quota_global.c +5
-9@@ -343,8 +343,6 @@ int ocfs2_global_read_info(struct super_block *sb, int type)u64 pcount;int status; -mlog_entry_void (); -/* Read global header */ gqinode =ocfs2_get_system_file_inode (OCFS2_SB (sb), ino[type],OCFS2_INVALID_SLOT );@@ -596,7 +594,7 @@ static int ocfs2_sync_dquot_helper(struct dquot *dquot, unsigned long type)struct ocfs2_super *osb =OCFS2_SB (sb);int status =0 ; -mlog_entry ("id=%u qtype=%u type=%lu device=%s\n" , dquot->dq_id, +mlog (0 ,"id=%u qtype=%u type=%lu device=%s\n" , dquot->dq_id, dquot->dq_type, type, sb->s_id);if (type != dquot->dq_type) goto out;@@ -649,7 +647,7 @@ static int ocfs2_write_dquot(struct dquot *dquot)struct ocfs2_super *osb =OCFS2_SB (dquot->dq_sb);int status =0 ; -mlog_entry ("id=%u, type=%d" , dquot->dq_id, dquot->dq_type); +mlog (0 ,"id=%u, type=%d" , dquot->dq_id, dquot->dq_type); handle =ocfs2_start_trans (osb,OCFS2_QWRITE_CREDITS );if (IS_ERR (handle)) {@@ -688,7 +686,7 @@ static int ocfs2_release_dquot(struct dquot *dquot)struct ocfs2_super *osb =OCFS2_SB (dquot->dq_sb);int status =0 ; -mlog_entry ("id=%u, type=%d" , dquot->dq_id, dquot->dq_type); +mlog (0 ,"id=%u, type=%d" , dquot->dq_id, dquot->dq_type);mutex_lock (&dquot->dq_lock);/* Check whether we are not racing with some other dqget() */ @@ -745,7 +743,7 @@ static int ocfs2_acquire_dquot(struct dquot *dquot)int need_alloc =ocfs2_global_qinit_alloc (sb, type);handle_t *handle; -mlog_entry ("id=%u, type=%d" , dquot->dq_id, type); +mlog (0 ,"id=%u, type=%d" , dquot->dq_id, type);mutex_lock (&dquot->dq_lock);/* * We need an exclusive lock, because we're going to update use count @@ -831,7 +829,7 @@ static int ocfs2_mark_dquot_dirty(struct dquot *dquot)handle_t *handle;struct ocfs2_super *osb =OCFS2_SB (sb); -mlog_entry ("id=%u, type=%d" , dquot->dq_id, type); +mlog (0 ,"id=%u, type=%d" , dquot->dq_id, type);/* In case user set some limits, sync dquot immediately to global * quota file so that information propagates quicker */ @@ -879,8 +877,6 @@ static int ocfs2_write_info(struct super_block *sb, int type)int status =0 ;struct ocfs2_mem_dqinfo *oinfo =sb_dqinfo (sb, type)->dqi_priv; -mlog_entry_void (); - status =ocfs2_lock_global_qf (oinfo,1 );if (status <0 ) goto out;fs/ocfs2/quota_local.c +1
-1@@ -475,7 +475,7 @@ static int ocfs2_recover_local_quota_file(struct inode *lqinode,struct ocfs2_recovery_chunk *rchunk, *next;qsize_t spacechange, inodechange; -mlog_entry ("ino=%lu type=%u" , (unsigned long )lqinode->i_ino, type); +mlog (0 ,"ino=%lu type=%u" , (unsigned long )lqinode->i_ino, type);list_for_each_entry_safe (rchunk, next, &(rec->r_list[type]), rc_list) { chunk = rchunk->rc_chunk;fs/ocfs2/resize.c +2
-6@@ -103,8 +103,8 @@ static int ocfs2_update_last_group_and_inode(handle_t *handle,u16 cl_bpc =le16_to_cpu (cl->cl_bpc);u16 cl_cpg =le16_to_cpu (cl->cl_cpg); -mlog_entry ("(new_clusters=%d, first_new_cluster = %u)\n" , - new_clusters, first_new_cluster); +mlog (0 ,"(new_clusters=%d, first_new_cluster = %u)\n" , + new_clusters, first_new_cluster); ret =ocfs2_journal_access_gd (handle,INODE_CACHE (bm_inode), group_bh,OCFS2_JOURNAL_ACCESS_WRITE );@@ -281,8 +281,6 @@ int ocfs2_group_extend(struct inode * inode, int new_clusters)u32 first_new_cluster;u64 lgd_blkno; -mlog_entry_void (); -if (ocfs2_is_hard_readonly (osb) ||ocfs2_is_soft_readonly (osb))return -EROFS ;@@ -472,8 +470,6 @@ int ocfs2_group_add(struct inode *inode, struct ocfs2_new_group_input *input)struct ocfs2_chain_rec *cr;u16 cl_bpc; -mlog_entry_void (); -if (ocfs2_is_hard_readonly (osb) ||ocfs2_is_soft_readonly (osb))return -EROFS ;fs/ocfs2/slot_map.c +0
-2@@ -475,8 +475,6 @@ int ocfs2_find_slot(struct ocfs2_super *osb)int slot;struct ocfs2_slot_info *si; -mlog_entry_void (); - si = osb->slot_info;spin_lock (&osb->osb_lock);fs/ocfs2/suballoc.c +6
-29@@ -389,8 +389,6 @@ static int ocfs2_block_group_fill(handle_t *handle,struct ocfs2_group_desc *bg = (struct ocfs2_group_desc *) bg_bh->b_data;struct super_block * sb = alloc_inode->i_sb; -mlog_entry_void (); -if (((unsigned long long ) bg_bh->b_blocknr) != group_blkno) { ocfs2_error(alloc_inode->i_sb, "group block (%llu) != " "b_blocknr (%llu)",@@ -707,8 +705,6 @@ static int ocfs2_block_group_alloc(struct ocfs2_super *osb,BUG_ON (ocfs2_is_cluster_bitmap (alloc_inode)); -mlog_entry_void (); - cl = &fe->id2.i_chain; status = ocfs2_reserve_clusters_with_limit(osb, le16_to_cpu(cl->cl_cpg),@@ -814,8 +810,6 @@ static int ocfs2_reserve_suballoc_bits(struct ocfs2_super *osb,struct ocfs2_dinode *fe;u32 free_bits; -mlog_entry_void (); - alloc_inode =ocfs2_get_system_file_inode (osb, type, slot);if (!alloc_inode) {mlog_errno (-EINVAL );@@ -1189,8 +1183,6 @@ static int ocfs2_reserve_clusters_with_limit(struct ocfs2_super *osb, {int status; -mlog_entry_void (); - *ac =kzalloc (sizeof (struct ocfs2_alloc_context ),GFP_KERNEL );if (!(*ac)) { status = -ENOMEM ;@@ -1357,8 +1349,6 @@ static inline int ocfs2_block_group_set_bits(handle_t *handle,void *bitmap = bg->bg_bitmap;int journal_type =OCFS2_JOURNAL_ACCESS_WRITE ; -mlog_entry_void (); -/* All callers get the descriptor via * ocfs2_read_group_descriptor(). Any corruption is a code bug. */ BUG_ON (!OCFS2_IS_VALID_GROUP_DESC (bg));@@ -1888,8 +1878,6 @@ static int ocfs2_claim_suballoc_bits(struct ocfs2_alloc_context *ac,struct ocfs2_chain_list *cl;struct ocfs2_dinode *fe; -mlog_entry_void (); -BUG_ON (ac->ac_bits_given >= ac->ac_bits_wanted);BUG_ON (bits_wanted > (ac->ac_bits_wanted - ac->ac_bits_given));BUG_ON (!ac->ac_bh);@@ -2201,8 +2189,6 @@ int ocfs2_claim_new_inode(handle_t *handle,int status;struct ocfs2_suballoc_result res; -mlog_entry_void (); -BUG_ON (!ac);BUG_ON (ac->ac_bits_given !=0 );BUG_ON (ac->ac_bits_wanted !=1 );@@ -2307,8 +2293,6 @@ int __ocfs2_claim_clusters(handle_t *handle,struct ocfs2_suballoc_result res = { .sr_blkno =0 , };struct ocfs2_super *osb =OCFS2_SB (ac->ac_inode->i_sb); -mlog_entry_void (); -BUG_ON (ac->ac_bits_given >= ac->ac_bits_wanted); BUG_ON(ac->ac_which != OCFS2_AC_USE_LOCAL@@ -2392,8 +2376,6 @@ static int ocfs2_block_group_clear_bits(handle_t *handle,unsigned int tmp;struct ocfs2_group_desc *undo_bg =NULL ; -mlog_entry_void (); -/* The caller got this descriptor from * ocfs2_read_group_descriptor(). Any corruption is a code bug. */ BUG_ON (!OCFS2_IS_VALID_GROUP_DESC (bg));@@ -2463,8 +2445,6 @@ static int _ocfs2_free_suballoc_bits(handle_t *handle,struct buffer_head *group_bh =NULL ;struct ocfs2_group_desc *group; -mlog_entry_void (); -/* The alloc_bh comes from ocfs2_free_dinode() or * ocfs2_free_clusters(). The callers have all locked the * allocator and gotten alloc_bh from the lock call. This @@ -2556,11 +2536,8 @@ static int _ocfs2_free_clusters(handle_t *handle,/* You can't ever have a contiguous set of clusters * bigger than a block group bitmap so we never have to worry -* about looping on them. */ - -mlog_entry_void (); - -/* This is expensive. We can safely remove once this stuff has +* about looping on them. +* This is expensive. We can safely remove once this stuff has * gotten tested really well. */ BUG_ON (start_blk !=ocfs2_clusters_to_blocks (bitmap_inode->i_sb,ocfs2_blocks_to_clusters (bitmap_inode->i_sb, start_blk)));@@ -2756,7 +2733,7 @@ static int ocfs2_get_suballoc_slot_bit(struct ocfs2_super *osb, u64 blkno,struct buffer_head *inode_bh =NULL ;struct ocfs2_dinode *inode_fe; -mlog_entry ("blkno: %llu\n" , (unsigned long long )blkno); +mlog (0 ,"blkno: %llu\n" , (unsigned long long )blkno);/* dirty read disk */ status =ocfs2_read_blocks_sync (osb, blkno,1 , &inode_bh);@@ -2816,8 +2793,8 @@ static int ocfs2_test_suballoc_bit(struct ocfs2_super *osb,u64 bg_blkno;int status; -mlog_entry ("blkno: %llu bit: %u\n" , (unsigned long long )blkno, - (unsigned int )bit); +mlog (0 ,"blkno: %llu bit: %u\n" , (unsigned long long )blkno, + (unsigned int )bit); alloc_di = (struct ocfs2_dinode *)alloc_bh->b_data;if ((bit +1 ) >ocfs2_bits_per_group (&alloc_di->id2.i_chain)) {@@ -2869,7 +2846,7 @@ int ocfs2_test_inode_bit(struct ocfs2_super *osb, u64 blkno, int *res)struct inode *inode_alloc_inode;struct buffer_head *alloc_bh =NULL ; -mlog_entry ("blkno: %llu" , (unsigned long long )blkno); +mlog (0 ,"blkno: %llu" , (unsigned long long )blkno); status =ocfs2_get_suballoc_slot_bit (osb, blkno, &suballoc_slot, &group_blkno, &suballoc_bit);fs/ocfs2/super.c +6
-26@@ -442,8 +442,6 @@ static int ocfs2_init_global_system_inodes(struct ocfs2_super *osb)int status =0 ;int i; -mlog_entry_void (); - new =ocfs2_iget (osb, osb->root_blkno,OCFS2_FI_FLAG_SYSFILE ,0 );if (IS_ERR (new)) { status =PTR_ERR (new);@@ -489,8 +487,6 @@ static int ocfs2_init_local_system_inodes(struct ocfs2_super *osb)int status =0 ;int i; -mlog_entry_void (); -for (i =OCFS2_LAST_GLOBAL_SYSTEM_INODE +1 ; i <NUM_SYSTEM_INODES ; i++) {@@ -518,8 +514,6 @@ static void ocfs2_release_system_inodes(struct ocfs2_super *osb)int i;struct inode *inode; -mlog_entry_void (); -for (i =0 ; i <NUM_GLOBAL_SYSTEM_INODES ; i++) { inode = osb->global_system_inodes[i];if (inode) {@@ -1027,7 +1021,7 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent)char nodestr[8 ];struct ocfs2_blockcheck_stats stats; -mlog_entry ("%p, %p, %i" , sb, data, silent); +mlog (0 ,"%p, %p, %i" , sb, data, silent);if (!ocfs2_parse_options (sb, data, &parsed_options,0 )) { status = -EINVAL ;@@ -1318,8 +1312,8 @@ static int ocfs2_parse_options(struct super_block *sb,char *p;u32 tmp; -mlog_entry ("remount: %d, options: \"%s\"\n" , is_remount, - options ? options :"(none)" ); +mlog (0 ,"remount: %d, options: \"%s\"\n" , is_remount, + options ? options :"(none)" ); mopt->commit_interval =0 ; mopt->mount_opt =OCFS2_MOUNT_NOINTR ;@@ -1615,8 +1609,6 @@ static int __init ocfs2_init(void) {int status; -mlog_entry_void (); -ocfs2_print_version (); status =init_ocfs2_uptodate_cache ();@@ -1667,8 +1659,6 @@ leave: static void __exit ocfs2_exit(void) { -mlog_entry_void (); -ocfs2_quota_shutdown ();if (ocfs2_wq) {@@ -1691,7 +1681,7 @@ static void __exit ocfs2_exit(void)static void ocfs2_put_super (struct super_block *sb) { -mlog_entry ("(0x%p)\n" , sb); +mlog (0 ,"(0x%p)\n" , sb);ocfs2_sync_blockdev (sb);ocfs2_dismount_volume (sb,0 );@@ -1708,7 +1698,7 @@ static int ocfs2_statfs(struct dentry *dentry, struct kstatfs *buf)struct buffer_head *bh =NULL ;struct inode *inode =NULL ; -mlog_entry ("(%p, %p)\n" , dentry->d_sb, buf); +mlog (0 ,"(%p, %p)\n" , dentry->d_sb, buf); osb =OCFS2_SB (dentry->d_sb);@@ -1875,8 +1865,6 @@ static int ocfs2_mount_volume(struct super_block *sb)int unlock_super =0 ;struct ocfs2_super *osb =OCFS2_SB (sb); -mlog_entry_void (); -if (ocfs2_is_hard_readonly (osb)) goto leave;@@ -1931,7 +1919,7 @@ static void ocfs2_dismount_volume(struct super_block *sb, int mnt_err)struct ocfs2_super *osb =NULL ;char nodestr[8 ]; -mlog_entry ("(0x%p)\n" , sb); +mlog (0 ,"(0x%p)\n" , sb);BUG_ON (!sb); osb =OCFS2_SB (sb);@@ -2083,8 +2071,6 @@ static int ocfs2_initialize_super(struct super_block *sb,struct ocfs2_super *osb;u64 total_blocks; -mlog_entry_void (); - osb =kzalloc (sizeof (struct ocfs2_super ),GFP_KERNEL );if (!osb) { status = -ENOMEM ;@@ -2388,8 +2374,6 @@ static int ocfs2_verify_volume(struct ocfs2_dinode *di, {int status = -EAGAIN ; -mlog_entry_void (); -if (memcmp (di->i_signature,OCFS2_SUPER_BLOCK_SIGNATURE ,strlen (OCFS2_SUPER_BLOCK_SIGNATURE )) ==0 ) {/* We have to do a raw check of the feature here */ @@ -2457,8 +2441,6 @@ static int ocfs2_check_volume(struct ocfs2_super *osb)* recover * ourselves. */ -mlog_entry_void (); -/* Init our journal object. */ status =ocfs2_journal_init (osb->journal, &dirty);if (status <0 ) {@@ -2553,8 +2535,6 @@ finally:*/ static void ocfs2_delete_osb (struct ocfs2_super *osb) { -mlog_entry_void (); -/* This function assumes that the caller has the main osb resource */ ocfs2_free_slot_info (osb);fs/ocfs2/symlink.c +0
-6@@ -62,8 +62,6 @@ static char *ocfs2_fast_symlink_getlink(struct inode *inode,char *link =NULL ;struct ocfs2_dinode *fe; -mlog_entry_void (); - status =ocfs2_read_inode_block (inode, bh);if (status <0 ) {mlog_errno (status);@@ -88,8 +86,6 @@ static int ocfs2_readlink(struct dentry *dentry,struct buffer_head *bh =NULL ;struct inode *inode = dentry->d_inode; -mlog_entry_void (); - link =ocfs2_fast_symlink_getlink (inode, &bh);if (IS_ERR (link)) { ret =PTR_ERR (link);@@ -117,8 +113,6 @@ static void *ocfs2_fast_follow_link(struct dentry *dentry,struct inode *inode = dentry->d_inode;struct buffer_head *bh =NULL ; -mlog_entry_void (); -BUG_ON (!ocfs2_inode_is_fast_symlink (inode)); target =ocfs2_fast_symlink_getlink (inode, &bh);if (IS_ERR (target)) {fs/ocfs2/xattr.c +2
-2@@ -5538,7 +5538,7 @@ static int ocfs2_xattr_set_entry_bucket(struct inode *inode,int ret;struct ocfs2_xa_loc loc; -mlog_entry ("Set xattr %s in xattr bucket\n" , xi->xi_name); +mlog (0 ,"Set xattr %s in xattr bucket\n" , xi->xi_name);ocfs2_init_xattr_bucket_xa_loc (&loc, xs->bucket, xs->not_found ?NULL : xs->here);@@ -5581,7 +5581,7 @@ static int ocfs2_xattr_set_entry_index_block(struct inode *inode, {int ret; -mlog_entry ("Set xattr %s in xattr index block\n" , xi->xi_name); +mlog (0 ,"Set xattr %s in xattr index block\n" , xi->xi_name); ret =ocfs2_xattr_set_entry_bucket (inode, xi, xs, ctxt);if (!ret)Signature · 1 line
1.7.1.GIT
Signature · 11 lines
"The lawgiver, of all beings, most owes the law allegiance. He of all
men should behave as though the law compelled him. But it is the
universal weakness of mankind that what we are given to administer we
presently imagine we own."
- H.G. Wells
Joel Becker
Senior Development Manager
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127PATCH 2/5 ocfs2: Remove ENTRY from masklog.
Quoted 12 lines · Joel Becker
Quoted 9 lines · Tao Ma
ENTRY is used to record the entry of a function.
But because it is added in so many functions, if we enable it, the system logs get filled up quickly and cause too much I/O. So actually no one can open it for a production system or even for a test.So for
mlog_entry_void, we just remove it. formlog_entry(...), we replace it withmlog(0,...).
Quoted 7 lines
I'm not sure I like this. One of the benefits of
mlog_entry()
was that you could turn onML_xxxand not see these entry lines. By replacing it withmlog(0, ...), all of those entry lines will appear if the file is enabled.
I realize that many of them will be replaced in later patches.
I just hope they all are ;-)
Yeah, I will replace them with trace events later.
But you are right that the commit log should explain it. I will add some more comments in the next round.
Regards,
Tao
PATCH 3/5 ocfs2: Remove EXIT from masklog.
In reply to Tao Mamlog_exit is used to record the exit status of a function. But because it is added in so many functions, if we enable it, the system logs get filled up quickly and cause too much I/O. So actually no one can open it for a production system or even for a test.
This patch just try to remove it. So in case of report error, a mlog_errno is used while if all the errors in the function are properly reported, mlog_exit is just removed.
for mlog_exit:
1. if all the error paths already use mlog_errno, it is just removed. Otherwise, it will be replaced by mlog_errno.
2. if it is used to print some return value, it is replaced with mlog(0,...).mlog_exit_ptr is changed to mlog(0.
--- fs/ocfs2/alloc.c | 26 +++------------ fs/ocfs2/aops.c | 19 ++--------- fs/ocfs2/buffer_head_io.c | 7 ++-- fs/ocfs2/cluster/heartbeat.c | 1 - fs/ocfs2/cluster/masklog.c | 3 +- fs/ocfs2/cluster/masklog.h | 44 -------------------------- fs/ocfs2/dcache.c | 3 +- fs/ocfs2/dir.c | 20 ++++++------ fs/ocfs2/dlm/dlmrecovery.c | 5 +-- fs/ocfs2/dlmglue.c | 71 +++-------------------------------------- fs/ocfs2/export.c | 6 ++-- fs/ocfs2/extent_map.c | 1 - fs/ocfs2/file.c | 21 +----------- fs/ocfs2/inode.c | 15 +-------- fs/ocfs2/ioctl.c | 2 - fs/ocfs2/journal.c | 19 ----------- fs/ocfs2/localalloc.c | 35 ++++++++++++--------- fs/ocfs2/mmap.c | 2 +- fs/ocfs2/namei.c | 47 ++++++++++++++++++--------- fs/ocfs2/quota_global.c | 17 ++++++---- fs/ocfs2/quota_local.c | 3 +- fs/ocfs2/resize.c | 6 +-- fs/ocfs2/slot_map.c | 1 - fs/ocfs2/suballoc.c | 54 +++++++++++++++++++++---------- fs/ocfs2/super.c | 37 ++++++++------------- fs/ocfs2/symlink.c | 7 ++-- fs/ocfs2/xattr.c | 2 - 27 files changed, 159 insertions(+), 315 deletions(-)
fs/ocfs2/alloc.c +5 -21
@@ -985,7 +985,7 @@ int ocfs2_num_free_extents(struct ocfs2_super *osb, bail:brelse (eb_bh); -mlog_exit (retval); +mlog (0 ,"retval = %d\n" , retval);return retval; }
@@ -1070,8 +1070,8 @@ bail:brelse (bhs[i]); bhs[i] =NULL ; } +mlog_errno (status); } -mlog_exit (status);return status; }
@@ -1326,7 +1326,6 @@ bail:kfree (new_eb_bhs); } -mlog_exit (status);return status; }
@@ -1407,7 +1406,6 @@ static int ocfs2_shift_tree_depth(handle_t *handle, bail:brelse (new_eb_bh); -mlog_exit (status);return status; }
@@ -1493,7 +1491,6 @@ static int ocfs2_find_branch_target(struct ocfs2_extent_tree *et, bail:brelse (bh); -mlog_exit (status);return status; }
@@ -4552,7 +4549,7 @@ static int ocfs2_figure_insert_type(struct ocfs2_extent_tree *et,ocfs2_et_get_last_eb_blk (et), &bh);if (ret) { -mlog_exit (ret); +mlog_errno (ret); goto out; } eb = (struct ocfs2_extent_block *) bh->b_data;
@@ -4716,7 +4713,6 @@ int ocfs2_insert_extent(handle_t *handle, bail:brelse (last_eb_bh); -mlog_exit (status);return status; }
@@ -4818,7 +4814,6 @@ int ocfs2_add_clusters_in_btree(handle_t *handle, } leave: -mlog_exit (status);if (reason_ret) *reason_ret = reason;return status;
@@ -5029,7 +5024,7 @@ int ocfs2_split_extent(handle_t *handle,ocfs2_et_get_last_eb_blk (et), &last_eb_bh);if (ret) { -mlog_exit (ret); +mlog_errno (ret); goto out; }
@@ -5848,7 +5843,6 @@ int ocfs2_truncate_log_append(struct ocfs2_super *osb,ocfs2_journal_dirty (handle, tl_bh); bail: -mlog_exit (status);return status; }
@@ -5917,7 +5911,6 @@ static int ocfs2_replay_truncate_records(struct ocfs2_super *osb, } bail: -mlog_exit (status);return status; }
@@ -5992,7 +5985,6 @@ out_mutex:iput (data_alloc_inode); out: -mlog_exit (status);return status; }
@@ -6020,8 +6012,6 @@ static void ocfs2_truncate_log_worker(struct work_struct *work)mlog_errno (status); elseocfs2_init_steal_slots (osb ); - -mlog_exit (status); }#define OCFS2_TRUNCATE_LOG_FLUSH_INTERVAL (2 * HZ)
@@ -6067,7 +6057,6 @@ static int ocfs2_get_truncate_log_info(struct ocfs2_super *osb, *tl_inode = inode; *tl_bh = bh; bail: -mlog_exit (status);return status; }
@@ -6138,9 +6127,9 @@ bail:if (status <0 && (*tl_copy)) {kfree (*tl_copy); *tl_copy =NULL ; +mlog_errno (status); } -mlog_exit (status);return status; }
@@ -6198,7 +6187,6 @@ int ocfs2_complete_truncate_log_recovery(struct ocfs2_super *osb, bail_up:mutex_unlock (&tl_inode->i_mutex); -mlog_exit (status);return status; }
@@ -6218,8 +6206,6 @@ void ocfs2_truncate_log_shutdown(struct ocfs2_super *osb)brelse (osb->osb_tl_bh);iput (osb->osb_tl_inode); } - -mlog_exit_void (); }int ocfs2_truncate_log_init (struct ocfs2_super *osb)
@@ -6243,7 +6229,6 @@ int ocfs2_truncate_log_init(struct ocfs2_super *osb) osb->osb_tl_bh = tl_bh; osb->osb_tl_inode = tl_inode; -mlog_exit (status);return status; }
@@ -7109,7 +7094,6 @@ bail:ocfs2_free_path (path); -mlog_exit (status);return status; }
fs/ocfs2/aops.c +4 -15
@@ -123,7 +123,6 @@ static int ocfs2_symlink_get_block(struct inode *inode, sector_t iblock, bail:brelse (bh); -mlog_exit (err);return err; }
@@ -208,7 +207,6 @@ bail:if (err <0 ) err = -EIO ; -mlog_exit (err);return err; }
@@ -323,7 +321,6 @@ out_inode_unlock: out:if (unlock)unlock_page (page); -mlog_exit (ret);return ret; }
@@ -402,8 +399,6 @@ static int ocfs2_writepage(struct page *page, struct writeback_control *wbc) ret =block_write_full_page (page, ocfs2_get_block, wbc); -mlog_exit (ret); -return ret; }
@@ -484,8 +479,6 @@ static sector_t ocfs2_bmap(struct address_space *mapping, sector_t block) bail: status = err ?0 : p_blkno; -mlog_exit ((int )status); -return status; }
@@ -613,7 +606,6 @@ static ssize_t ocfs2_direct_IO(int rw, {struct file *file = iocb->ki_filp;struct inode *inode = file->f_path.dentry->d_inode->i_mapping->host; -int ret;/* * Fallback to buffered I/O if we see an inode without
@@ -626,13 +618,10 @@ static ssize_t ocfs2_direct_IO(int rw,if (i_size_read (inode) <= offset)return 0 ; - ret =__blockdev_direct_IO (rw, iocb, inode, inode->i_sb->s_bdev, - iov, offset, nr_segs, - ocfs2_direct_IO_get_blocks, - ocfs2_dio_end_io,NULL ,0 ); - -mlog_exit (ret); -return ret; +return __blockdev_direct_IO (rw, iocb, inode, inode->i_sb->s_bdev, + iov, offset, nr_segs, + ocfs2_direct_IO_get_blocks, + ocfs2_dio_end_io,NULL ,0 ); } static void ocfs2_figure_cluster_boundaries(struct ocfs2_super *osb,
fs/ocfs2/buffer_head_io.c +4 -3
@@ -66,6 +66,7 @@ int ocfs2_write_block(struct ocfs2_super *osb, struct buffer_head *bh,* can get modified during recovery even if read-only. */ if (ocfs2_is_hard_readonly (osb)) { ret = -EROFS ; +mlog_errno (ret); goto out; }
@@ -91,11 +92,11 @@ int ocfs2_write_block(struct ocfs2_super *osb, struct buffer_head *bh,* uptodate. */ ret = -EIO ;put_bh (bh); +mlog_errno (ret); }ocfs2_metadata_cache_io_unlock (ci); out: -mlog_exit (ret);return ret; }
@@ -374,7 +375,6 @@ int ocfs2_read_blocks(struct ocfs2_caching_info *ci, u64 block, int nr, bail: -mlog_exit (status);return status; }
@@ -413,6 +413,7 @@ int ocfs2_write_super_or_backup(struct ocfs2_super *osb,if (ocfs2_is_hard_readonly (osb) ||ocfs2_is_soft_readonly (osb)) { ret = -EROFS ; +mlog_errno (ret); goto out; }
@@ -432,9 +433,9 @@ int ocfs2_write_super_or_backup(struct ocfs2_super *osb,if (!buffer_uptodate (bh)) { ret = -EIO ;put_bh (bh); +mlog_errno (ret); } out: -mlog_exit (ret);return ret; }
fs/ocfs2/cluster/heartbeat.c +0 -1
@@ -1624,7 +1624,6 @@ static int o2hb_populate_slot_data(struct o2hb_region *reg) } out: -mlog_exit (ret);return ret; }
fs/ocfs2/cluster/masklog.c +1 -2
@@ -30,7 +30,7 @@struct mlog_bits mlog_and_bits =MLOG_BITS_RHS (MLOG_INITIAL_AND_MASK );EXPORT_SYMBOL_GPL (mlog_and_bits); -struct mlog_bits mlog_not_bits =MLOG_BITS_RHS (MLOG_INITIAL_NOT_MASK ); +struct mlog_bits mlog_not_bits =MLOG_BITS_RHS (0 );EXPORT_SYMBOL_GPL (mlog_not_bits);static ssize_t mlog_mask_show (u64 mask,char *buf)
@@ -80,7 +80,6 @@ struct mlog_attribute { }static struct mlog_attribute mlog_attrs[MLOG_MAX_BITS ] = { -define_mask (EXIT ),define_mask (TCP ),define_mask (MSG ),define_mask (SOCKET ),
fs/ocfs2/cluster/masklog.h +0 -44
62 lines not on this page · raw message
fs/ocfs2/dcache.c +1 -2
@@ -117,8 +117,7 @@ valid: ret =1 ; bail: -mlog_exit (ret); - +mlog (0 ,"ret = %d\n" , ret);return ret; }
fs/ocfs2/dir.c +10 -10
@@ -400,7 +400,7 @@ static int inline ocfs2_search_dirblock(struct buffer_head *bh, } bail: -mlog_exit (ret); +mlog (0 ,"ret = %d\n" , ret);return ret; }
@@ -784,7 +784,7 @@ cleanup_and_exit:for (; ra_ptr < ra_max; ra_ptr++)brelse (bh_use[ra_ptr]); -mlog_exit_ptr (ret); +mlog (0 ,"ret = %p\n" , ret);return ret; }
@@ -1198,7 +1198,6 @@ static int __ocfs2_delete_entry(handle_t *handle, struct inode *dir, de = (struct ocfs2_dir_entry *)((char *)de +le16_to_cpu (de->rec_len)); } bail: -mlog_exit (status);return status; }
@@ -1759,8 +1758,9 @@ int __ocfs2_add_entry(handle_t *handle,* from ever getting here. */ retval = -ENOSPC ; bail: +if (retval) +mlog_errno (retval); -mlog_exit (retval);return retval; }
@@ -2045,9 +2045,10 @@ int ocfs2_readdir(struct file * filp, void * dirent, filldir_t filldir) dirent, filldir, NULL);ocfs2_inode_unlock (inode, lock_level); +if (error) +mlog_errno (error); bail_nolock: -mlog_exit (error);return error; }
@@ -2119,7 +2120,8 @@ int ocfs2_check_dir_for_entry(struct inode *dir, bail:ocfs2_free_dir_lookup_result (&lookup); -mlog_exit (ret); +if (ret) +mlog_errno (ret);return ret; }
@@ -2372,7 +2374,6 @@ static int ocfs2_fill_new_dir_el(struct ocfs2_super *osb, bail:brelse (new_bh); -mlog_exit (status);return status; }
@@ -3225,7 +3226,6 @@ static int ocfs2_do_extend_dir(struct super_block *sb, bail:if (did_quota && status <0 )dquot_free_space_nodirty (dir,ocfs2_clusters_to_bytes (sb,1 )); -mlog_exit (status);return status; }
@@ -3424,7 +3424,6 @@ bail:brelse (new_bh); -mlog_exit (status);return status; }
@@ -3571,8 +3570,9 @@ next: status =0 ; bail:brelse (bh); +if (status) +mlog_errno (status); -mlog_exit (status);return status; }
fs/ocfs2/dlm/dlmrecovery.c +1 -4
@@ -727,7 +727,6 @@ static int dlm_remaster_locks(struct dlm_ctxt *dlm, u8 dead_node)if (destroy)dlm_destroy_recovery_area (dlm, dead_node); -mlog_exit (status);return status; }
@@ -1496,9 +1495,9 @@ leave:kfree (buf);if (item)kfree (item); +mlog_errno (ret); } -mlog_exit (ret);return ret; }
@@ -1567,7 +1566,6 @@ leave:dlm_lockres_put (res); }kfree (data); -mlog_exit (ret); }
@@ -1986,7 +1984,6 @@ leave:dlm_lock_put (newlock); } -mlog_exit (ret);return ret; }
fs/ocfs2/dlmglue.c +6 -65
342 lines not on this page · raw message
fs/ocfs2/export.c +3 -3
@@ -143,7 +143,7 @@ check_gen:mlog_errno (PTR_ERR (result)); bail: -mlog_exit_ptr (result); +mlog (0 ,"result = %p\n" , result);return result; }
@@ -182,7 +182,7 @@ bail_unlock:ocfs2_inode_unlock (dir,0 ); bail: -mlog_exit_ptr (parent); +mlog (0 ,"parent %p\n" , parent);return parent; }
@@ -243,7 +243,7 @@ static int ocfs2_encode_fh(struct dentry *dentry, u32 *fh_in, int *max_len, *max_len = len; bail: -mlog_exit (type); +mlog (0 ,"type = %d\n" , type);return type; }
fs/ocfs2/extent_map.c +0 -1
@@ -897,7 +897,6 @@ int ocfs2_read_virt_blocks(struct inode *inode, u64 v_block, int nr, } out: -mlog_exit (rc);return rc; }
fs/ocfs2/file.c +2 -19
@@ -135,7 +135,6 @@ static int ocfs2_file_open(struct inode *inode, struct file *file) } leave: -mlog_exit (status);return status; }
@@ -154,8 +153,6 @@ static int ocfs2_file_release(struct inode *inode, struct file *file)ocfs2_free_file_private (inode, file); -mlog_exit (0 ); -return 0 ; }
@@ -195,7 +192,8 @@ static int ocfs2_sync_file(struct file *file, int datasync) err =jbd2_journal_force_commit (journal); bail: -mlog_exit (err); +if (err) +mlog_errno (err);return (err <0 ) ? -EIO :0 ; }
@@ -278,7 +276,6 @@ int ocfs2_update_inode_atime(struct inode *inode, out_commit:ocfs2_commit_trans (OCFS2_SB (inode->i_sb), handle); out: -mlog_exit (ret);return ret; }
@@ -300,7 +297,6 @@ static int ocfs2_set_inode_size(handle_t *handle, } bail: -mlog_exit (status);return status; }
@@ -424,8 +420,6 @@ static int ocfs2_orphan_for_truncate(struct ocfs2_super *osb, out_commit:ocfs2_commit_trans (osb, handle); out: - -mlog_exit (status);return status; }
@@ -520,7 +514,6 @@ bail:if (!status &&OCFS2_I (inode)->ip_clusters ==0 ) status =ocfs2_try_remove_refcount_tree (inode, di_bh); -mlog_exit (status);return status; }
@@ -713,7 +706,6 @@ leave:brelse (bh); bh =NULL ; -mlog_exit (status);return status; }
@@ -1269,7 +1261,6 @@ bail:mlog_errno (status); } -mlog_exit (status);return status; }
@@ -1295,8 +1286,6 @@ int ocfs2_getattr(struct vfsmount *mnt, stat->blksize = osb->s_clustersize; bail: -mlog_exit (err); -return err; }
@@ -1315,7 +1304,6 @@ int ocfs2_permission(struct inode *inode, int mask)ocfs2_inode_unlock (inode,0 ); out: -mlog_exit (ret);return ret; }
@@ -1356,7 +1344,6 @@ static int __ocfs2_write_remove_suid(struct inode *inode, out_trans:ocfs2_commit_trans (osb, handle); out: -mlog_exit (ret);return ret; }
@@ -2380,7 +2367,6 @@ out_sems:if (written) ret = written; -mlog_exit (ret);return ret; }
@@ -2463,7 +2449,6 @@ static ssize_t ocfs2_file_splice_write(struct pipe_inode_info *pipe,balance_dirty_pages_ratelimited_nr (mapping, nr_pages); } -mlog_exit (ret);return ret; }
@@ -2494,7 +2479,6 @@ static ssize_t ocfs2_file_splice_read(struct file *in, ret =generic_file_splice_read (in, ppos, pipe, len, flags); bail: -mlog_exit (ret);return ret; }
@@ -2570,7 +2554,6 @@ bail:up_read (&inode->i_alloc_sem);if (rw_level !=-1 )ocfs2_rw_unlock (inode, rw_level); -mlog_exit (ret);return ret; }
fs/ocfs2/inode.c +2 -13
@@ -172,7 +172,7 @@ bail:if (!IS_ERR (inode)) {mlog (0 ,"returning inode with number %llu\n" , (unsigned long long )OCFS2_I (inode)->ip_blkno); -mlog_exit_ptr (inode); +mlog (0 ,"inode %p\n" , inode); }return inode;
@@ -203,7 +203,6 @@ static int ocfs2_find_actor(struct inode *inode, void *opaque) ret =1 ; bail: -mlog_exit (ret);return ret; }
@@ -235,7 +234,6 @@ static int ocfs2_init_locked_inode(struct inode *inode, void *opaque)lockdep_set_class (&OCFS2_I (inode)->ip_alloc_sem, &ocfs2_file_ip_alloc_sem_key); -mlog_exit (0 );return 0 ; }
@@ -381,7 +379,6 @@ void ocfs2_populate_inode(struct inode *inode, struct ocfs2_dinode *fe,if (S_ISDIR (inode->i_mode))ocfs2_resv_set_type (&OCFS2_I (inode)->ip_la_data_resv,OCFS2_RESV_FLAG_DIR ); -mlog_exit_void (); } static int ocfs2_read_locked_inode(struct inode *inode,
@@ -534,7 +531,6 @@ bail:if (args && bh)brelse (bh); -mlog_exit (status);return status; }
@@ -598,7 +594,6 @@ static int ocfs2_truncate_for_delete(struct ocfs2_super *osb, out:if (handle)ocfs2_commit_trans (osb, handle); -mlog_exit (status);return status; }
@@ -1078,7 +1073,7 @@ bail_unlock_nfs_sync: bail_unblock:ocfs2_unblock_signals (&oldset); bail: -mlog_exit_void (); +return ; }static void ocfs2_clear_inode (struct inode *inode)
@@ -1177,8 +1172,6 @@ static void ocfs2_clear_inode(struct inode *inode)*/ jbd2_journal_release_jbd_inode (OCFS2_SB (inode->i_sb)->journal->j_journal, &oi->ip_jinode); - -mlog_exit_void (); }void ocfs2_evict_inode (struct inode *inode)
@@ -1208,7 +1201,6 @@ int ocfs2_drop_inode(struct inode *inode)else res =generic_drop_inode (inode); -mlog_exit_void ();return res; }
@@ -1248,8 +1240,6 @@ int ocfs2_inode_revalidate(struct dentry *dentry) }ocfs2_inode_unlock (inode,0 ); bail: -mlog_exit (status); -return status; }
@@ -1296,7 +1286,6 @@ int ocfs2_mark_inode_dirty(handle_t *handle,ocfs2_journal_dirty (handle, bh); leave: -mlog_exit (status);return status; }
fs/ocfs2/ioctl.c +0 -2
@@ -59,7 +59,6 @@ static int ocfs2_get_inode_attr(struct inode *inode, unsigned *flags) *flags =OCFS2_I (inode)->ip_attr;ocfs2_inode_unlock (inode,0 ); -mlog_exit (status);return status; }
@@ -125,7 +124,6 @@ bail:brelse (bh); -mlog_exit (status);return status; }
fs/ocfs2/journal.c +0 -19
@@ -335,7 +335,6 @@ static int ocfs2_commit_cache(struct ocfs2_super *osb)ocfs2_wake_downconvert_thread (osb);wake_up (&journal->j_checkpointed); finally: -mlog_exit (status);return status; }
@@ -450,8 +449,6 @@ int ocfs2_extend_trans(handle_t *handle, int nblocks) status =0 ; bail: - -mlog_exit (status);return status; }
@@ -665,7 +662,6 @@ static int __ocfs2_journal_access(handle_t *handle,mlog (ML_ERROR ,"Error %d getting %d access to buffer!\n" , status, type); -mlog_exit (status);return status; }
@@ -739,8 +735,6 @@ void ocfs2_journal_dirty(handle_t *handle, struct buffer_head *bh) status =jbd2_journal_dirty_metadata (handle, bh);BUG_ON (status); - -mlog_exit_void (); }#define OCFS2_DEFAULT_COMMIT_INTERVAL (HZ * JBD2_DEFAULT_MAX_COMMIT_AGE)
@@ -854,7 +848,6 @@ done: } } -mlog_exit (status);return status; }
@@ -899,7 +892,6 @@ static int ocfs2_journal_toggle_dirty(struct ocfs2_super *osb,if (status <0 )mlog_errno (status); -mlog_exit (status);return status; }
@@ -989,7 +981,6 @@ void ocfs2_journal_shutdown(struct ocfs2_super *osb) done:if (inode)iput (inode); -mlog_exit_void (); } static void ocfs2_clear_journal_error(struct super_block *sb,
@@ -1048,7 +1039,6 @@ int ocfs2_journal_load(struct ocfs2_journal *journal, int local, int replayed) osb->commit_task =NULL ; done: -mlog_exit (status);return status; }
@@ -1072,7 +1062,6 @@ int ocfs2_journal_wipe(struct ocfs2_journal *journal, int full)mlog_errno (status); bail: -mlog_exit (status);return status; }
@@ -1146,7 +1135,6 @@ static int ocfs2_force_read_journal(struct inode *inode) bail:for (i =0 ; i <CONCURRENT_JOURNAL_FILL ; i++)brelse (bhs[i]); -mlog_exit (status);return status; }
@@ -1236,7 +1224,6 @@ void ocfs2_complete_recovery(struct work_struct *work) }mlog (0 ,"Recovery completion\n" ); -mlog_exit_void (); }/* NOTE: This function always eats your references to la_dinode and
@@ -1432,7 +1419,6 @@ bail:if (rm_quota)kfree (rm_quota); -mlog_exit (status);/* no one is callint kthread_stop() for us so the kthread() api * requires that we call do_exit(). And it isn't exported, but * complete_and_exit() seems to be a minimal wrapper around it. */
@@ -1469,8 +1455,6 @@ void ocfs2_recovery_thread(struct ocfs2_super *osb, int node_num) out:mutex_unlock (&osb->recovery_lock);wake_up (&osb->recovery_event); - -mlog_exit_void (); } static int ocfs2_read_journal_inode(struct ocfs2_super *osb,
@@ -1646,7 +1630,6 @@ done:brelse (bh); -mlog_exit (status);return status; }
@@ -1716,7 +1699,6 @@ static int ocfs2_recover_node(struct ocfs2_super *osb, status =0 ; done: -mlog_exit (status);return status; }
@@ -1826,7 +1808,6 @@ int ocfs2_mark_dead_nodes(struct ocfs2_super *osb) status =0 ; bail: -mlog_exit (status);return status; }
fs/ocfs2/localalloc.c +20 -15
@@ -364,7 +364,8 @@ bail:mlog (0 ,"Local alloc window bits = %d\n" , osb->local_alloc_bits); -mlog_exit (status); +if (status) +mlog_errno (status);return status; }
@@ -478,8 +479,6 @@ out:if (alloc_copy)kfree (alloc_copy); - -mlog_exit_void (); }/*
@@ -548,7 +547,8 @@ bail:iput (inode); } -mlog_exit (status); +if (status) +mlog_errno (status);return status; }
@@ -614,7 +614,8 @@ out_mutex: out:if (!status)ocfs2_init_steal_slots (osb); -mlog_exit (status); +if (status) +mlog_errno (status);return status; }
@@ -724,7 +725,8 @@ bail:mlog (0 ,"bits=%d, slot=%d, ret=%d\n" , bits_wanted, osb->slot_num, status); -mlog_exit (status); +if (status) +mlog_errno (status);return status; }
@@ -779,7 +781,8 @@ int ocfs2_claim_local_alloc_bits(struct ocfs2_super *osb,ocfs2_journal_dirty (handle, osb->local_alloc_bh); bail: -mlog_exit (status); +if (status) +mlog_errno (status);return status; }
@@ -794,7 +797,7 @@ static u32 ocfs2_local_alloc_count_bits(struct ocfs2_dinode *alloc)for (i =0 ; i <le16_to_cpu (la->la_size); i++) count +=hweight8 (buffer[i]); -mlog_exit (count); +mlog (0 ,"count %u\n" , count);return count; }
@@ -884,7 +887,7 @@ bail:if (local_resv)ocfs2_resv_discard (resmap, resv); -mlog_exit (bitoff); +mlog (0 ,"bitoff %d\n" , bitoff);return bitoff; }
@@ -898,8 +901,6 @@ static void ocfs2_clear_local_alloc(struct ocfs2_dinode *alloc) la->la_bm_off =0 ;for (i =0 ; i <le16_to_cpu (la->la_size); i++) la->la_bitmap[i] =0 ; - -mlog_exit_void (); }#if 0
@@ -995,7 +996,8 @@ static int ocfs2_sync_local_to_main(struct ocfs2_super *osb, } bail: -mlog_exit (status); +if (status) +mlog_errno (status);return status; }
@@ -1120,7 +1122,8 @@ bail: *ac =NULL ; } -mlog_exit (status); +if (status) +mlog_errno (status);return status; }
@@ -1212,7 +1215,8 @@ retry_enospc:mlog (0 ,"window bits = %u\n" ,le32_to_cpu (alloc->id1.bitmap1.i_total)); bail: -mlog_exit (status); +if (status) +mlog_errno (status);return status; }
@@ -1308,7 +1312,8 @@ bail:if (ac)ocfs2_free_alloc_context (ac); -mlog_exit (status); +if (status) +mlog_errno (status);return status; }
fs/ocfs2/mmap.c +1 -1
@@ -55,7 +55,7 @@ static int ocfs2_fault(struct vm_area_struct *area, struct vm_fault *vmf) ret =filemap_fault (area, vmf);ocfs2_unblock_signals (&oldset); -mlog_exit_ptr (vmf->page); +mlog (0 ,"%p\n" , vmf->page);return ret; }
fs/ocfs2/namei.c +31 -16
143 lines not on this page · raw message
fs/ocfs2/quota_global.c +10 -7
@@ -402,7 +402,8 @@ int ocfs2_global_read_info(struct super_block *sb, int type) msecs_to_jiffies(oinfo->dqi_syncms)); out_err: -mlog_exit (status); +if (status) +mlog_errno (status);return status; out_unlock:ocfs2_unlock_global_qf (oinfo,0 );
@@ -621,7 +622,6 @@ static int ocfs2_sync_dquot_helper(struct dquot *dquot, unsigned long type) out_ilock:ocfs2_unlock_global_qf (oinfo,1 ); out: -mlog_exit (status);return status; }
@@ -660,7 +660,6 @@ static int ocfs2_write_dquot(struct dquot *dquot)mutex_unlock (&sb_dqopt (dquot->dq_sb)->dqio_mutex);ocfs2_commit_trans (osb, handle); out: -mlog_exit (status);return status; }
@@ -722,7 +721,8 @@ out_ilock:ocfs2_unlock_global_qf (oinfo,1 ); out:mutex_unlock (&dquot->dq_lock); -mlog_exit (status); +if (status) +mlog_errno (status);return status; }
@@ -809,7 +809,8 @@ out_dq:set_bit (DQ_ACTIVE_B , &dquot->dq_flags); out:mutex_unlock (&dquot->dq_lock); -mlog_exit (status); +if (status) +mlog_errno (status);return status; }
@@ -866,7 +867,8 @@ out_dlock: out_ilock:ocfs2_unlock_global_qf (oinfo,1 ); out: -mlog_exit (status); +if (status) +mlog_errno (status);return status; }
@@ -891,7 +893,8 @@ static int ocfs2_write_info(struct super_block *sb, int type) out_ilock:ocfs2_unlock_global_qf (oinfo,1 ); out: -mlog_exit (status); +if (status) +mlog_errno (status);return status; }
fs/ocfs2/quota_local.c +2 -1
@@ -575,7 +575,8 @@ out_put_bh: }if (status <0 )free_recovery_list (&(rec->r_list[type])); -mlog_exit (status); +if (status) +mlog_errno (status);return status; }
fs/ocfs2/resize.c +2 -4
@@ -82,7 +82,6 @@ static u16 ocfs2_calc_new_backup_super(struct inode *inode, backups++; } -mlog_exit_void ();return backups; }
@@ -176,7 +175,8 @@ out_rollback:le16_add_cpu (&group->bg_free_bits_count,-1 * num_bits); } out: -mlog_exit (ret); +if (ret) +mlog_errno (ret);return ret; }
@@ -375,7 +375,6 @@ out_mutex:iput (main_bm_inode); out: -mlog_exit_void ();return ret; }
@@ -585,6 +584,5 @@ out_mutex:iput (main_bm_inode); out: -mlog_exit_void ();return ret; }
fs/ocfs2/slot_map.c +0 -1
@@ -510,7 +510,6 @@ int ocfs2_find_slot(struct ocfs2_super *osb)mlog_errno (status); bail: -mlog_exit (status);return status; }
fs/ocfs2/suballoc.c +36 -18
161 lines not on this page · raw message
fs/ocfs2/super.c +14 -23
@@ -477,7 +477,8 @@ static int ocfs2_init_global_system_inodes(struct ocfs2_super *osb) } bail: -mlog_exit (status); +if (status) +mlog_errno (status);return status; }
@@ -505,7 +506,8 @@ static int ocfs2_init_local_system_inodes(struct ocfs2_super *osb) } bail: -mlog_exit (status); +if (status) +mlog_errno (status);return status; }
@@ -535,7 +537,7 @@ static void ocfs2_release_system_inodes(struct ocfs2_super *osb) }if (!osb->local_system_inodes) - goto out; +return ;for (i =0 ; i <NUM_LOCAL_SYSTEM_INODES * osb->max_slots; i++) {if (osb->local_system_inodes[i]) {
@@ -546,9 +548,6 @@ static void ocfs2_release_system_inodes(struct ocfs2_super *osb)kfree (osb->local_system_inodes); osb->local_system_inodes =NULL ; - -out: -mlog_exit (0 ); }/* We're allocating fs objects, use GFP_NOFS */
@@ -1197,7 +1196,6 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent)mlog_errno (status);atomic_set (&osb->vol_state,VOLUME_DISABLED );wake_up (&osb->osb_mount_event); -mlog_exit (status);return status; } }
@@ -1211,7 +1209,6 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent)/* Start this when the mount is almost sure of being successful */ ocfs2_orphan_scan_start (osb); -mlog_exit (status);return status; read_super_error:
@@ -1226,7 +1223,8 @@ read_super_error:ocfs2_dismount_volume (sb,1 ); } -mlog_exit (status); +if (status) +mlog_errno (status);return status; }
@@ -1518,7 +1516,6 @@ static int ocfs2_parse_options(struct super_block *sb, status =1 ; bail: -mlog_exit (status);return status; }
@@ -1647,10 +1644,9 @@ leave:ocfs2_quota_shutdown ();ocfs2_free_mem_caches ();exit_ocfs2_uptodate_cache (); +mlog_errno (status); } -mlog_exit (status); -if (status >=0 ) {return register_filesystem (&ocfs2_fs_type); }else
@@ -1675,8 +1671,6 @@ static void __exit ocfs2_exit(void)unregister_filesystem (&ocfs2_fs_type);exit_ocfs2_uptodate_cache (); - -mlog_exit_void (); }static void ocfs2_put_super (struct super_block *sb)
@@ -1685,8 +1679,6 @@ static void ocfs2_put_super(struct super_block *sb)ocfs2_sync_blockdev (sb);ocfs2_dismount_volume (sb,0 ); - -mlog_exit_void (); }static int ocfs2_statfs (struct dentry *dentry,struct kstatfs *buf)
@@ -1745,7 +1737,8 @@ bail:if (inode)iput (inode); -mlog_exit (status); +if (status) +mlog_errno (status);return status; }
@@ -1909,7 +1902,6 @@ leave:if (unlock_super)ocfs2_super_unlock (osb,1 ); -mlog_exit (status);return status; }
@@ -2358,7 +2350,6 @@ static int ocfs2_initialize_super(struct super_block *sb, } bail: -mlog_exit (status);return status; }
@@ -2428,7 +2419,8 @@ static int ocfs2_verify_volume(struct ocfs2_dinode *di, } out: -mlog_exit (status); +if (status) +mlog_errno (status);return status; }
@@ -2523,7 +2515,8 @@ finally:if (local_alloc)kfree (local_alloc); -mlog_exit (status); +if (status) +mlog_errno (status);return status; }
@@ -2552,8 +2545,6 @@ static void ocfs2_delete_osb(struct ocfs2_super *osb)kfree (osb->uuid_str);ocfs2_put_dlm_debug (osb->osb_dlm_debug);memset (osb,0 ,sizeof (struct ocfs2_super )); - -mlog_exit_void (); }/* Put OCFS2 into a readonly state, or (if the user specifies it),
fs/ocfs2/symlink.c +4 -3
@@ -72,7 +72,6 @@ static char *ocfs2_fast_symlink_getlink(struct inode *inode, fe = (struct ocfs2_dinode *) (*bh)->b_data; link = (char *) fe->id2.i_symlink; bail: -mlog_exit (status);return link; }
@@ -100,7 +99,8 @@ static int ocfs2_readlink(struct dentry *dentry,brelse (bh); out: -mlog_exit (ret); +if (ret) +mlog_errno (ret);return ret; }
@@ -136,7 +136,8 @@ bail:nd_set_link (nd, status ?ERR_PTR (status) : link);brelse (bh); -mlog_exit (status); +if (status) +mlog_errno (status);return NULL ; }
fs/ocfs2/xattr.c +0 -2
@@ -5570,7 +5570,6 @@ static int ocfs2_xattr_set_entry_bucket(struct inode *inode, out: -mlog_exit (ret);return ret; }
@@ -5637,7 +5636,6 @@ static int ocfs2_xattr_set_entry_index_block(struct inode *inode,mlog_errno (ret); out: -mlog_exit (ret);return ret; }
Signature · 1 line
1.7.1.GIT
PATCH 3/5 ocfs2: Remove EXIT from masklog.
Quoted 6 lines · Tao Ma
mlog_exitis used to record the exit status of a function. But because it is added in so many functions, if we enable it, the system logs get filled up quickly and cause too much I/O. So actually no one can open it for a production system or even for a test.
Quoted 9 lines
This patch just try to remove it. So in case of report error, a
mlog_errnois used while if all the errors in the function are properly reported,mlog_exitis just removed.
formlog_exit:
1. if all the error paths already usemlog_errno, it is just removed. Otherwise, it will be replaced bymlog_errno.
2. if it is used to print some return value, it is replaced withmlog(0,...).mlog_exit_ptris changed to mlog(0.
This one is great, except I would only select certain exit
return codes to log. Most of them aren't very interesting.
Joel
Signature · 9 lines
Life's Little Instruction Book #69 "Whistle" Joel Becker Senior Development Manager Oracle E-mail: joel.becker at oracle.com Phone: (650) 506-8127
PATCH 3/5 ocfs2: Remove EXIT from masklog.
Quoted 19 lines · Joel Becker
Quoted 6 lines · Tao Ma
mlog_exitis used to record the exit status of a function. But because it is added in so many functions, if we enable it, the system logs get filled up quickly and cause too much I/O. So actually no one can open it for a production system or even for a test.Quoted 10 lines
This patch just try to remove it. So in case of report error, a
mlog_errnois used while if all the errors in the function are properly reported,mlog_exitis just removed.
formlog_exit:
1. if all the error paths already usemlog_errno, it is just removed. Otherwise, it will be replaced bymlog_errno.
2. if it is used to print some return value, it is replaced withmlog(0,...).mlog_exit_ptris changed to mlog(0.
Quoted 3 lines
This one is great, except I would only select certain exit
return codes to log. Most of them aren't very interesting.
Actually I have checked all of them to make sure that only the error code is prompted.
But maybe I may miss something, so let us wait and see.
Regards,
Tao
PATCH 4/5 ocfs2: Add ocfs2_trace.h.
In reply to Tao MaAbout one year ago, Wengang Wang tried some first steps to add tracepoints to ocfs2. But at that time we don't have ocfs2 1.6 introduced, so we delay this work until now after ocfs2 1.6 and UEK(Unbreakable Enterprise Kernel) are released.
Wengang's original patch is here:
http://oss.oracle.com/pipermail/ocfs2-devel/2009-November/005512.html
But as Steven Rostedt indicated in his article
http://lwn.net/Articles/383362/, we'd better have our trace files resides in fs/ocfs2, so I rewrited the patch using the method Steven mentioned in that article.
--- fs/ocfs2/ocfs2_trace.h | 16 ++++++++++++++++ fs/ocfs2/super.c | 3 +++ 2 files changed, 19 insertions(+), 0 deletions(-) create mode 100644 fs/ocfs2/ocfs2_trace.h
fs/ocfs2/ocfs2_trace.h new file +16 -0
@@ -0,0 +1,16 @@ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM ocfs2 + +#if !defined(_TRACE_OCFS2_H) || defined(TRACE_HEADER_MULTI_READ ) +#define _TRACE_OCFS2_H + +#include <linux/tracepoint.h> + + +#endif /* _TRACE_OCFS2_H */ + +/* This part must be outside protection */ +#undef TRACE_INCLUDE_PATH +#define TRACE_INCLUDE_PATH . +#define TRACE_INCLUDE_FILE ocfs2_trace +#include <trace/define_trace.h>
fs/ocfs2/super.c +3 -0
@@ -43,6 +43,9 @@#include <linux/quotaops.h> #include <linux/smp_lock.h> +#define CREATE_TRACE_POINTS +#include "ocfs2_trace.h" +#define MLOG_MASK_PREFIX ML_SUPER#include <cluster/masklog.h>
Signature · 1 line
1.7.1.GIT
PATCH 4/5 ocfs2: Add ocfs2_trace.h.
Quoted 9 lines · Tao Ma
About one year ago, Wengang Wang tried some first steps to add tracepoints to ocfs2. But at that time we don't have ocfs2 1.6 introduced, so we delay this work until now after ocfs2 1.6 and UEK(Unbreakable Enterprise Kernel) are released.
Wengang's original patch is here:
http://oss.oracle.com/pipermail/ocfs2-devel/2009-November/005512.html
Quoted 7 lines
But as Steven Rostedt indicated in his article
http://lwn.net/Articles/383362/, we'd better have our trace files resides in fs/ocfs2, so I rewrited the patch using the method Steven mentioned in that article.Signed-off-by Wengang Wang <[email protected]>Signed-off-by Tao Ma <[email protected]>
Did you author this or did Wengang? If you are the author, only
your signoff is necessary. You should, of course, credit him in the description, and you can get his Acked-by: if you feel it necessary.
I realize this patch is only a slight difference from his
original, so he could perhaps still be considered the author. I'm unsure how much rewriting you did in the second patch, though.
Joel
Signature · 9 lines
"I think it would be a good idea."
- Mahatma Ghandi, when asked what he thought of Western
civilization
Joel Becker
Senior Development Manager
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127PATCH 4/5 ocfs2: Add ocfs2_trace.h.
Quoted 16 lines · Joel Becker
Quoted 14 lines · Tao Ma
About one year ago, Wengang Wang tried some first steps to add tracepoints to ocfs2. But at that time we don't have ocfs2 1.6 introduced, so we delay this work until now after ocfs2 1.6 and UEK(Unbreakable Enterprise Kernel) are released.
Wengang's original patch is here:
http://oss.oracle.com/pipermail/ocfs2-devel/2009-November/005512.htmlBut as Steven Rostedt indicated in his article
http://lwn.net/Articles/383362/, we'd better have our trace files resides in fs/ocfs2, so I rewrited the patch using the method Steven mentioned in that article.
Quoted 8 lines
Quoted 3 lines
Signed-off-by Wengang Wang <[email protected]>Signed-off-by Tao Ma <[email protected]>Did you author this or did Wengang? If you are the author, only
your signoff is necessary. You should, of course, credit him in the description, and you can get his Acked-by: if you feel it necessary.
Yeah, sorry, I forgot to add a "From:Wengang Wang <[email protected]>" in my guilt.
That way, it will generate the commit with Author of wengang wang automatically. Since this patch only
includes about 19 lines of change, and I changed about 5-6 lines, the author should be him.
Quoted 4 lines
I realize this patch is only a slight difference from his
original, so he could perhaps still be considered the author. I'm unsure how much rewriting you did in the second patch, though.
As for the 2nd one, his original patch has this diffstat:fs/ocfs2/alloc.c | 47 +++++----- include/trace/events/ocfs2.h | 202
++++++++++++++++++++++++++++++++++++++++++
2 files changed, 224 insertions(+), 25 deletions(-)
My patch has
fs/ocfs2/alloc.c | 165 +++++++++-------- fs/ocfs2/ocfs2_trace.h | 485 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 573 insertions(+), 77 deletions(-)
So I guess the author should be me(What's more, I have changed some of his modifications also.)?
Or I should leave his patch there with his sob, while adding a new patch of mine?
Regards,
Tao
PATCH 4/5 ocfs2: Add ocfs2_trace.h.
Quoted 7 lines · Tao Ma
Joel Becker wrote:
Yeah, sorry, I forgot to add a "From:Wengang Wang <[email protected]>" in my guilt.
That way, it will generate the commit with Author of wengang wang automatically. Since this patch only
includes about 19 lines of change, and I changed about 5-6 lines, the author should be him.
No worries. Sounds correct.
Quoted 8 lines
As for the 2nd one, his original patch has this diffstat:
fs/ocfs2/alloc.c| 47 +++++-----include/trace/events/ocfs2.h| 202
++++++++++++++++++++++++++++++++++++++++++2 files changed, 224 insertions(+), 25 deletions(-)My patch has
Quoted 8 lines
fs/ocfs2/alloc.c | 165 +++++++++-------- fs/ocfs2/ocfs2_trace.h | 485 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 573 insertions(+), 77 deletions(-)So I guess the author should be
me(What's more, I have changed some of his modifications also.)?
Or I should leave his patch there with his sob, while adding a new patch of mine?
You are clearly the author. You should credit him in the commit
text, and add him as a Cc: line at the bottom, but it is now your work.
Joel
Signature · 8 lines
"A narcissist is someone better looking than you are."
- Gore Vidal
Joel Becker
Senior Development Manager
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127PATCH 5/5 ocfs2: Remove mlog(0) from fs/ocfs2/alloc.c
In reply to Tao MaThis is the first try of replacing debug mlog(0,...) to trace events. Wengang has did some work in his original patch
http://oss.oracle.com/pipermail/ocfs2-devel/2009-November/005513.html
But he didn't finished it.
So this patch removes all mlog(0,...) from alloc.c and adds the corresponding tracepoints. Different mlogs have different solutions.
1. Some are replaced with trace event directly.
2. Some are replaced and some new parameters are added since I think we need to know the btree owner in that case.
3. Some are combined into one trace events.
4. Some redundant mlogs are removed.
What's more, it defines some event classes so that we can use them later.
--- fs/ocfs2/alloc.c | 165 +++++++++-------- fs/ocfs2/ocfs2_trace.h | 485 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 573 insertions(+), 77 deletions(-)
fs/ocfs2/alloc.c +88 -77
@@ -50,6 +50,7 @@#include "uptodate.h" #include "xattr.h" #include "refcounttree.h" +#include "ocfs2_trace.h" #include "buffer_head_io.h"
@@ -886,8 +887,7 @@ static int ocfs2_validate_extent_block(struct super_block *sb,struct ocfs2_extent_block *eb = (struct ocfs2_extent_block *)bh->b_data; -mlog (0 ,"Validating extent block %llu\n" , - (unsigned long long )bh->b_blocknr); +trace_ocfs2_validate_extent_block ((unsigned long long )bh->b_blocknr);BUG_ON (!buffer_uptodate (bh));
@@ -985,7 +985,7 @@ int ocfs2_num_free_extents(struct ocfs2_super *osb, bail:brelse (eb_bh); -mlog (0 ,"retval = %d\n" , retval); +trace_ocfs2_num_free_extents (retval);return retval; }
@@ -1194,8 +1194,11 @@ static int ocfs2_add_branch(handle_t *handle,* from new_cpos). */ if (root_end > new_cpos) { -mlog (0 ,"adjust the cluster end from %u to %u\n" , - root_end, new_cpos); +trace_ocfs2_adjust_rightmost_branch ( + (unsigned long long ) +ocfs2_metadata_cache_owner (et->et_ci), + root_end, new_cpos); + status =ocfs2_adjust_rightmost_branch (handle, et);if (status) {mlog_errno (status);
@@ -1527,7 +1530,10 @@ static int ocfs2_grow_tree(handle_t *handle, struct ocfs2_extent_tree *et,* another tree level */ if (shift) {BUG_ON (bh); -mlog (0 ,"need to shift tree depth (current = %d)\n" , depth); +trace_ocfs2_grow_tree ( + (unsigned long long ) +ocfs2_metadata_cache_owner (et->et_ci), + depth);/* ocfs2_shift_tree_depth will return us a buffer with * the new extent block (so we can pass that to
@@ -1557,7 +1563,6 @@ static int ocfs2_grow_tree(handle_t *handle, struct ocfs2_extent_tree *et,/* call ocfs2_add_branch to add the final part of the tree with * the new data. */ -mlog (0 ,"add branch. bh = %p\n" , bh); ret =ocfs2_add_branch (handle, et, bh, last_eb_bh, meta_ac);if (ret <0 ) {
@@ -1632,8 +1637,9 @@ static void ocfs2_rotate_leaf(struct ocfs2_extent_list *el, } insert_index = i; -mlog (0 ,"ins %u: index %d, has_empty %d, next_free %d, count %d\n" , - insert_cpos, insert_index, has_empty, next_free,le16_to_cpu (el->l_count)); +trace_ocfs2_rotate_leaf (insert_cpos, insert_index, + has_empty, next_free, +le16_to_cpu (el->l_count));BUG_ON (insert_index <0 );BUG_ON (insert_index >=le16_to_cpu (el->l_count));
@@ -2046,7 +2052,7 @@ static void ocfs2_complete_edge_insert(handle_t *handle, left_el =path_leaf_el (left_path); right_el =path_leaf_el (right_path);for (i = left_path->p_tree_depth -1 ; i > subtree_index; i--) { -mlog (0 ,"Adjust records at index %u\n" , i); +trace_ocfs2_complete_edge_insert (i);/* * One nice property of knowing that all of these
@@ -2376,7 +2382,9 @@ static int ocfs2_rotate_tree_right(handle_t *handle, goto out; } -mlog (0 ,"Insert: %u, first left path cpos: %u\n" , insert_cpos, cpos); +trace_ocfs2_rotate_tree_right ( + (unsigned long long )ocfs2_metadata_cache_owner (et->et_ci), + insert_cpos, cpos);/* * What we want to do here is:
@@ -2405,8 +2413,10 @@ static int ocfs2_rotate_tree_right(handle_t *handle,* rotating subtrees. */ while (cpos && insert_cpos <= cpos) { -mlog (0 ,"Rotating a tree: ins. cpos: %u, left path cpos: %u\n" , - insert_cpos, cpos); +trace_ocfs2_rotate_tree_right ( + (unsigned long long ) +ocfs2_metadata_cache_owner (et->et_ci), + insert_cpos, cpos); ret =ocfs2_find_path (et->et_ci, left_path, cpos);if (ret) {
@@ -2448,10 +2458,10 @@ static int ocfs2_rotate_tree_right(handle_t *handle, start =ocfs2_find_subtree_root (et, left_path, right_path); -mlog (0 ,"Subtree root at index %d (blk %llu, depth %d)\n" , - start, - (unsigned long long ) right_path->p_node[start].bh->b_blocknr, - right_path->p_tree_depth); +trace_ocfs2_rotate_subtree (start, + (unsigned long long ) + right_path->p_node[start].bh->b_blocknr, + right_path->p_tree_depth); ret =ocfs2_extend_rotate_transaction (handle, start, orig_credits, right_path);
@@ -2951,8 +2961,7 @@ static int __ocfs2_rotate_tree_left(handle_t *handle, subtree_root =ocfs2_find_subtree_root (et, left_path, right_path); -mlog (0 ,"Subtree root at index %d (blk %llu, depth %d)\n" , - subtree_root, +trace_ocfs2_rotate_subtree (subtree_root, (unsigned long long ) right_path->p_node[subtree_root].bh->b_blocknr, right_path->p_tree_depth);
@@ -3976,9 +3985,11 @@ static int ocfs2_append_rec_to_path(handle_t *handle, goto out; } -mlog (0 ,"Append may need a left path update. cpos: %u, " -"left_cpos: %u\n" ,le32_to_cpu (insert_rec->e_cpos), - left_cpos); +trace_ocfs2_append_rec_to_path ( + (unsigned long long ) +ocfs2_metadata_cache_owner (et->et_ci), +le32_to_cpu (insert_rec->e_cpos), + left_cpos);/* * No need to worry if the append is already in the
@@ -4665,9 +4676,9 @@ int ocfs2_insert_extent(handle_t *handle,struct ocfs2_insert_type insert = {0 , };struct ocfs2_extent_rec rec; -mlog (0 ,"add %u clusters at position %u to owner %llu\n" , - new_clusters, cpos, - (unsigned long long )ocfs2_metadata_cache_owner (et->et_ci)); +trace_ocfs2_insert_extent_start ( + (unsigned long long )ocfs2_metadata_cache_owner (et->et_ci), + cpos, new_clusters);memset (&rec,0 ,sizeof (rec)); rec.e_cpos =cpu_to_le32 (cpos);
@@ -4687,11 +4698,9 @@ int ocfs2_insert_extent(handle_t *handle, goto bail; } -mlog (0 ,"Insert.appending: %u, Insert.Contig: %u, " -"Insert.contig_index: %d, Insert.free_records: %d, " -"Insert.tree_depth: %d\n" , - insert.ins_appending, insert.ins_contig, insert.ins_contig_index, - free_records, insert.ins_tree_depth); +trace_ocfs2_insert_extent (insert.ins_appending, insert.ins_contig, + insert.ins_contig_index, free_records, + insert.ins_tree_depth);if (insert.ins_contig ==CONTIG_NONE && free_records ==0 ) { status = ocfs2_grow_tree(handle, et,
@@ -4732,7 +4741,7 @@ int ocfs2_add_clusters_in_btree(handle_t *handle,struct ocfs2_alloc_context *meta_ac, enum ocfs2_alloc_restarted *reason_ret) { - int status = 0; + int status = 0, err = 0;int free_extents;enum ocfs2_alloc_restarted reason =RESTART_NONE ;u32 bit_off, num_bits;
@@ -4759,14 +4768,14 @@ int ocfs2_add_clusters_in_btree(handle_t *handle,* 2) we are so fragmented, we've needed to add metadata too * many times. */ if (!free_extents && !meta_ac) { -mlog (0 ,"we haven't reserved any metadata!\n" ); + err =-1 ; status = -EAGAIN ; reason =RESTART_META ; goto leave; }else if ((!free_extents) && (ocfs2_alloc_context_bits_left (meta_ac) <ocfs2_extend_meta_needed (et->et_root_el))) { -mlog (0 ,"filesystem is really fragmented...\n" ); + err =-2 ; status = -EAGAIN ; reason =RESTART_META ; goto leave;
@@ -4791,9 +4800,9 @@ int ocfs2_add_clusters_in_btree(handle_t *handle, } block =ocfs2_clusters_to_blocks (osb->sb, bit_off); -mlog (0 ,"Allocating %u clusters at block %u for owner %llu\n" , - num_bits, bit_off, - (unsigned long long )ocfs2_metadata_cache_owner (et->et_ci)); +trace_ocfs2_add_clusters_in_btree ( + (unsigned long long )ocfs2_metadata_cache_owner (et->et_ci), + bit_off, num_bits); status =ocfs2_insert_extent (handle, et, *logical_offset, block, num_bits, flags, meta_ac);if (status <0 ) {
@@ -4807,8 +4816,7 @@ int ocfs2_add_clusters_in_btree(handle_t *handle, *logical_offset += num_bits;if (clusters_to_add) { -mlog (0 ,"need to alloc once more, wanted = %u\n" , - clusters_to_add); + err = clusters_to_add; status = -EAGAIN ; reason =RESTART_TRANS ; }
@@ -4816,6 +4824,7 @@ int ocfs2_add_clusters_in_btree(handle_t *handle, leave:if (reason_ret) *reason_ret = reason; +trace_ocfs2_add_clusters_in_btree_ret (status, reason, err);return status; }
@@ -5041,9 +5050,9 @@ int ocfs2_split_extent(handle_t *handle, ctxt.c_has_empty_extent =ocfs2_is_empty_extent (&el->l_recs[0 ]); -mlog (0 ,"index: %d, contig: %u, has_empty: %u, split_covers: %u\n" , - split_index, ctxt.c_contig_type, ctxt.c_has_empty_extent, - ctxt.c_split_covers_rec); +trace_ocfs2_split_extent (split_index, ctxt.c_contig_type, + ctxt.c_has_empty_extent, + ctxt.c_split_covers_rec);if (ctxt.c_contig_type ==CONTIG_NONE ) {if (ctxt.c_split_covers_rec)
@@ -5177,8 +5186,9 @@ int ocfs2_mark_extent_written(struct inode *inode, {int ret; -mlog (0 ,"Inode %lu cpos %u, len %u, phys clusters %u\n" , - inode->i_ino, cpos, len, phys); +trace_ocfs2_mark_extent_written ( + (unsigned long long )OCFS2_I (inode)->ip_blkno, + cpos, len, phys);if (!ocfs2_writes_unwritten_extents (OCFS2_SB (inode->i_sb))) { ocfs2_error(inode->i_sb, "Inode %llu has unwritten extents "
@@ -5497,11 +5507,10 @@ int ocfs2_remove_extent(handle_t *handle,BUG_ON (cpos <le32_to_cpu (rec->e_cpos) || trunc_range > rec_range); -mlog (0 ,"Owner %llu, remove (cpos %u, len %u). Existing index %d " -"(cpos %u, len %u)\n" , - (unsigned long long )ocfs2_metadata_cache_owner (et->et_ci), - cpos, len, index, -le32_to_cpu (rec->e_cpos),ocfs2_rec_clusters (el, rec)); +trace_ocfs2_remove_extent ( + (unsigned long long )ocfs2_metadata_cache_owner (et->et_ci), + cpos, len, index,le32_to_cpu (rec->e_cpos), +ocfs2_rec_clusters (el, rec));if (le32_to_cpu (rec->e_cpos) == cpos || rec_range == trunc_range) { ret = ocfs2_truncate_rec(handle, et, path, index, dealloc,
@@ -5780,9 +5789,6 @@ int ocfs2_truncate_log_append(struct ocfs2_super *osb,struct ocfs2_dinode *di;struct ocfs2_truncate_log *tl; -mlog (0 ,"start_blk = %llu, num_clusters = %u\n" , - (unsigned long long )start_blk, num_clusters); -BUG_ON (mutex_trylock (&tl_inode->i_mutex)); start_cluster =ocfs2_blocks_to_clusters (osb->sb, start_blk);
@@ -5819,10 +5825,9 @@ int ocfs2_truncate_log_append(struct ocfs2_super *osb, goto bail; } -mlog (0 ,"Log truncate of %u clusters starting at cluster %u to " -"%llu (index = %d)\n" , num_clusters, start_cluster, - (unsigned long long )OCFS2_I (tl_inode)->ip_blkno, index); - +trace_ocfs2_truncate_log_append ( + (unsigned long long )OCFS2_I (tl_inode)->ip_blkno, index, + start_cluster, num_clusters);if (ocfs2_truncate_log_can_coalesce (tl, start_cluster)) {/* * Move index back to the record we are coalescing with.
@@ -5831,9 +5836,10 @@ int ocfs2_truncate_log_append(struct ocfs2_super *osb, index--; num_clusters +=le32_to_cpu (tl->tl_recs[index].t_clusters); -mlog (0 ,"Coalesce with index %u (start = %u, clusters = %u)\n" , - index,le32_to_cpu (tl->tl_recs[index].t_start), - num_clusters); +trace_ocfs2_truncate_log_append ( + (unsigned long long )OCFS2_I (tl_inode)->ip_blkno, + index,le32_to_cpu (tl->tl_recs[index].t_start), + num_clusters); }else { tl->tl_recs[index].t_start =cpu_to_le32 (start_cluster); tl->tl_used =cpu_to_le16 (index +1 );
@@ -5896,8 +5902,9 @@ static int ocfs2_replay_truncate_records(struct ocfs2_super *osb,/* if start_blk is not set, we ignore the record as * invalid. */ if (start_blk) { -mlog (0 ,"free record %d, start = %u, clusters = %u\n" , - i,le32_to_cpu (rec.t_start), num_clusters); +trace_ocfs2_replay_truncate_records ( + (unsigned long long )OCFS2_I (tl_inode)->ip_blkno, + i,le32_to_cpu (rec.t_start), num_clusters); status = ocfs2_free_clusters(handle, data_alloc_inode, data_alloc_bh, start_blk,
@@ -5938,8 +5945,9 @@ int __ocfs2_flush_truncate_log(struct ocfs2_super *osb) tl = &di->id2.i_dealloc; num_to_flush =le16_to_cpu (tl->tl_used); -mlog (0 ,"Flush %u records from truncate log #%llu\n" , - num_to_flush, (unsigned long long )OCFS2_I (tl_inode)->ip_blkno); +trace_ocfs2_flush_truncate_log ( + (unsigned long long )OCFS2_I (tl_inode)->ip_blkno, + num_to_flush);if (!num_to_flush) { status =0 ; goto out;
@@ -6076,7 +6084,7 @@ int ocfs2_begin_truncate_log_recovery(struct ocfs2_super *osb, *tl_copy =NULL ; -mlog (0 ,"recover truncate log from slot %d\n" , slot_num); +trace_ocfs2_begin_truncate_log_recovery (slot_num); status =ocfs2_get_truncate_log_info (osb, slot_num, &tl_inode, &tl_bh);if (status <0 ) {
@@ -6093,8 +6101,7 @@ int ocfs2_begin_truncate_log_recovery(struct ocfs2_super *osb, tl = &di->id2.i_dealloc;if (le16_to_cpu (tl->tl_used)) { -mlog (0 ,"We'll have %u logs to recover\n" , -le16_to_cpu (tl->tl_used)); +trace_ocfs2_truncate_log_recovery_num (le16_to_cpu (tl->tl_used)); *tl_copy =kmalloc (tl_bh->b_size,GFP_KERNEL );if (!(*tl_copy)) {
@@ -6151,8 +6158,9 @@ int ocfs2_complete_truncate_log_recovery(struct ocfs2_super *osb, tl = &tl_copy->id2.i_dealloc; num_recs =le16_to_cpu (tl->tl_used); -mlog (0 ,"cleanup %u records from %llu\n" , num_recs, - (unsigned long long )le64_to_cpu (tl_copy->i_blkno)); +trace_ocfs2_complete_truncate_log_recovery ( + (unsigned long long )le64_to_cpu (tl_copy->i_blkno), + num_recs);mutex_lock (&tl_inode->i_mutex);for (i =0 ; i < num_recs; i++) {
@@ -6310,8 +6318,8 @@ static int ocfs2_free_cached_blocks(struct ocfs2_super *osb,else bg_blkno =ocfs2_which_suballoc_group (head->free_blk, head->free_bit); -mlog (0 ,"Free bit: (bit %u, blkno %llu)\n" , - head->free_bit, (unsigned long long )head->free_blk); +trace_ocfs2_free_cached_blocks ( + (unsigned long long )head->free_blk, head->free_bit); ret =ocfs2_free_suballoc_bits (handle, inode, di_bh, head->free_bit, bg_blkno,1 );
@@ -6364,8 +6372,7 @@ int ocfs2_cache_cluster_dealloc(struct ocfs2_cached_dealloc_ctxt *ctxt,return ret; } -mlog (0 ,"Insert clusters: (bit %u, blk %llu)\n" , - bit, (unsigned long long )blkno); +trace_ocfs2_cache_cluster_dealloc ((unsigned long long )blkno, bit); item->free_blk = blkno; item->free_bit = bit;
@@ -6440,8 +6447,8 @@ int ocfs2_run_deallocs(struct ocfs2_super *osb, fl = ctxt->c_first_suballocator;if (fl->f_first) { -mlog (0 ,"Free items: (type %u, slot %d)\n" , - fl->f_inode_type, fl->f_slot); +trace_ocfs2_run_deallocs (fl->f_inode_type, + fl->f_slot); ret2 = ocfs2_free_cached_blocks(osb, fl->f_inode_type, fl->f_slot,
@@ -6518,8 +6525,9 @@ int ocfs2_cache_block_dealloc(struct ocfs2_cached_dealloc_ctxt *ctxt, goto out; } -mlog (0 ,"Insert: (type %d, slot %u, bit %u, blk %llu)\n" , - type, slot, bit, (unsigned long long )blkno); +trace_ocfs2_cache_block_dealloc (type, slot, + (unsigned long long )suballoc, + (unsigned long long )blkno, bit); item->free_bg = suballoc; item->free_blk = blkno;
@@ -6999,8 +7007,11 @@ start: goto bail; } -mlog (0 ,"inode->ip_clusters = %u, tree_depth = %u\n" , -OCFS2_I (inode)->ip_clusters, path->p_tree_depth); +trace_ocfs2_commit_truncate ( + (unsigned long long )OCFS2_I (inode)->ip_blkno, + new_highest_cpos, +OCFS2_I (inode)->ip_clusters, + path->p_tree_depth);/* * By now, el will point to the extent list on the bottom most
fs/ocfs2/ocfs2_trace.h +485 -0
491 lines not on this page · raw message
Signature · 1 line
1.7.1.GIT
PATCH 5/5 ocfs2: Remove mlog(0) from fs/ocfs2/alloc.c
Quoted 8 lines · Tao Ma
So this patch removes all
mlog(0,...)fromalloc.cand adds the corresponding tracepoints. Different mlogs have different solutions.
1. Some are replaced with trace event directly.
2. Some are replaced and some new parameters are added since I think we need to know the btree owner in that case.
3. Some are combined into one trace events.
4. Some redundant mlogs are removed.
These decisions are what I stressed to Wengang when he did his
first pass. I don't want to log data just because it used to have an mlog(). We should only be logging things that are interesting.
In this patch, I see a lot of things that make sense. "Hey,
we're growing the tree" is a good thing to log. So I'm not saying that you did anything wrong. I'm just mentioning my goals up front to be clear.
Overall, the patch looks good.
Quoted 2 lines
What's more, it defines some event classes so that we can use them later.
This is cool.
Joel
Signature · 9 lines
"Practice random acts of kindness and senseless acts of beauty." Oh, and don't forget where your towel is. Joel Becker Senior Development Manager Oracle E-mail: joel.becker at oracle.com Phone: (650) 506-8127
PATCH 5/5 ocfs2: Remove mlog(0) from fs/ocfs2/alloc.c
Quoted 12 lines · Joel Becker
Quoted 9 lines · Tao Ma
So this patch removes all
mlog(0,...)fromalloc.cand adds the corresponding tracepoints. Different mlogs have different solutions.
1. Some are replaced with trace event directly.
2. Some are replaced and some new parameters are added since I think we need to know the btree owner in that case.
3. Some are combined into one trace events.
4. Some redundant mlogs are removed.
Quoted 4 lines
These decisions are what I stressed to Wengang when he did his
first pass. I don't want to log data just because it used to have anmlog(). We should only be logging things that are interesting.
yeah, that is also my thought. So I will only change those mlog(0,...) that I think I am familar with and
leave others there(I guess I won't touch dlm, cluster and dlmglue).
Quoted 6 lines
In this patch, I see a lot of things that make sense. "Hey,
we're growing the tree" is a good thing to log. So I'm not saying that you did anything wrong. I'm just mentioning my goals up front to be clear.
Overall, the patch looks good.
Glad to hear that. So I will continue. I guess I can work on most files under fs/ocfs2/ except dlmglue.c. ;)
Quoted 7 lines
Quoted 4 lines
What's more, it defines some event classes so that we can use them later.
This is cool.
yeah, they are really cool.
Regards,
Tao