OCFS2: Add trace event and replace mlog(0).
cover OCFS2: Add trace event and replace mlog(0).
Hi all,
This patch set is my attempt to replace our old debug(mlog) with new trace events.
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.
All patches except one(see below) are only mlog related, so they shouldn't affect the normal operations in ocfs2 and they should be easy for review(patch 1-5 were already sent to the mail list around one month ago).
The only one that changes the codes somehow are patch 15, "ocfs2: Little refactoring against ocfs2_iget", but it looks straightforward.
Regards,
Tao
PATCH 1/34 ocfs2: Remove unused truncate function from alloc.c
From: Tao Ma <[email protected]>
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.0.4
PATCH 1/34 ocfs2: Remove unused truncate function from alloc.c
Quoted 8 lines · Tao Ma
From: Tao Ma <[email protected]>
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]>
Hmm, so we're removing dead code here? This should just go in as-is then IMHO.
--
Mark Fasheh
PATCH 2/34 ocfs2: Remove ENTRY from masklog.
In reply to Tao MaFrom: Tao Ma <[email protected]>
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.
for mlog_entry(...), we replace it with mlog(0,...), and they will be replace by trace event later.
--- 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
@@ -441,8 +441,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);
@@ -488,8 +486,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++) {
@@ -517,8 +513,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) {
@@ -1026,7 +1020,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 ;
@@ -1314,8 +1308,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 ;
@@ -1611,8 +1605,6 @@ static int __init ocfs2_init(void) {int status; -mlog_entry_void (); -ocfs2_print_version (); status =init_ocfs2_uptodate_cache ();
@@ -1663,8 +1655,6 @@ leave: static void __exit ocfs2_exit(void) { -mlog_entry_void (); -ocfs2_quota_shutdown ();if (ocfs2_wq) {
@@ -1687,7 +1677,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 );
@@ -1704,7 +1694,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);
@@ -1871,8 +1861,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;
@@ -1927,7 +1915,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);
@@ -2079,8 +2067,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 ;
@@ -2384,8 +2370,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 */
@@ -2453,8 +2437,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 ) {
@@ -2549,8 +2531,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.0.4
PATCH 3/34 ocfs2: Remove EXIT from masklog.
In reply to Tao MaFrom: Tao Ma <[email protected]>
mlog_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.
All those mlog(0,...) will be replaced with trace events later.
--- 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
@@ -476,7 +476,8 @@ static int ocfs2_init_global_system_inodes(struct ocfs2_super *osb) } bail: -mlog_exit (status); +if (status) +mlog_errno (status);return status; }
@@ -504,7 +505,8 @@ static int ocfs2_init_local_system_inodes(struct ocfs2_super *osb) } bail: -mlog_exit (status); +if (status) +mlog_errno (status);return status; }
@@ -534,7 +536,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]) {
@@ -545,9 +547,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 */
@@ -1196,7 +1195,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; } }
@@ -1210,7 +1208,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:
@@ -1225,7 +1222,8 @@ read_super_error:ocfs2_dismount_volume (sb,1 ); } -mlog_exit (status); +if (status) +mlog_errno (status);return status; }
@@ -1514,7 +1512,6 @@ static int ocfs2_parse_options(struct super_block *sb, status =1 ; bail: -mlog_exit (status);return status; }
@@ -1643,10 +1640,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
@@ -1671,8 +1667,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)
@@ -1681,8 +1675,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)
@@ -1741,7 +1733,8 @@ bail:if (inode)iput (inode); -mlog_exit (status); +if (status) +mlog_errno (status);return status; }
@@ -1905,7 +1898,6 @@ leave:if (unlock_super)ocfs2_super_unlock (osb,1 ); -mlog_exit (status);return status; }
@@ -2354,7 +2346,6 @@ static int ocfs2_initialize_super(struct super_block *sb, } bail: -mlog_exit (status);return status; }
@@ -2424,7 +2415,8 @@ static int ocfs2_verify_volume(struct ocfs2_dinode *di, } out: -mlog_exit (status); +if (status) +mlog_errno (status);return status; }
@@ -2519,7 +2511,8 @@ finally:if (local_alloc)kfree (local_alloc); -mlog_exit (status); +if (status) +mlog_errno (status);return status; }
@@ -2548,8 +2541,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.0.4
PATCH 4/34 ocfs2: Add ocfs2_trace.h.
In reply to Tao MaFrom: Wengang Wang <[email protected]>
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
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
@@ -42,6 +42,9 @@#include <linux/seq_file.h> #include <linux/quotaops.h> +#define CREATE_TRACE_POINTS +#include "ocfs2_trace.h" +#define MLOG_MASK_PREFIX ML_SUPER#include <cluster/masklog.h>
Signature · 1 line
1.7.0.4
PATCH 4/34 ocfs2: Add ocfs2_trace.h.
Quoted 7 lines · Tao Ma
From: Wengang Wang <[email protected]>
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.
Let's not mention marketing terms. Just say that we had
to delay the work.
Joel
Signature · 8 lines
"When ideas fail, words come in very handy."
- Goethe
Joel Becker
Senior Development Manager
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127PATCH 5/34 ocfs2: Remove mlog(0) from fs/ocfs2/alloc.c
In reply to Tao MaFrom: Tao Ma <[email protected]>
This 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 | 501 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 589 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 +501 -0
507 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH 5/34 ocfs2: Remove mlog(0) from fs/ocfs2/alloc.c
Quoted 171 lines
fs/ocfs2/alloc.c +34
-29+ (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 +6
-0@@ -6,6 +6,507 @@#include <linux/tracepoint.h> +DECLARE_EVENT_CLASS(ocfs2__int, + + TP_PROTO(int num), + + TP_ARGS(num), +
fs/ocfs2/ocfs2_trace.h line 24
Quoted 10 lines
fs/ocfs2/ocfs2_trace.h +10
-0+TP_STRUCT__entry ( +__field ( int, num ) + ), + +TP_fast_assign ( + __entry->num = num; + ), + +TP_printk ("%d" , __entry->num) +);
If you'd split the even up into classes depending on the actual meaning of num the trace could contain a descriptive name that makes it a lot more readable. And btw, the above would be a lot more readable if formatted like normal kernel code:
DECLARE_EVENT_CLASS(ocfs2__int,
TP_PROTO(int num),
TP_ARGS(num),
TP_STRUCT__entry(
__field(int, num)
),
TP_fast_assign(
__entry->num = num;
),
TP_printk("%d", __entry->num));
fs/ocfs2/ocfs2_trace.h line 423
Quoted 7 lines
fs/ocfs2/ocfs2_trace.h +7
-0+DEFINE_EVENT (ocfs2__truncate_log_ops, ocfs2_truncate_log_append, + + TP_PROTO(unsigned long long blkno, int index, + unsigned int start, unsigned int num), + +TP_ARGS (blkno, index, start, num) +);
FYI, if you have a lot of instances ofa given even class using a little macro makes declaring them a lot simpler, take a look at fs/xfs/linux-2.6/xfs_trace.h for examples.
PATCH 5/34 ocfs2: Remove mlog(0) from fs/ocfs2/alloc.c
Hi Christoph,
Thanks for the review.
Quoted 41 lines · Christoph Hellwig
Quoted 14 lines
fs/ocfs2/ocfs2_trace.h +6
-0@@ -6,6 +6,507 @@#include <linux/tracepoint.h> +DECLARE_EVENT_CLASS(ocfs2__int, + + TP_PROTO(int num), + + TP_ARGS(num), +fs/ocfs2/ocfs2_trace.h line 24
Quoted 10 lines
fs/ocfs2/ocfs2_trace.h +10
-0+TP_STRUCT__entry ( +__field ( int, num ) + ), + +TP_fast_assign ( + __entry->num = num; + ), + +TP_printk ("%d" , __entry->num) +);If you'd split the even up into classes depending on the actual meaning of num the trace could contain a descriptive name that makes it a lot more readable. And btw, the above would be a lot more readable if formatted like normal kernel code:
DECLARE_EVENT_CLASS(ocfs2__int,
TP_PROTO(int num), TP_ARGS(num), TP_STRUCT__entry( __field(int, num) ), TP_fast_assign( __entry->num = num; ), TP_printk("%d", __entry->num)
Quoted 1 line
);
ok, I will change it in the next round.
Quoted 12 lines
fs/ocfs2/ocfs2_trace.h line 423
Quoted 8 lines
fs/ocfs2/ocfs2_trace.h +7
-0+DEFINE_EVENT (ocfs2__truncate_log_ops, ocfs2_truncate_log_append, + + TP_PROTO(unsigned long long blkno, int index, + unsigned int start, unsigned int num), + +TP_ARGS (blkno, index, start, num) +);FYI, if you have a lot of instances ofa given even class using a little macro makes declaring them a lot simpler, take a look at
fs/xfs/linux-2.6/xfs_trace.hfor examples.
OK, I will look at it and use a macro. thanks.
Regards,
Tao
PATCH 6/34 ocfs2: Remove mlog(0) from fs/ocfs2/localalloc.c
In reply to Tao MaFrom: Tao Ma <[email protected]>
This is the 2nd step to remove the debug info of DISK_ALLOC.
So this patch removes all mlog(0,...) from localalloc.c and adds the corresponding tracepoints. Different mlogs have different solutions.
1. Some are replaced with trace event directly.
2. Some are replaced while some new parameters are added.
3. Some are combined into one trace events.
4. Some redundant mlogs are removed.
--- fs/ocfs2/localalloc.c | 57 +++++++---------- fs/ocfs2/ocfs2_trace.h | 172 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 195 insertions(+), 34 deletions(-)
fs/ocfs2/localalloc.c +23 -34
@@ -43,6 +43,7 @@#include "suballoc.h" #include "super.h" #include "sysfile.h" +#include "ocfs2_trace.h" #include "buffer_head_io.h"
@@ -201,8 +202,7 @@ void ocfs2_la_set_sizes(struct ocfs2_super *osb, int requested_mb) la_max_mb =ocfs2_clusters_to_megabytes (sb,ocfs2_local_alloc_size (sb) *8 ); -mlog (0 ,"requested: %dM, max: %uM, default: %uM\n" , - requested_mb, la_max_mb, la_default_mb); +trace_ocfs2_la_set_sizes (requested_mb, la_max_mb, la_default_mb);if (requested_mb ==-1 ) {/* No user request - use defaults */
@@ -276,8 +276,8 @@ int ocfs2_alloc_should_use_local(struct ocfs2_super *osb, u64 bits) ret =1 ; bail: -mlog (0 ,"state=%d, bits=%llu, la_bits=%d, ret=%d\n" , - osb->local_alloc_state, (unsigned long long )bits, la_bits, ret); +trace_ocfs2_alloc_should_use_local ( + (unsigned long long )bits, osb->local_alloc_state, la_bits, ret);spin_unlock (&osb->osb_lock);return ret; }
@@ -362,7 +362,7 @@ bail:if (inode)iput (inode); -mlog (0 ,"Local alloc window bits = %d\n" , osb->local_alloc_bits); +trace_ocfs2_load_local_alloc (osb->local_alloc_bits);if (status)mlog_errno (status);
@@ -497,7 +497,7 @@ int ocfs2_begin_local_alloc_recovery(struct ocfs2_super *osb,struct inode *inode =NULL ;struct ocfs2_dinode *alloc; -mlog (0 ,"(slot_num = %d)\n" , slot_num); +trace_ocfs2_begin_local_alloc_recovery (slot_num); *alloc_copy =NULL ;
@@ -705,10 +705,6 @@ int ocfs2_reserve_local_alloc_bits(struct ocfs2_super *osb, goto bail; } -if (ac->ac_max_block) -mlog (0 ,"Calling in_range for max block %llu\n" , - (unsigned long long )ac->ac_max_block); - ac->ac_inode = local_alloc_inode;/* We should never use localalloc from another slot */ ac->ac_alloc_slot = osb->slot_num;
@@ -722,8 +718,9 @@ bail:iput (local_alloc_inode); } -mlog (0 ,"bits=%d, slot=%d, ret=%d\n" , bits_wanted, osb->slot_num, - status); +trace_ocfs2_reserve_local_alloc_bits ( + (unsigned long long )ac->ac_max_block, + bits_wanted, osb->slot_num, status);if (status)mlog_errno (status);
@@ -797,7 +794,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 (0 ,"count %u\n" , count); +trace_ocfs2_local_alloc_count_bits (count);return count; }
@@ -812,10 +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 (0 ,"(numbits wanted = %u)\n" , *numbits); -if (!alloc->id1.bitmap1.i_total) { -mlog (0 ,"No bits in my window!\n" ); bitoff =-1 ; goto bail; }
@@ -875,8 +869,7 @@ static int ocfs2_local_alloc_find_clear_bits(struct ocfs2_super *osb, } } -mlog (0 ,"Exiting loop, bitoff = %d, numfound = %d\n" , bitoff, - numfound); +trace_ocfs2_local_alloc_find_clear_bits_search_bitmap (bitoff, numfound);if (numfound == *numbits) bitoff = startoff - numfound;
@@ -887,7 +880,10 @@ bail:if (local_resv)ocfs2_resv_discard (resmap, resv); -mlog (0 ,"bitoff %d\n" , bitoff); +trace_ocfs2_local_alloc_find_clear_bits (*numbits, +le32_to_cpu (alloc->id1.bitmap1.i_total), + bitoff, numfound); +return bitoff; }
@@ -941,18 +937,16 @@ static int ocfs2_sync_local_to_main(struct ocfs2_super *osb,void *bitmap;struct ocfs2_local_alloc *la =OCFS2_LOCAL_ALLOC (alloc); -mlog (0 ,"total = %u, used = %u\n" , +trace_ocfs2_sync_local_to_main (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" ); goto bail; }if (le32_to_cpu (alloc->id1.bitmap1.i_used) ==le32_to_cpu (alloc->id1.bitmap1.i_total)) { -mlog (0 ,"all bits were taken!\n" ); goto bail; }
@@ -974,8 +968,7 @@ static int ocfs2_sync_local_to_main(struct ocfs2_super *osb,ocfs2_clusters_to_blocks (osb->sb, start - count); -mlog (0 ,"freeing %u bits starting at local alloc bit " -"%u (la_start_blk = %llu, blkno = %llu)\n" , +trace_ocfs2_sync_local_to_main_free ( count, start - count, (unsigned long long )la_start_blk, (unsigned long long )blkno);
@@ -1142,12 +1135,9 @@ static int ocfs2_local_alloc_new_window(struct ocfs2_super *osb, alloc = (struct ocfs2_dinode *) osb->local_alloc_bh->b_data; la =OCFS2_LOCAL_ALLOC (alloc); -if (alloc->id1.bitmap1.i_total) -mlog (0 ,"asking me to alloc a new window over a non-empty " -"one\n" ); - -mlog (0 ,"Allocating %u clusters for a new window.\n" , - osb->local_alloc_bits); +trace_ocfs2_local_alloc_new_window ( +le32_to_cpu (alloc->id1.bitmap1.i_total), + osb->local_alloc_bits);/* Instruct the allocation code to try the most recently used * cluster group. We'll re-record the group used this pass
@@ -1209,10 +1199,9 @@ retry_enospc:ocfs2_resmap_restart (&osb->osb_la_resmap, cluster_count,OCFS2_LOCAL_ALLOC (alloc)->la_bitmap); -mlog (0 ,"New window allocated:\n" ); -mlog (0 ,"window la_bm_off = %u\n" , -OCFS2_LOCAL_ALLOC (alloc)->la_bm_off); -mlog (0 ,"window bits = %u\n" ,le32_to_cpu (alloc->id1.bitmap1.i_total)); +trace_ocfs2_local_alloc_new_window_result ( +OCFS2_LOCAL_ALLOC (alloc)->la_bm_off, +le32_to_cpu (alloc->id1.bitmap1.i_total)); bail:if (status)
fs/ocfs2/ocfs2_trace.h +172 -0
190 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH 7/34 ocfs2: Remove mlog(0) from fs/ocfs2/suballoc.c
In reply to Tao MaFrom: Tao Ma <[email protected]>
This is the 3rd step to remove the debug info of DISK_ALLOC.
--- fs/ocfs2/ocfs2_trace.h | 329 +++++++++++++++++++++++++++++++++++++++++++++++- fs/ocfs2/suballoc.c | 107 ++++++++-------- 2 files changed, 381 insertions(+), 55 deletions(-)
fs/ocfs2/ocfs2_trace.h +328 -1
@@ -40,6 +40,23 @@ DECLARE_EVENT_CLASS(ocfs2__uint,TP_printk ("%u" , __entry->num) ); +DECLARE_EVENT_CLASS (ocfs2__ull, + + TP_PROTO(unsigned long long blkno), + +TP_ARGS (blkno), + +TP_STRUCT__entry ( + __field( unsigned long long, blkno ) + ), + +TP_fast_assign ( + __entry->blkno = blkno; + ), + +TP_printk ("%llu" , __entry->blkno) +); + DECLARE_EVENT_CLASS(ocfs2__int_int, TP_PROTO(int value1, int value2),
@@ -59,6 +76,25 @@ DECLARE_EVENT_CLASS(ocfs2__int_int,TP_printk ("%d %d" , __entry->value1, __entry->value2) ); +DECLARE_EVENT_CLASS (ocfs2__uint_uint, + + TP_PROTO(unsigned int value1, unsigned int value2), + +TP_ARGS (value1, value2), + +TP_STRUCT__entry ( + __field( unsigned int, value1 ) + __field( unsigned int, value2 ) + ), + +TP_fast_assign ( + __entry->value1 = value1; + __entry->value2 = value2; + ), + +TP_printk ("%u %u" , __entry->value1, __entry->value2) +); + DECLARE_EVENT_CLASS(ocfs2__ull_uint, TP_PROTO(unsigned long long value1, unsigned int value2),
@@ -78,6 +114,48 @@ DECLARE_EVENT_CLASS(ocfs2__ull_uint,TP_printk ("%llu %u" , __entry->value1, __entry->value2) ); +DECLARE_EVENT_CLASS (ocfs2__ull_ull, + + TP_PROTO(unsigned long long value1, unsigned long long value2), + +TP_ARGS (value1, value2), + +TP_STRUCT__entry ( + __field( unsigned long long, value1 ) + __field( unsigned long long, value2 ) + ), + +TP_fast_assign ( + __entry->value1 = value1; + __entry->value2 = value2; + ), + +TP_printk ("%llu %llu" , __entry->value1, __entry->value2) +); + +DECLARE_EVENT_CLASS (ocfs2__ull_uint_uint, + + TP_PROTO(unsigned long long value1, + unsigned int value2, unsigned int value3), + +TP_ARGS (value1, value2, value3), + +TP_STRUCT__entry ( + __field( unsigned long long, value1 ) + __field( unsigned int, value2 ) + __field( unsigned int, value3 ) + ), + +TP_fast_assign ( + __entry->value1 = value1; + __entry->value2 = value2; + __entry->value3 = value3; + ), + +TP_printk ("%llu %u %u" , __entry->value1, + __entry->value2, __entry->value3) +); + DECLARE_EVENT_CLASS(ocfs2__uint_uint_uint, TP_PROTO(unsigned int value1, unsigned int value2,
@@ -125,6 +203,32 @@ DECLARE_EVENT_CLASS(ocfs2__ull_int_int_int, __entry->value2, __entry->value3) ); +DECLARE_EVENT_CLASS (ocfs2__ull_uint_uint_uint, + + TP_PROTO(unsigned long long ull, unsigned int value1, + unsigned int value2, unsigned int value3), + +TP_ARGS (ull, value1, value2, value3), + +TP_STRUCT__entry ( + __field( unsigned long long, ull ) + __field( unsigned int, value1 ) + __field( unsigned int, value2 ) + __field( unsigned int, value3 ) + ), + +TP_fast_assign ( + __entry->ull = ull; + __entry->value1 = value1; + __entry->value2 = value2; + __entry->value3 = value3; + ), + +TP_printk ("%llu %u %u %u" , + __entry->ull, __entry->value1, + __entry->value2, __entry->value3) +); +/* Trace events for fs/ocfs2/alloc.c. */ DECLARE_EVENT_CLASS(ocfs2__btree_ops,
@@ -678,8 +782,231 @@ DEFINE_EVENT(ocfs2__ull_uint, ocfs2_local_alloc_new_window_result,TP_ARGS (bm_off, total) ); -/* End of trace events for fs/ocfs2/localalloc.c. */ + +/* Trace events for fs/ocfs2/suballoc.c. */ +DEFINE_EVENT (ocfs2__ull, ocfs2_validate_group_descriptor, + + TP_PROTO(unsigned long long bg_blkno), + +TP_ARGS (bg_blkno) +); + +DEFINE_EVENT (ocfs2__ull_uint, ocfs2_block_group_alloc_contig, + + TP_PROTO(unsigned long long bg_blkno, unsigned int chain), + +TP_ARGS (bg_blkno, chain) +); + +DEFINE_EVENT (ocfs2__ull_uint, ocfs2_block_group_alloc_discontig, + + TP_PROTO(unsigned long long bg_blkno, unsigned int chain), + +TP_ARGS (bg_blkno, chain) +); + +DEFINE_EVENT (ocfs2__ull, ocfs2_block_group_alloc, + + TP_PROTO(unsigned long long group_blkno), + +TP_ARGS (group_blkno) +); + +DEFINE_EVENT (ocfs2__uint_uint, ocfs2_reserve_suballoc_bits_nospc, + + TP_PROTO(unsigned int wanted, unsigned int free), + +TP_ARGS (wanted, free) +); + +DEFINE_EVENT (ocfs2__uint_uint_uint, ocfs2_reserve_suballoc_bits_no_new_group, + + TP_PROTO(unsigned int slot, unsigned int wanted, unsigned int free), + +TP_ARGS (slot, wanted, free) +); + +DEFINE_EVENT (ocfs2__ull, ocfs2_reserve_new_inode_new_group, + + TP_PROTO(unsigned long long group_blkno), + +TP_ARGS (group_blkno) +); + +DEFINE_EVENT (ocfs2__uint_uint, ocfs2_block_group_set_bits, + + TP_PROTO(unsigned int bit_off, unsigned int num_bits), + +TP_ARGS (bit_off, num_bits) +); + +TRACE_EVENT (ocfs2_relink_block_group, + + TP_PROTO(unsigned long long i_blkno, unsigned int chain, + unsigned long long bg_blkno, + unsigned long long prev_blkno), + +TP_ARGS (i_blkno, chain, bg_blkno, prev_blkno), + +TP_STRUCT__entry ( + __field( unsigned long long, i_blkno ) + __field( unsigned int, chain ) + __field( unsigned long long, bg_blkno ) + __field( unsigned long long, prev_blkno ) + ), + +TP_fast_assign ( + __entry->i_blkno = i_blkno; + __entry->chain = chain; + __entry->bg_blkno = bg_blkno; + __entry->prev_blkno = prev_blkno; + ), + +TP_printk ("%llu %u %llu %llu" , + __entry->i_blkno, __entry->chain, __entry->bg_blkno, + __entry->prev_blkno) +); + +DEFINE_EVENT (ocfs2__ull_uint_uint_uint, + ocfs2_cluster_group_search_wrong_max_bits, + + TP_PROTO(unsigned long long bg_blkno, unsigned int bg_bits, + unsigned int clusters, unsigned int max_bits), + +TP_ARGS (bg_blkno, bg_bits, clusters, max_bits) +); + +DEFINE_EVENT (ocfs2__ull_ull, ocfs2_cluster_group_search_max_block, + + TP_PROTO(unsigned long long blkno, + unsigned long long max_block), + +TP_ARGS (blkno, max_block) +); + +DEFINE_EVENT (ocfs2__ull_ull, ocfs2_block_group_search_max_block, + + TP_PROTO(unsigned long long blkno, + unsigned long long max_block), + +TP_ARGS (blkno, max_block) +); + +DEFINE_EVENT (ocfs2__ull_uint_uint, ocfs2_search_chain_begin, + + TP_PROTO(unsigned long long blkno, + unsigned int chain, unsigned int bits), + +TP_ARGS (blkno, chain, bits) +); + +DEFINE_EVENT (ocfs2__ull_uint, ocfs2_search_chain_succ, + + TP_PROTO(unsigned long long blkno, unsigned int bits), + +TP_ARGS (blkno, bits) +); + +DEFINE_EVENT (ocfs2__ull_uint, ocfs2_search_chain_end, + + TP_PROTO(unsigned long long blkno, unsigned int bits), + +TP_ARGS (blkno, bits) +); + +DEFINE_EVENT (ocfs2__uint, ocfs2_claim_suballoc_bits, + + TP_PROTO(unsigned int chain), + +TP_ARGS (chain) +); + +DEFINE_EVENT (ocfs2__ull_uint, ocfs2_claim_new_inode_at_loc, + + TP_PROTO(unsigned long long blkno, unsigned int bits), + +TP_ARGS (blkno, bits) +); + +DEFINE_EVENT (ocfs2__uint_uint, ocfs2_block_group_clear_bits, + + TP_PROTO(unsigned int bit_off, unsigned int num_bits), + +TP_ARGS (bit_off, num_bits) +); + +TRACE_EVENT (ocfs2_free_suballoc_bits, + + TP_PROTO(unsigned long long inode, unsigned long long group, + unsigned int start_bit, unsigned int count), + +TP_ARGS (inode, group, start_bit, count), + +TP_STRUCT__entry ( + __field( unsigned long long, inode ) + __field( unsigned long long, group ) + __field( unsigned int, start_bit ) + __field( unsigned int, count ) + ), + +TP_fast_assign ( + __entry->inode = inode; + __entry->group = group; + __entry->start_bit = start_bit; + __entry->count = count; + ), + +TP_printk ("%llu %llu %u %u" , __entry->inode, __entry->group, + __entry->start_bit, __entry->count) +); + +TRACE_EVENT (ocfs2_free_clusters, + + TP_PROTO(unsigned long long bg_blkno, unsigned long long start_blk, + unsigned int start_bit, unsigned int count), + +TP_ARGS (bg_blkno, start_blk, start_bit, count), + +TP_STRUCT__entry ( + __field( unsigned long long, bg_blkno ) + __field( unsigned long long, start_blk ) + __field( unsigned int, start_bit ) + __field( unsigned int, count ) + ), + +TP_fast_assign ( + __entry->bg_blkno = bg_blkno; + __entry->start_blk = start_blk; + __entry->start_bit = start_bit; + __entry->count = count; + ), + +TP_printk ("%llu %llu %u %u" , __entry->bg_blkno, __entry->start_blk, + __entry->start_bit, __entry->count) +); + +DEFINE_EVENT (ocfs2__ull, ocfs2_get_suballoc_slot_bit, + + TP_PROTO(unsigned long long blkno), + +TP_ARGS (blkno) +); + +DEFINE_EVENT (ocfs2__ull_uint, ocfs2_test_suballoc_bit, + + TP_PROTO(unsigned long long blkno, unsigned int bit), + +TP_ARGS (blkno, bit) +); + +DEFINE_EVENT (ocfs2__ull, ocfs2_test_inode_bit, + + TP_PROTO(unsigned long long blkno), + +TP_ARGS (blkno) +); +/* End of trace events for fs/ocfs2/suballoc.c. */ #endif /* _TRACE_OCFS2_H */ /* This part must be outside protection */
fs/ocfs2/suballoc.c +53 -54
250 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH 8/34 ocfs2: Remove mlog(0) from fs/ocfs2/suballoc.c
In reply to Tao MaFrom: Tao Ma <[email protected]>
This is the 4th step to remove the debug info of DISK_ALLOC.
--- fs/ocfs2/ocfs2_trace.h | 25 +++++++++++++++++++++++++ fs/ocfs2/resize.c | 12 +++++++----- 2 files changed, 32 insertions(+), 5 deletions(-)
fs/ocfs2/ocfs2_trace.h +25 -0
@@ -784,6 +784,31 @@ DEFINE_EVENT(ocfs2__ull_uint, ocfs2_local_alloc_new_window_result, );/* End of trace events for fs/ocfs2/localalloc.c. */ +/* Trace events for fs/ocfs2/resize.c. */ +DEFINE_EVENT (ocfs2__uint_uint, ocfs2_update_last_group_and_inode, + + TP_PROTO(unsigned int new_clusters, unsigned int first_new_cluster), + +TP_ARGS (new_clusters, first_new_cluster) +); + +DEFINE_EVENT (ocfs2__ull_uint, ocfs2_group_extend, + + TP_PROTO(unsigned long long bg_blkno, unsigned int new_clusters), + +TP_ARGS (bg_blkno, new_clusters) +); + +DEFINE_EVENT (ocfs2__ull_uint_uint_uint, ocfs2_group_add, + + TP_PROTO(unsigned long long bg_blkno, unsigned int chain, + unsigned int clusters, unsigned int frees), + +TP_ARGS (bg_blkno, chain, clusters, frees) +); + +/* End of trace events for fs/ocfs2/resize.c. */ +/* Trace events for fs/ocfs2/suballoc.c. */ DEFINE_EVENT(ocfs2__ull, ocfs2_validate_group_descriptor,
fs/ocfs2/resize.c +7 -5
@@ -39,6 +39,7 @@#include "super.h" #include "sysfile.h" #include "uptodate.h" +#include "ocfs2_trace.h" #include "buffer_head_io.h" #include "suballoc.h"
@@ -102,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 (0 ,"(new_clusters=%d, first_new_cluster = %u)\n" , - new_clusters, first_new_cluster); +trace_ocfs2_update_last_group_and_inode (new_clusters, + first_new_cluster); ret =ocfs2_journal_access_gd (handle,INODE_CACHE (bm_inode), group_bh,OCFS2_JOURNAL_ACCESS_WRITE );
@@ -340,7 +341,8 @@ int ocfs2_group_extend(struct inode * inode, int new_clusters) goto out_unlock; } -mlog (0 ,"extend the last group at %llu, new clusters = %d\n" , + +trace_ocfs2_group_extend ( (unsigned long long )le64_to_cpu (group->bg_blkno), new_clusters); handle =ocfs2_start_trans (osb,OCFS2_GROUP_EXTEND_CREDITS );
@@ -515,8 +517,8 @@ int ocfs2_group_add(struct inode *inode, struct ocfs2_new_group_input *input) goto out_unlock; } -mlog (0 ,"Add a new group %llu in chain = %u, length = %u\n" , - (unsigned long long )input->group, input->chain, input->clusters); +trace_ocfs2_group_add ((unsigned long long )input->group, + input->chain, input->clusters, input->frees); handle =ocfs2_start_trans (osb,OCFS2_GROUP_ADD_CREDITS );if (IS_ERR (handle)) {
Signature · 1 line
1.7.0.4
PATCH 9/34 ocfs2: Remove DISK_ALLOC from masklog.
In reply to Tao MaFrom: Tao Ma <[email protected]>
Since all 4 files, localalloc.c, suballoc.c, alloc.c and resize.c, which use DISK_ALLOC are changed to trace events, Remove masklog DISK_ALLOC totally.
--- fs/ocfs2/alloc.c | 1 - fs/ocfs2/cluster/masklog.c | 1 - fs/ocfs2/cluster/masklog.h | 1 - fs/ocfs2/localalloc.c | 1 - fs/ocfs2/resize.c | 1 - fs/ocfs2/suballoc.c | 1 - 6 files changed, 0 insertions(+), 6 deletions(-)
fs/ocfs2/alloc.c +0 -1
@@ -30,7 +30,6 @@#include <linux/swap.h> #include <linux/quotaops.h> -#define MLOG_MASK_PREFIX ML_DISK_ALLOC#include <cluster/masklog.h> #include "ocfs2.h"
fs/ocfs2/cluster/masklog.c +0 -1
@@ -93,7 +93,6 @@ static struct mlog_attribute mlog_attrs[MLOG_MAX_BITS] = {define_mask (DLM_RECOVERY ),define_mask (AIO ),define_mask (JOURNAL ), -define_mask (DISK_ALLOC ),define_mask (SUPER ),define_mask (FILE_IO ), define_mask(EXTENT_MAP),
fs/ocfs2/cluster/masklog.h +0 -1
@@ -95,7 +95,6 @@#define ML_DLM_RECOVERY 0x0000000000001000ULL/* dlm master functions */ #define ML_AIO 0x0000000000002000ULL/* ocfs2 aio read and write */ #define ML_JOURNAL 0x0000000000004000ULL/* ocfs2 journalling functions */ -#define ML_DISK_ALLOC 0x0000000000008000ULL/* ocfs2 disk allocation */ #define ML_SUPER 0x0000000000010000ULL/* ocfs2 mount / umount */ #define ML_FILE_IO 0x0000000000020000ULL/* ocfs2 file I/O */ #define ML_EXTENT_MAP 0x0000000000040000ULL/* ocfs2 extent map caching */
fs/ocfs2/localalloc.c +0 -1
@@ -29,7 +29,6 @@#include <linux/highmem.h> #include <linux/bitops.h> -#define MLOG_MASK_PREFIX ML_DISK_ALLOC#include <cluster/masklog.h> #include "ocfs2.h"
fs/ocfs2/resize.c +0 -1
@@ -27,7 +27,6 @@#include <linux/fs.h> #include <linux/types.h> -#define MLOG_MASK_PREFIX ML_DISK_ALLOC#include <cluster/masklog.h> #include "ocfs2.h"
fs/ocfs2/suballoc.c +0 -1
@@ -29,7 +29,6 @@#include <linux/slab.h> #include <linux/highmem.h> -#define MLOG_MASK_PREFIX ML_DISK_ALLOC#include <cluster/masklog.h> #include "ocfs2.h"
Signature · 1 line
1.7.0.4
PATCH 10/34 ocfs2: Remove masklog ML_REFCOUNT.
In reply to Tao MaFrom: Tao Ma <[email protected]>
Change all the "mlog(0," in fs/ocfs2/refcounttree.c to trace events. And finally remove masklog ML_REFCOUNT.
--- fs/ocfs2/cluster/masklog.c | 1 - fs/ocfs2/cluster/masklog.h | 1 - fs/ocfs2/ocfs2_trace.h | 430 ++++++++++++++++++++++++++++++++++++++++++++ fs/ocfs2/refcounttree.c | 158 ++++++++-------- 4 files changed, 508 insertions(+), 82 deletions(-)
fs/ocfs2/cluster/masklog.c +0 -1
@@ -108,7 +108,6 @@ static struct mlog_attribute mlog_attrs[MLOG_MAX_BITS] = {define_mask (EXPORT ),define_mask (XATTR ),define_mask (QUOTA ), -define_mask (REFCOUNT ),define_mask (BASTS ),define_mask (ERROR ), define_mask(NOTICE),
fs/ocfs2/cluster/masklog.h +0 -1
@@ -110,7 +110,6 @@#define ML_EXPORT 0x0000000010000000ULL/* ocfs2 export operations */ #define ML_XATTR 0x0000000020000000ULL/* ocfs2 extended attributes */ #define ML_QUOTA 0x0000000040000000ULL/* ocfs2 quota operations */ -#define ML_REFCOUNT 0x0000000080000000ULL/* refcount tree operations */ #define ML_BASTS 0x0000001000000000ULL/* dlmglue asts and basts */ /* bits that are infrequently given and frequently matched in the high word */ #define ML_ERROR 0x0000000100000000ULL/* sent to KERN_ERR */
fs/ocfs2/ocfs2_trace.h +430 -0
442 lines not on this page · raw message
fs/ocfs2/refcounttree.c +78 -80
374 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH 11/34 ocfs2: Remove mlog(0) from fs/ocfs2/aops.c
In reply to Tao MaFrom: Tao Ma <[email protected]>
Remove all the "mlog(0," in fs/ocfs2/aops.c.
--- fs/ocfs2/aops.c | 55 ++++++++-------- fs/ocfs2/ocfs2_trace.h | 168 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 197 insertions(+), 26 deletions(-)
fs/ocfs2/aops.c +29 -26
@@ -29,7 +29,6 @@#include <linux/mpage.h> #include <linux/quotaops.h> -#define MLOG_MASK_PREFIX ML_FILE_IO#include <cluster/masklog.h> #include "ocfs2.h"
@@ -45,6 +44,7 @@#include "super.h" #include "symlink.h" #include "refcounttree.h" +#include "ocfs2_trace.h" #include "buffer_head_io.h"
@@ -59,8 +59,9 @@ static int ocfs2_symlink_get_block(struct inode *inode, sector_t iblock,struct ocfs2_super *osb =OCFS2_SB (inode->i_sb);void *kaddr; -mlog (0 ,"(0x%p, %llu, 0x%p, %d)\n" , inode, - (unsigned long long )iblock, bh_result, create); +trace_ocfs2_symlink_get_block ( + (unsigned long long )OCFS2_I (inode)->ip_blkno, + (unsigned long long )iblock, bh_result, create);BUG_ON (ocfs2_inode_is_fast_symlink (inode));
@@ -135,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 (0 ,"(0x%p, %llu, 0x%p, %d)\n" , inode, - (unsigned long long )iblock, bh_result, create); +trace_ocfs2_get_block ((unsigned long long )OCFS2_I (inode)->ip_blkno, + (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",
@@ -198,8 +199,9 @@ int ocfs2_get_block(struct inode *inode, sector_t iblock, } past_eof =ocfs2_blocks_for_bytes (inode->i_sb,i_size_read (inode)); -mlog (0 ,"Inode %lu, past_eof = %llu\n" , inode->i_ino, - (unsigned long long )past_eof); + +trace_ocfs2_get_block_end ((unsigned long long )OCFS2_I (inode)->ip_blkno, + (unsigned long long )past_eof);if (create && (iblock >= past_eof))set_buffer_new (bh_result);
@@ -276,7 +278,8 @@ 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 (0 ,"(0x%p, %lu)\n" , file, (page ? page->index :0 )); +trace_ocfs2_readpage ((unsigned long long )oi->ip_blkno, + (page ? page->index :0 )); ret =ocfs2_inode_lock_with_page (inode,NULL ,0 , page);if (ret !=0 ) {
@@ -393,13 +396,11 @@ out_unlock:*/ static int ocfs2_writepage (struct page *page,struct writeback_control *wbc) { -int ret; - -mlog (0 ,"(0x%p)\n" , page); - - ret =block_write_full_page (page, ocfs2_get_block, wbc); +trace_ocfs2_writepage ( + (unsigned long long )OCFS2_I (page->mapping->host)->ip_blkno, + page->index); -return ret; +return block_write_full_page (page, ocfs2_get_block, wbc); }/* Taken from ext3. We don't necessarily need the full blown
@@ -445,7 +446,8 @@ static sector_t ocfs2_bmap(struct address_space *mapping, sector_t block)int err =0 ;struct inode *inode = mapping->host; -mlog (0 ,"(block = %llu)\n" , (unsigned long long )block); +trace_ocfs2_bmap ((unsigned long long )OCFS2_I (inode)->ip_blkno, + (unsigned long long )block);/* We don't need to lock journal system files, since they aren't * accessed concurrently from multiple nodes.
@@ -1518,9 +1520,9 @@ static int ocfs2_try_to_write_inline_data(struct address_space *mapping,struct ocfs2_inode_info *oi =OCFS2_I (inode);struct ocfs2_dinode *di =NULL ; -mlog (0 ,"Inode %llu, write of %u bytes at off %llu. features: 0x%x\n" , - (unsigned long long )oi->ip_blkno, len, (unsigned long long )pos, - oi->ip_dyn_features); +trace_ocfs2_try_to_write_inline_data ((unsigned long long )oi->ip_blkno, + len, (unsigned long long )pos, + oi->ip_dyn_features);/* * Handle inodes which already have inline data 1st.
@@ -1682,6 +1684,13 @@ int ocfs2_write_begin_nolock(struct file *filp, di = (struct ocfs2_dinode *)wc->w_di_bh->b_data; +trace_ocfs2_write_begin_nolock ( + (unsigned long long )OCFS2_I (inode)->ip_blkno, + (long long )i_size_read (inode), +le32_to_cpu (di->i_clusters), + pos, len, flags, mmap_page, + clusters_to_alloc, extents_to_split); +/* * We set w_target_from, w_target_to here so that * ocfs2_write_end() knows which range in the target page to
@@ -1694,12 +1703,6 @@ int ocfs2_write_begin_nolock(struct file *filp,* ocfs2_lock_allocators(). It greatly over-estimates * the work to be done. */ -mlog (0 ,"extend inode %llu, i_size = %lld, di->i_clusters = %u," -" clusters_to_add = %u, extents_to_split = %u\n" , - (unsigned long long )OCFS2_I (inode)->ip_blkno, - (long long )i_size_read (inode),le32_to_cpu (di->i_clusters), - clusters_to_alloc, extents_to_split); -ocfs2_init_dinode_extent_tree (&et,INODE_CACHE (inode), wc->w_di_bh); ret = ocfs2_lock_allocators(inode, &et,
@@ -1865,8 +1868,8 @@ static void ocfs2_write_end_inline(struct inode *inode, loff_t pos,memcpy (di->id2.i_data.id_data + pos, kaddr + pos, *copied);kunmap_atomic (kaddr,KM_USER0 ); -mlog (0 ,"Data written to inode at offset %llu. " -"id_count = %u, copied = %u, i_dyn_features = 0x%x\n" , +trace_ocfs2_write_end_inline ( + (unsigned long long )OCFS2_I (inode)->ip_blkno, (unsigned long long )pos, *copied,le16_to_cpu (di->id2.i_data.id_count),le16_to_cpu (di->i_dyn_features));
fs/ocfs2/ocfs2_trace.h +168 -0
174 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH 12/34 ocfs2: Remove FILE_IO from masklog.
In reply to Tao MaFrom: Tao Ma <[email protected]>
Change all the "mlog(0," in fs/ocfs2/mmap.c to trace events. And finally remove masklog FILE_IO.
--- fs/ocfs2/cluster/masklog.c | 1 - fs/ocfs2/cluster/masklog.h | 1 - fs/ocfs2/mmap.c | 7 +++---- fs/ocfs2/ocfs2_trace.h | 28 ++++++++++++++++++++++++++++ 4 files changed, 31 insertions(+), 6 deletions(-)
fs/ocfs2/cluster/masklog.c +0 -1
@@ -94,7 +94,6 @@ static struct mlog_attribute mlog_attrs[MLOG_MAX_BITS] = {define_mask (AIO ),define_mask (JOURNAL ),define_mask (SUPER ), -define_mask (FILE_IO ),define_mask (EXTENT_MAP ),define_mask (DLM_GLUE ), define_mask(BH_IO),
fs/ocfs2/cluster/masklog.h +0 -1
@@ -96,7 +96,6 @@#define ML_AIO 0x0000000000002000ULL/* ocfs2 aio read and write */ #define ML_JOURNAL 0x0000000000004000ULL/* ocfs2 journalling functions */ #define ML_SUPER 0x0000000000010000ULL/* ocfs2 mount / umount */ -#define ML_FILE_IO 0x0000000000020000ULL/* ocfs2 file I/O */ #define ML_EXTENT_MAP 0x0000000000040000ULL/* ocfs2 extent map caching */ #define ML_DLM_GLUE 0x0000000000080000ULL/* ocfs2 dlm glue layer */ #define ML_BH_IO 0x0000000000100000ULL/* ocfs2 buffer I/O */
fs/ocfs2/mmap.c +3 -4
@@ -31,7 +31,6 @@#include <linux/signal.h> #include <linux/rbtree.h> -#define MLOG_MASK_PREFIX ML_FILE_IO#include <cluster/masklog.h> #include "ocfs2.h"
@@ -42,6 +41,7 @@#include "inode.h" #include "mmap.h" #include "super.h" +#include "ocfs2_trace.h" static int ocfs2_fault (struct vm_area_struct *area,struct vm_fault *vmf)
@@ -49,13 +49,12 @@ static int ocfs2_fault(struct vm_area_struct *area, struct vm_fault *vmf)sigset_t oldset;int ret; -mlog (0 ,"(area=%p, page offset=%lu)\n" , area, vmf->pgoff); -ocfs2_block_signals (&oldset); ret =filemap_fault (area, vmf);ocfs2_unblock_signals (&oldset); -mlog (0 ,"%p\n" , vmf->page); +trace_ocfs2_fault (OCFS2_I (area->vm_file->f_mapping->host)->ip_blkno, + area, vmf->page, vmf->pgoff);return ret; }
fs/ocfs2/ocfs2_trace.h +28 -0
@@ -1630,6 +1630,34 @@ TRACE_EVENT(ocfs2_write_end_inline, __entry->id_count, __entry->features) );/* End of trace events for fs/ocfs2/aops.c. */ + +/* Trace events for fs/ocfs2/mmap.c. */ +TRACE_EVENT (ocfs2_fault, + + TP_PROTO(unsigned long long ino, + void *area, void *page, unsigned long pgoff), + +TP_ARGS (ino, area, page, pgoff), + +TP_STRUCT__entry ( + __field( unsigned long long, ino ) + __field( void *, area ) + __field( void *, page ) + __field( unsigned long, pgoff ) + ), + +TP_fast_assign ( + __entry->ino = ino; + __entry->area = area; + __entry->page = page; + __entry->pgoff = pgoff; + ), + +TP_printk ("%llu %p %p %lu" , + __entry->ino, __entry->area, __entry->page, __entry->pgoff) +); +/* End of trace events for fs/ocfs2/mmap.c. */ +#endif /* _TRACE_OCFS2_H */ /* This part must be outside protection */
Signature · 1 line
1.7.0.4
PATCH 13/34 ocfs2: remove INODE from unused files.
In reply to Tao MaFrom: Tao Ma <[email protected]>
As there are no such debug information in fs/ocfs2/ioctl.c, fs/ocfs2/locks.c and fs/ocfs2/sysfile.c, ML_INODE are also removed.
--- fs/ocfs2/acl.c | 1 - fs/ocfs2/ioctl.c | 1 - fs/ocfs2/locks.c | 1 - 3 files changed, 0 insertions(+), 3 deletions(-)
fs/ocfs2/acl.c +0 -1
@@ -24,7 +24,6 @@#include <linux/slab.h> #include <linux/string.h> -#define MLOG_MASK_PREFIX ML_INODE#include <cluster/masklog.h> #include "ocfs2.h"
fs/ocfs2/ioctl.c +0 -1
@@ -9,7 +9,6 @@#include <linux/mount.h> #include <linux/compat.h> -#define MLOG_MASK_PREFIX ML_INODE#include <cluster/masklog.h> #include "ocfs2.h"
fs/ocfs2/locks.c +0 -1
@@ -26,7 +26,6 @@#include <linux/fs.h> #include <linux/fcntl.h> -#define MLOG_MASK_PREFIX ML_INODE#include <cluster/masklog.h> #include "ocfs2.h"
Signature · 1 line
1.7.0.4
PATCH 14/34 ocfs2: Remove mlog(0) from fs/ocfs2/file.c
In reply to Tao MaFrom: Tao Ma <[email protected]>
This is the 2nd step to remove the debug info of INODE.
--- fs/ocfs2/file.c | 190 ++++++++++++------------- fs/ocfs2/ocfs2_trace.h | 367 ++++++++++++++++++++++++++++++++++++++++++++++++ fs/ocfs2/sysfile.c | 1 - 3 files changed, 460 insertions(+), 98 deletions(-)
fs/ocfs2/file.c +93 -97
@@ -38,7 +38,6 @@#include <linux/quotaops.h> #include <linux/blkdev.h> -#define MLOG_MASK_PREFIX ML_INODE#include <cluster/masklog.h> #include "ocfs2.h"
@@ -61,6 +60,7 @@#include "acl.h" #include "quota.h" #include "refcounttree.h" +#include "ocfs2_trace.h" #include "buffer_head_io.h"
@@ -99,8 +99,10 @@ 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 (0 ,"(0x%p, 0x%p, '%.*s')\n" , inode, file, - file->f_path.dentry->d_name.len, file->f_path.dentry->d_name.name); +trace_ocfs2_file_open (inode, file, file->f_path.dentry, + (unsigned long long )OCFS2_I (inode)->ip_blkno, + file->f_path.dentry->d_name.len, + file->f_path.dentry->d_name.name, mode);if (file->f_mode &FMODE_WRITE )dquot_initialize (inode);
@@ -142,13 +144,15 @@ static int ocfs2_file_release(struct inode *inode, struct file *file) {struct ocfs2_inode_info *oi =OCFS2_I (inode); -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) oi->ip_flags &= ~OCFS2_INODE_OPEN_DIRECT ; + +trace_ocfs2_file_release (inode, file, file->f_path.dentry, + oi->ip_blkno, + file->f_path.dentry->d_name.len, + file->f_path.dentry->d_name.name, + oi->ip_open_count);spin_unlock (&oi->ip_lock);ocfs2_free_file_private (inode, file);
@@ -174,9 +178,11 @@ 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 (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); +trace_ocfs2_sync_file (inode, file, file->f_path.dentry, +OCFS2_I (inode)->ip_blkno, + file->f_path.dentry->d_name.len, + file->f_path.dentry->d_name.name, + (unsigned long long )datasync);if (datasync && !(inode->i_state &I_DIRTY_DATASYNC )) {/*
@@ -431,14 +437,14 @@ static int ocfs2_truncate_file(struct inode *inode,struct ocfs2_dinode *fe =NULL ;struct ocfs2_super *osb =OCFS2_SB (inode->i_sb); -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 */ fe = (struct ocfs2_dinode *) di_bh->b_data; +trace_ocfs2_truncate_file ((unsigned long long )OCFS2_I (inode)->ip_blkno, + (unsigned long long )le64_to_cpu (fe->i_size), + (unsigned long long )new_i_size); + mlog_bug_on_msg(le64_to_cpu(fe->i_size) != i_size_read(inode), "Inode %llu, inode i_size = %lld != di " "i_size = %llu, i_flags = 0x%x\n",
@@ -448,19 +454,14 @@ static int ocfs2_truncate_file(struct inode *inode, le32_to_cpu(fe->i_flags));if (new_i_size >le64_to_cpu (fe->i_size)) { -mlog (0 ,"asked to truncate file with size (%llu) to size (%llu)!\n" , - (unsigned long long )le64_to_cpu (fe->i_size), - (unsigned long long )new_i_size); +trace_ocfs2_truncate_file_error ( + (unsigned long long )le64_to_cpu (fe->i_size), + (unsigned long long )new_i_size); status = -EINVAL ;mlog_errno (status); goto bail; } -mlog (0 ,"inode %llu, i_size = %llu, new_i_size = %llu\n" , - (unsigned long long )le64_to_cpu (fe->i_blkno), - (unsigned long long )le64_to_cpu (fe->i_size), - (unsigned long long )new_i_size); -/* lets handle the simple truncate cases before doing any more * cluster locking. */ if (new_i_size ==le64_to_cpu (fe->i_size))
@@ -566,8 +567,6 @@ static int __ocfs2_extend_allocation(struct inode *inode, u32 logical_start,struct ocfs2_extent_tree et;int did_quota =0 ; -mlog (0 ,"(clusters_to_add = %u)\n" , clusters_to_add); -/* * This function only exists for file systems which don't * support holes.
@@ -584,11 +583,6 @@ static int __ocfs2_extend_allocation(struct inode *inode, u32 logical_start, restart_all:BUG_ON (le32_to_cpu (fe->i_clusters) !=OCFS2_I (inode)->ip_clusters); -mlog (0 ,"extend inode %llu, i_size = %lld, di->i_clusters = %u, " -"clusters_to_add = %u\n" , - (unsigned long long )OCFS2_I (inode)->ip_blkno, - (long long )i_size_read (inode),le32_to_cpu (fe->i_clusters), - clusters_to_add);ocfs2_init_dinode_extent_tree (&et,INODE_CACHE (inode), bh); status =ocfs2_lock_allocators (inode, &et, clusters_to_add,0 , &data_ac, &meta_ac);
@@ -608,6 +602,12 @@ restart_all: } restarted_transaction: +trace_ocfs2_extend_allocation ( + (unsigned long long )OCFS2_I (inode)->ip_blkno, + (unsigned long long )i_size_read (inode), +le32_to_cpu (fe->i_clusters), clusters_to_add, + why, restart_func); + status =dquot_alloc_space_nodirty (inode,ocfs2_clusters_to_bytes (osb->sb, clusters_to_add));if (status)
@@ -654,13 +654,11 @@ restarted_transaction:if (why !=RESTART_NONE && clusters_to_add) {if (why ==RESTART_META ) { -mlog (0 ,"restarting function.\n" ); restart_func =1 ; status =0 ; }else {BUG_ON (why !=RESTART_TRANS ); -mlog (0 ,"restarting transaction.\n" );/* TODO: This can be more intelligent. */ credits = ocfs2_calc_extend_credits(osb->sb, &fe->id2.i_list,
@@ -677,11 +675,11 @@ restarted_transaction: } } -mlog (0 ,"fe: i_clusters = %u, i_size=%llu\n" , +trace_ocfs2_extend_allocation_end (OCFS2_I (inode)->ip_blkno,le32_to_cpu (fe->i_clusters), - (unsigned long long )le64_to_cpu (fe->i_size)); -mlog (0 ,"inode: ip_clusters=%u, i_size=%lld\n" , -OCFS2_I (inode)->ip_clusters, (long long )i_size_read (inode)); + (unsigned long long )le64_to_cpu (fe->i_size), +OCFS2_I (inode)->ip_clusters, + (unsigned long long )i_size_read (inode)); leave:if (status <0 && did_quota)
@@ -772,10 +770,11 @@ static int ocfs2_write_zero_page(struct inode *inode, u64 abs_from,if (!zero_to) zero_to =PAGE_CACHE_SIZE ; -mlog (0 , -"abs_from = %llu, abs_to = %llu, index = %lu, zero_from = %u, zero_to = %u\n" , - (unsigned long long )abs_from, (unsigned long long )abs_to, - index, zero_from, zero_to); +trace_ocfs2_write_zero_page ( + (unsigned long long )OCFS2_I (inode)->ip_blkno, + (unsigned long long )abs_from, + (unsigned long long )abs_to, + index, zero_from, zero_to);/* We know that zero_from is block aligned */ for (block_start = zero_from; block_start < zero_to;
@@ -915,9 +914,10 @@ static int ocfs2_zero_extend_range(struct inode *inode, u64 range_start,u64 next_pos;u64 zero_pos = range_start; -mlog (0 ,"range_start = %llu, range_end = %llu\n" , - (unsigned long long )range_start, - (unsigned long long )range_end); +trace_ocfs2_zero_extend_range ( + (unsigned long long )OCFS2_I (inode)->ip_blkno, + (unsigned long long )range_start, + (unsigned long long )range_end);BUG_ON (range_start >= range_end);while (zero_pos < range_end) {
@@ -949,9 +949,9 @@ int ocfs2_zero_extend(struct inode *inode, struct buffer_head *di_bh,struct super_block *sb = inode->i_sb; zero_start =ocfs2_align_bytes_to_blocks (sb,i_size_read (inode)); -mlog (0 ,"zero_start %llu for i_size %llu\n" , - (unsigned long long )zero_start, - (unsigned long long )i_size_read (inode)); +trace_ocfs2_zero_extend ((unsigned long long )OCFS2_I (inode)->ip_blkno, + (unsigned long long )zero_start, + (unsigned long long )i_size_read (inode));while (zero_start < zero_to_size) { ret = ocfs2_zero_extend_get_range(inode, di_bh, zero_start, zero_to_size,
@@ -1100,30 +1100,20 @@ int ocfs2_setattr(struct dentry *dentry, struct iattr *attr)struct dquot *transfer_to[MAXQUOTAS ] = { };int qtype; -mlog (0 ,"(0x%p, '%.*s')\n" , dentry, - dentry->d_name.len, dentry->d_name.name); +trace_ocfs2_setattr (inode, dentry, + (unsigned long long )OCFS2_I (inode)->ip_blkno, + dentry->d_name.len, dentry->d_name.name, + attr->ia_valid, attr->ia_mode, + attr->ia_uid, attr->ia_gid);/* ensuring we don't even attempt to truncate a symlink */ if (S_ISLNK (inode->i_mode)) attr->ia_valid &= ~ATTR_SIZE ; -if (attr->ia_valid &ATTR_MODE ) -mlog (0 ,"mode change: %d\n" , attr->ia_mode); -if (attr->ia_valid &ATTR_UID ) -mlog (0 ,"uid change: %d\n" , attr->ia_uid); -if (attr->ia_valid &ATTR_GID ) -mlog (0 ,"gid change: %d\n" , attr->ia_gid); -if (attr->ia_valid &ATTR_SIZE ) -mlog (0 ,"size change...\n" ); -if (attr->ia_valid & (ATTR_ATIME |ATTR_MTIME |ATTR_CTIME )) -mlog (0 ,"time change...\n" ); -#define OCFS2_VALID_ATTRS (ATTR_ATIME | ATTR_MTIME | ATTR_CTIME | ATTR_SIZE \ | ATTR_GID | ATTR_UID | ATTR_MODE) -if (!(attr->ia_valid &OCFS2_VALID_ATTRS )) { -mlog (0 ,"can't handle attrs: 0x%x\n" , attr->ia_valid); +if (!(attr->ia_valid &OCFS2_VALID_ATTRS ))return 0 ; - } status =inode_change_ok (inode, attr);if (status)
@@ -1315,8 +1305,9 @@ static int __ocfs2_write_remove_suid(struct inode *inode,struct ocfs2_super *osb =OCFS2_SB (inode->i_sb);struct ocfs2_dinode *di; -mlog (0 ,"(Inode %llu, mode 0%o)\n" , - (unsigned long long )OCFS2_I (inode)->ip_blkno, inode->i_mode); +trace_ocfs2_write_remove_suid ( + (unsigned long long )OCFS2_I (inode)->ip_blkno, + inode->i_mode); handle =ocfs2_start_trans (osb,OCFS2_INODE_UPDATE_CREDITS );if (IS_ERR (handle)) {
@@ -1522,8 +1513,9 @@ static int ocfs2_zero_partial_clusters(struct inode *inode,* partial clusters here. There's no need to worry about * physical allocation - the zeroing code knows to skip holes. */ -mlog (0 ,"byte start: %llu, end: %llu\n" , - (unsigned long long )start, (unsigned long long )end); +trace_ocfs2_zero_partial_clusters ( + (unsigned long long )OCFS2_I (inode)->ip_blkno, + (unsigned long long )start, (unsigned long long )end);/* * If both edges are on a cluster boundary then there's no
@@ -1547,8 +1539,8 @@ static int ocfs2_zero_partial_clusters(struct inode *inode,if (tmpend > end) tmpend = end; -mlog (0 ,"1st range: start: %llu, tmpend: %llu\n" , - (unsigned long long )start, (unsigned long long )tmpend); +trace_ocfs2_zero_partial_clusters_range1 ((unsigned long long )start, + (unsigned long long )tmpend); ret =ocfs2_zero_range_for_truncate (inode, handle, start, tmpend);if (ret)
@@ -1562,8 +1554,8 @@ static int ocfs2_zero_partial_clusters(struct inode *inode,*/ start = end & ~(osb->s_clustersize -1 ); -mlog (0 ,"2nd range: start: %llu, end: %llu\n" , - (unsigned long long )start, (unsigned long long )end); +trace_ocfs2_zero_partial_clusters_range2 ( + (unsigned long long )start, (unsigned long long )end); ret =ocfs2_zero_range_for_truncate (inode, handle, start, end);if (ret)
@@ -1663,6 +1655,11 @@ static int ocfs2_remove_inode_range(struct inode *inode,ocfs2_init_dinode_extent_tree (&et,INODE_CACHE (inode), di_bh);ocfs2_init_dealloc_ctxt (&dealloc); +trace_ocfs2_remove_inode_range ( + (unsigned long long )OCFS2_I (inode)->ip_blkno, + (unsigned long long )byte_start, + (unsigned long long )byte_len); +if (byte_len ==0 )return 0 ;
@@ -1709,11 +1706,6 @@ static int ocfs2_remove_inode_range(struct inode *inode, trunc_end = (byte_start + byte_len) >> osb->s_clustersize_bits; cluster_in_el = trunc_end; -mlog (0 ,"Inode: %llu, start: %llu, len: %llu, cstart: %u, cend: %u\n" , - (unsigned long long )OCFS2_I (inode)->ip_blkno, - (unsigned long long )byte_start, - (unsigned long long )byte_len, trunc_start, trunc_end); - ret =ocfs2_zero_partial_clusters (inode, byte_start, byte_len);if (ret) {mlog_errno (ret);
@@ -2064,7 +2056,7 @@ static int ocfs2_prepare_inode_for_write(struct file *file,int ret =0 , meta_level =0 ;struct dentry *dentry = file->f_path.dentry;struct inode *inode = dentry->d_inode; -loff_t saved_pos, end; +loff_t saved_pos =0 , end;/* * We start with a read level meta lock and only jump to an ex
@@ -2103,12 +2095,10 @@ static int ocfs2_prepare_inode_for_write(struct file *file,/* work on a copy of ppos until we're sure that we won't have * to recalculate it due to relocking. */ -if (appending) { +if (appending) saved_pos =i_size_read (inode); -mlog (0 ,"O_APPEND: inode->i_size=%llu\n" , saved_pos); - }else { +else saved_pos = *ppos; - } end = saved_pos + count;
@@ -2179,6 +2169,10 @@ static int ocfs2_prepare_inode_for_write(struct file *file, *ppos = saved_pos; out_unlock: +trace_ocfs2_prepare_inode_for_write (OCFS2_I (inode)->ip_blkno, + saved_pos, appending, count, + direct_io, has_refcount); +if (meta_level >=0 )ocfs2_inode_unlock (inode, meta_level);
@@ -2204,10 +2198,11 @@ static ssize_t ocfs2_file_aio_write(struct kiocb *iocb,int full_coherency = !(osb->s_mount_opt &OCFS2_MOUNT_COHERENCY_BUFFERED ); -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); +trace_ocfs2_file_aio_write (inode, file, file->f_path.dentry, + (unsigned long long )OCFS2_I (inode)->ip_blkno, + file->f_path.dentry->d_name.len, + file->f_path.dentry->d_name.name, + (unsigned int )nr_segs);if (iocb->ki_left ==0 )return 0 ;
@@ -2402,10 +2397,11 @@ static ssize_t ocfs2_file_splice_write(struct pipe_inode_info *pipe, .u.file = out, }; -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); + +trace_ocfs2_file_splice_write (inode, out, out->f_path.dentry, + (unsigned long long )OCFS2_I (inode)->ip_blkno, + out->f_path.dentry->d_name.len, + out->f_path.dentry->d_name.name, len);if (pipe->inode)mutex_lock_nested (&pipe->inode->i_mutex,I_MUTEX_PARENT );
@@ -2461,10 +2457,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 (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); +trace_ocfs2_file_splice_read (inode, in, in->f_path.dentry, + (unsigned long long )OCFS2_I (inode)->ip_blkno, + in->f_path.dentry->d_name.len, + in->f_path.dentry->d_name.name, len);/* * See the comment in ocfs2_file_aio_read()
@@ -2491,10 +2487,11 @@ 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 (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); +trace_ocfs2_file_aio_read (inode, filp, filp->f_path.dentry, + (unsigned long long )OCFS2_I (inode)->ip_blkno, + filp->f_path.dentry->d_name.len, + filp->f_path.dentry->d_name.name, nr_segs); +if (!inode) { ret = -EINVAL ;
@@ -2537,8 +2534,7 @@ static ssize_t ocfs2_file_aio_read(struct kiocb *iocb,ocfs2_inode_unlock (inode, lock_level); ret =generic_file_aio_read (iocb, iov, nr_segs, iocb->ki_pos); -if (ret == -EINVAL ) -mlog (0 ,"generic_file_aio_read returned -EINVAL\n" ); +trace_generic_file_aio_read_ret (ret);/* buffered aio wouldn't have proper lock coverage today */ BUG_ON (ret == -EIOCBQUEUED && !(filp->f_flags &O_DIRECT ));
fs/ocfs2/ocfs2_trace.h +367 -0
379 lines not on this page · raw message
fs/ocfs2/sysfile.c +0 -1
@@ -27,7 +27,6 @@#include <linux/types.h> #include <linux/highmem.h> -#define MLOG_MASK_PREFIX ML_INODE#include <cluster/masklog.h> #include "ocfs2.h"
Signature · 1 line
1.7.0.4
PATCH 15/34 ocfs2: Little refactoring against ocfs2_iget.
In reply to Tao MaFrom: Tao Ma <[email protected]>
ocfs2_iget is used to get/create inode. Only iget5_locked will give us an inode = NULL. So move this check ahead of ocfs2_read_locked_inode so that we don't need to check inode before we read and unlock inode. This is also helpful for trace event(see the next patch).
--- fs/ocfs2/inode.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
fs/ocfs2/inode.c +5 -5
@@ -152,16 +152,16 @@ struct inode *ocfs2_iget(struct ocfs2_super *osb, u64 blkno, unsigned flags,/* inode was *not* in the inode cache. 2.6.x requires * us to do our own read_inode call and unlock it * afterwards. */ -if (inode && inode->i_state &I_NEW ) { -mlog (0 ,"Inode was not in inode cache, reading it.\n" ); -ocfs2_read_locked_inode (inode, &args); -unlock_new_inode (inode); - }if (inode ==NULL ) { inode =ERR_PTR (-ENOMEM );mlog_errno (PTR_ERR (inode)); goto bail; } +if (inode->i_state &I_NEW ) { +mlog (0 ,"Inode was not in inode cache, reading it.\n" ); +ocfs2_read_locked_inode (inode, &args); +unlock_new_inode (inode); + }if (is_bad_inode (inode)) {iput (inode); inode =ERR_PTR (-ESTALE );
Signature · 1 line
1.7.0.4
PATCH 16/34 ocfs2: Remove masklog ML_INODE.
In reply to Tao MaFrom: Tao Ma <[email protected]>
Remove mlog(0) from fs/ocfs2/inode.c and the masklog INODE.
--- fs/ocfs2/cluster/masklog.c | 1 - fs/ocfs2/cluster/masklog.h | 1 - fs/ocfs2/inode.c | 107 +++++++++------------ fs/ocfs2/ocfs2_trace.h | 227 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 273 insertions(+), 63 deletions(-)
fs/ocfs2/cluster/masklog.c +0 -1
@@ -99,7 +99,6 @@ static struct mlog_attribute mlog_attrs[MLOG_MAX_BITS] = {define_mask (BH_IO ),define_mask (UPTODATE ),define_mask (NAMEI ), -define_mask (INODE ),define_mask (VOTE ),define_mask (DCACHE ), define_mask(CONN),
fs/ocfs2/cluster/masklog.h +0 -1
@@ -101,7 +101,6 @@#define ML_BH_IO 0x0000000000100000ULL/* ocfs2 buffer I/O */ #define ML_UPTODATE 0x0000000000200000ULL/* ocfs2 caching sequence #'s */ #define ML_NAMEI 0x0000000000400000ULL/* ocfs2 directory / namespace */ -#define ML_INODE 0x0000000000800000ULL/* ocfs2 inode manipulation */ #define ML_VOTE 0x0000000001000000ULL/* ocfs2 node messaging */ #define ML_DCACHE 0x0000000002000000ULL/* ocfs2 dcache operations */ #define ML_CONN 0x0000000004000000ULL/* net connection management */
fs/ocfs2/inode.c +46 -61
317 lines not on this page · raw message
fs/ocfs2/ocfs2_trace.h +227 -0
239 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH 17/34 ocfs2: Remove masklog ML_EXTENT_MAP.
In reply to Tao MaFrom: Tao Ma <[email protected]>
Remove mlog(0) from fs/ocfs2/extent_map.c and the masklog EXTENT_MAP.
--- fs/ocfs2/cluster/masklog.c | 1 - fs/ocfs2/cluster/masklog.h | 1 - fs/ocfs2/extent_map.c | 5 ++--- fs/ocfs2/ocfs2_trace.h | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 34 insertions(+), 5 deletions(-)
fs/ocfs2/cluster/masklog.c +0 -1
@@ -94,7 +94,6 @@ static struct mlog_attribute mlog_attrs[MLOG_MAX_BITS] = {define_mask (AIO ),define_mask (JOURNAL ),define_mask (SUPER ), -define_mask (EXTENT_MAP ),define_mask (DLM_GLUE ),define_mask (BH_IO ), define_mask(UPTODATE),
fs/ocfs2/cluster/masklog.h +0 -1
@@ -96,7 +96,6 @@#define ML_AIO 0x0000000000002000ULL/* ocfs2 aio read and write */ #define ML_JOURNAL 0x0000000000004000ULL/* ocfs2 journalling functions */ #define ML_SUPER 0x0000000000010000ULL/* ocfs2 mount / umount */ -#define ML_EXTENT_MAP 0x0000000000040000ULL/* ocfs2 extent map caching */ #define ML_DLM_GLUE 0x0000000000080000ULL/* ocfs2 dlm glue layer */ #define ML_BH_IO 0x0000000000100000ULL/* ocfs2 buffer I/O */ #define ML_UPTODATE 0x0000000000200000ULL/* ocfs2 caching sequence #'s */
fs/ocfs2/extent_map.c +2 -3
@@ -28,7 +28,6 @@#include <linux/types.h> #include <linux/fiemap.h> -#define MLOG_MASK_PREFIX ML_EXTENT_MAP#include <cluster/masklog.h> #include "ocfs2.h"
@@ -39,6 +38,7 @@#include "inode.h" #include "super.h" #include "symlink.h" +#include "ocfs2_trace.h" #include "buffer_head_io.h"
@@ -841,8 +841,7 @@ int ocfs2_read_virt_blocks(struct inode *inode, u64 v_block, int nr,u64 p_block, p_count;int i, count, done =0 ; -mlog (0 ,"(inode = %p, v_block = %llu, nr = %d, bhs = %p, " -"flags = %x, validate = %p)\n" , +trace_ocfs2_read_virt_blocks ( inode, (unsigned long long )v_block, nr, bhs, flags, validate);
fs/ocfs2/ocfs2_trace.h +32 -0
@@ -2252,6 +2252,38 @@ DEFINE_EVENT(ocfs2__ull, ocfs2_mark_inode_dirty, );/* End of trace events for fs/ocfs2/inode.c. */ + +/* Trace events for fs/ocfs2/extent_map.c. */ +TRACE_EVENT (ocfs2_read_virt_blocks, + + TP_PROTO(void *inode, unsigned long long vblock, int nr, + void *bhs, unsigned int flags, void *validate), + +TP_ARGS (inode, vblock, nr, bhs, flags, validate), + +TP_STRUCT__entry ( + __field( void *, inode ) + __field( unsigned long long, vblock ) + __field( int, nr ) + __field( void *, bhs ) + __field( unsigned int, flags ) + __field( void *, validate ) + ), + +TP_fast_assign ( + __entry->inode = inode; + __entry->vblock = vblock; + __entry->nr = nr; + __entry->bhs = bhs; + __entry->flags = flags; + __entry->validate = validate; + ), + +TP_printk ("%p %llu %d %p %x %p" , __entry->inode, __entry->vblock, + __entry->nr, __entry->bhs, __entry->flags, __entry->validate) +); +/* End of trace events for fs/ocfs2/extent_map.c. */ +#endif /* _TRACE_OCFS2_H */ /* This part must be outside protection */
Signature · 1 line
1.7.0.4
PATCH 18/34 ocfs2: Remove mlog(0) from fs/ocfs2/slot_map.c
In reply to Tao MaFrom: Tao Ma <[email protected]>
This is the 1st step to remove the debug info of SUPER.
--- fs/ocfs2/ocfs2_trace.h | 30 ++++++++++++++++++++++++++++++ fs/ocfs2/slot_map.c | 13 +++++-------- 2 files changed, 35 insertions(+), 8 deletions(-)
fs/ocfs2/ocfs2_trace.h +30 -0
@@ -2284,6 +2284,36 @@ TRACE_EVENT(ocfs2_read_virt_blocks, );/* End of trace events for fs/ocfs2/extent_map.c. */ +/* Trace events for fs/ocfs2/slot_map.c. */ +DEFINE_EVENT (ocfs2__uint, ocfs2_refresh_slot_info, + + TP_PROTO(unsigned int blocks), + +TP_ARGS (blocks) +); + +DEFINE_EVENT (ocfs2__ull_uint, ocfs2_map_slot_buffers, + + TP_PROTO(unsigned long long bytes, unsigned int blocks), + +TP_ARGS (bytes, blocks) +); + +DEFINE_EVENT (ocfs2__ull_uint, ocfs2_map_slot_buffers_block, + + TP_PROTO(unsigned long long blkno, unsigned int i), + +TP_ARGS (blkno, i) +); + +DEFINE_EVENT (ocfs2__int, ocfs2_find_slot, + + TP_PROTO(int slot), + +TP_ARGS (slot) +); + +/* End of trace events for fs/ocfs2/slot_map.c. */ #endif /* _TRACE_OCFS2_H */ /* This part must be outside protection */
fs/ocfs2/slot_map.c +5 -8
@@ -27,7 +27,6 @@#include <linux/slab.h> #include <linux/highmem.h> -#define MLOG_MASK_PREFIX ML_SUPER#include <cluster/masklog.h> #include "ocfs2.h"
@@ -39,6 +38,7 @@#include "slot_map.h" #include "super.h" #include "sysfile.h" +#include "ocfs2_trace.h" #include "buffer_head_io.h"
@@ -142,8 +142,7 @@ int ocfs2_refresh_slot_info(struct ocfs2_super *osb)BUG_ON (si->si_blocks ==0 );BUG_ON (si->si_bh ==NULL ); -mlog (0 ,"Refreshing slot map, reading %u block(s)\n" , - si->si_blocks); +trace_ocfs2_refresh_slot_info (si->si_blocks);/* * We pass -1 as blocknr because we expect all of si->si_bh to
@@ -381,8 +380,7 @@ static int ocfs2_map_slot_buffers(struct ocfs2_super *osb,/* The size checks above should ensure this */ BUG_ON ((osb->max_slots / si->si_slots_per_block) > blocks); -mlog (0 ,"Slot map needs %u buffers for %llu bytes\n" , - si->si_blocks, bytes); +trace_ocfs2_map_slot_buffers (bytes, si->si_blocks); si->si_bh =kzalloc (sizeof (struct buffer_head *) * si->si_blocks,GFP_KERNEL );
@@ -400,8 +398,7 @@ static int ocfs2_map_slot_buffers(struct ocfs2_super *osb, goto bail; } -mlog (0 ,"Reading slot map block %u at %llu\n" , i, - (unsigned long long )blkno); +trace_ocfs2_map_slot_buffers_block ((unsigned long long )blkno, i); bh =NULL ;/* Acquire a fresh bh */ status = ocfs2_read_blocks(INODE_CACHE(si->si_inode), blkno,
@@ -503,7 +500,7 @@ int ocfs2_find_slot(struct ocfs2_super *osb) osb->slot_num = slot;spin_unlock (&osb->osb_lock); -mlog (0 ,"taking node slot %d\n" , osb->slot_num); +trace_ocfs2_find_slot (osb->slot_num); status =ocfs2_update_disk_slot (osb, si, osb->slot_num);if (status <0 )
Signature · 1 line
1.7.0.4
PATCH 19/34 ocfs2: Remove mlog(0) from fs/ocfs2/heartbeat.c
In reply to Tao MaFrom: Tao Ma <[email protected]>
This is the 2nd step to remove the debug info of SUPER.
--- fs/ocfs2/heartbeat.c | 4 ++-- fs/ocfs2/ocfs2_trace.h | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-)
fs/ocfs2/heartbeat.c +2 -2
@@ -28,7 +28,6 @@#include <linux/types.h> #include <linux/highmem.h> -#define MLOG_MASK_PREFIX ML_SUPER#include <cluster/masklog.h> #include "ocfs2.h"
@@ -37,6 +36,7 @@#include "heartbeat.h" #include "inode.h" #include "journal.h" +#include "ocfs2_trace.h" #include "buffer_head_io.h"
@@ -66,7 +66,7 @@ void ocfs2_do_node_down(int node_num, void *data)BUG_ON (osb->node_num == node_num); -mlog (0 ,"ocfs2: node down event for %d\n" , node_num); +trace_ocfs2_do_node_down (node_num);if (!osb->cconn) {/*
fs/ocfs2/ocfs2_trace.h +9 -0
@@ -2284,6 +2284,15 @@ TRACE_EVENT(ocfs2_read_virt_blocks, );/* End of trace events for fs/ocfs2/extent_map.c. */ +/* Trace events for fs/ocfs2/heartbeat.c. */ +DEFINE_EVENT (ocfs2__int, ocfs2_do_node_down, + + TP_PROTO(int node_num), + +TP_ARGS (node_num) +); +/* End of trace events for fs/ocfs2/heartbeat.c. */ +/* Trace events for fs/ocfs2/slot_map.c. */ DEFINE_EVENT(ocfs2__uint, ocfs2_refresh_slot_info,
Signature · 1 line
1.7.0.4
PATCH 20/34 ocfs2: Remove masklog ML_SUPER.
In reply to Tao MaFrom: Tao Ma <[email protected]>
Remove mlog(0) from fs/ocfs2/super.c and the masklog SUPER.
--- fs/ocfs2/cluster/masklog.c | 1 - fs/ocfs2/cluster/masklog.h | 1 - fs/ocfs2/ocfs2_trace.h | 141 ++++++++++++++++++++++++++++++++++++++++++++ fs/ocfs2/super.c | 29 +++------ 4 files changed, 151 insertions(+), 21 deletions(-)
fs/ocfs2/cluster/masklog.c +0 -1
@@ -93,7 +93,6 @@ static struct mlog_attribute mlog_attrs[MLOG_MAX_BITS] = {define_mask (DLM_RECOVERY ),define_mask (AIO ),define_mask (JOURNAL ), -define_mask (SUPER ),define_mask (DLM_GLUE ),define_mask (BH_IO ), define_mask(UPTODATE),
fs/ocfs2/cluster/masklog.h +0 -1
@@ -95,7 +95,6 @@#define ML_DLM_RECOVERY 0x0000000000001000ULL/* dlm master functions */ #define ML_AIO 0x0000000000002000ULL/* ocfs2 aio read and write */ #define ML_JOURNAL 0x0000000000004000ULL/* ocfs2 journalling functions */ -#define ML_SUPER 0x0000000000010000ULL/* ocfs2 mount / umount */ #define ML_DLM_GLUE 0x0000000000080000ULL/* ocfs2 dlm glue layer */ #define ML_BH_IO 0x0000000000100000ULL/* ocfs2 buffer I/O */ #define ML_UPTODATE 0x0000000000200000ULL/* ocfs2 caching sequence #'s */
fs/ocfs2/ocfs2_trace.h +141 -0
153 lines not on this page · raw message
fs/ocfs2/super.c +10 -19
@@ -45,7 +45,6 @@#define CREATE_TRACE_POINTS #include "ocfs2_trace.h" -#define MLOG_MASK_PREFIX ML_SUPER#include <cluster/masklog.h> #include "ocfs2.h"
@@ -673,12 +672,9 @@ static int ocfs2_remount(struct super_block *sb, int *flags, char *data) }if (*flags &MS_RDONLY ) { -mlog (0 ,"Going to ro mode.\n" ); sb->s_flags |=MS_RDONLY ; osb->osb_flags |=OCFS2_OSB_SOFT_RO ; }else { -mlog (0 ,"Making ro filesystem writeable.\n" ); -if (osb->osb_flags &OCFS2_OSB_ERROR_FS ) {mlog (ML_ERROR ,"Cannot remount RDWR " "filesystem due to previous errors.\n" );
@@ -696,6 +692,7 @@ static int ocfs2_remount(struct super_block *sb, int *flags, char *data) sb->s_flags &= ~MS_RDONLY ; osb->osb_flags &= ~OCFS2_OSB_SOFT_RO ; } +trace_ocfs2_remount (sb->s_flags, osb->osb_flags, *flags); unlock_osb:spin_unlock (&osb->osb_lock);/* Enable quota accounting after remounting RW */
@@ -1022,7 +1019,7 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent)char nodestr[8 ];struct ocfs2_blockcheck_stats stats; -mlog (0 ,"%p, %p, %i" , sb, data, silent); +trace_ocfs2_fill_super (sb, data, silent);if (!ocfs2_parse_options (sb, data, &parsed_options,0 )) { status = -EINVAL ;
@@ -1309,8 +1306,7 @@ static int ocfs2_parse_options(struct super_block *sb,char *p;u32 tmp; -mlog (0 ,"remount: %d, options: \"%s\"\n" , is_remount, - options ? options :"(none)" ); +trace_ocfs2_parse_options (is_remount, options ? options :"(none)" ); mopt->commit_interval =0 ; mopt->mount_opt =OCFS2_MOUNT_NOINTR ;
@@ -1674,7 +1670,7 @@ static void __exit ocfs2_exit(void)static void ocfs2_put_super (struct super_block *sb) { -mlog (0 ,"(0x%p)\n" , sb); +trace_ocfs2_put_super (sb);ocfs2_sync_blockdev (sb);ocfs2_dismount_volume (sb,0 );
@@ -1689,7 +1685,7 @@ static int ocfs2_statfs(struct dentry *dentry, struct kstatfs *buf)struct buffer_head *bh =NULL ;struct inode *inode =NULL ; -mlog (0 ,"(%p, %p)\n" , dentry->d_sb, buf); +trace_ocfs2_statfs (dentry->d_sb, buf); osb =OCFS2_SB (dentry->d_sb);
@@ -1910,7 +1906,7 @@ static void ocfs2_dismount_volume(struct super_block *sb, int mnt_err)struct ocfs2_super *osb =NULL ;char nodestr[8 ]; -mlog (0 ,"(0x%p)\n" , sb); +trace_ocfs2_dismount_volume (sb);BUG_ON (!sb); osb =OCFS2_SB (sb);
@@ -2124,7 +2120,6 @@ static int ocfs2_initialize_super(struct super_block *sb, status = -EINVAL ; goto bail; } -mlog (0 ,"max_slots for this device: %u\n" , osb->max_slots);ocfs2_orphan_scan_init (osb);
@@ -2263,7 +2258,6 @@ static int ocfs2_initialize_super(struct super_block *sb, osb->s_clustersize_bits =le32_to_cpu (di->id2.i_super.s_clustersize_bits); osb->s_clustersize =1 << osb->s_clustersize_bits; -mlog (0 ,"clusterbits=%d\n" , osb->s_clustersize_bits);if (osb->s_clustersize <OCFS2_MIN_CLUSTERSIZE || osb->s_clustersize >OCFS2_MAX_CLUSTERSIZE ) {
@@ -2302,11 +2296,10 @@ static int ocfs2_initialize_super(struct super_block *sb,le64_to_cpu (di->id2.i_super.s_first_cluster_group); osb->fs_generation =le32_to_cpu (di->i_fs_generation); osb->uuid_hash =le32_to_cpu (di->id2.i_super.s_uuid_hash); -mlog (0 ,"vol_label: %s\n" , osb->vol_label); -mlog (0 ,"uuid: %s\n" , osb->uuid_str); -mlog (0 ,"root_blkno=%llu, system_dir_blkno=%llu\n" , - (unsigned long long )osb->root_blkno, - (unsigned long long )osb->system_dir_blkno); +trace_ocfs2_initialize_super (osb->vol_label, osb->uuid_str, + (unsigned long long )osb->root_blkno, + (unsigned long long )osb->system_dir_blkno, + osb->s_clustersize_bits); osb->osb_dlm_debug =ocfs2_new_dlm_debug ();if (!osb->osb_dlm_debug) {
@@ -2481,8 +2474,6 @@ static int ocfs2_check_volume(struct ocfs2_super *osb)* ourselves as mounted. */ } -mlog (0 ,"Journal loaded.\n" ); - status =ocfs2_load_local_alloc (osb);if (status <0 ) {mlog_errno (status);
Signature · 1 line
1.7.0.4
PATCH 21/34 ocfs2: Remove masklog ML_XATTR.
In reply to Tao MaFrom: Tao Ma <[email protected]>
Remove mlog(0) from fs/ocfs2/xattr.c and the masklog ML_XATTR.
--- fs/ocfs2/cluster/masklog.c | 1 - fs/ocfs2/cluster/masklog.h | 1 - fs/ocfs2/ocfs2_trace.h | 342 ++++++++++++++++++++++++++++++++++++++++++++ fs/ocfs2/xattr.c | 153 ++++++++++---------- 4 files changed, 417 insertions(+), 80 deletions(-)
fs/ocfs2/cluster/masklog.c +0 -1
@@ -102,7 +102,6 @@ static struct mlog_attribute mlog_attrs[MLOG_MAX_BITS] = {define_mask (CONN ),define_mask (QUORUM ),define_mask (EXPORT ), -define_mask (XATTR ),define_mask (QUOTA ),define_mask (BASTS ), define_mask(ERROR),
fs/ocfs2/cluster/masklog.h +0 -1
@@ -104,7 +104,6 @@#define ML_CONN 0x0000000004000000ULL/* net connection management */ #define ML_QUORUM 0x0000000008000000ULL/* net connection quorum */ #define ML_EXPORT 0x0000000010000000ULL/* ocfs2 export operations */ -#define ML_XATTR 0x0000000020000000ULL/* ocfs2 extended attributes */ #define ML_QUOTA 0x0000000040000000ULL/* ocfs2 quota operations */ #define ML_BASTS 0x0000001000000000ULL/* dlmglue asts and basts */ /* bits that are infrequently given and frequently matched in the high word */
fs/ocfs2/ocfs2_trace.h +342 -0
360 lines not on this page · raw message
fs/ocfs2/xattr.c +75 -78
378 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH 22/34 ocfs2: Remove masklog ML_RESERVATIONS.
In reply to Tao MaFrom: Tao Ma <[email protected]>
Remove mlog(0) from fs/ocfs2/reservations.c and the masklog RESERVATIONS.
--- fs/ocfs2/cluster/masklog.c | 1 - fs/ocfs2/cluster/masklog.h | 1 - fs/ocfs2/ocfs2_trace.h | 170 ++++++++++++++++++++++++++++++++++++++++++++ fs/ocfs2/reservations.c | 57 +++++++-------- 4 files changed, 196 insertions(+), 33 deletions(-)
fs/ocfs2/cluster/masklog.c +0 -1
@@ -107,7 +107,6 @@ static struct mlog_attribute mlog_attrs[MLOG_MAX_BITS] = {define_mask (ERROR ),define_mask (NOTICE ), define_mask(KTHREAD), - define_mask(RESERVATIONS), };static struct attribute *mlog_attr_ptrs[MLOG_MAX_BITS ] = {NULL , };
fs/ocfs2/cluster/masklog.h +0 -1
@@ -110,7 +110,6 @@#define ML_ERROR 0x0000000100000000ULL/* sent to KERN_ERR */ #define ML_NOTICE 0x0000000200000000ULL/* setn to KERN_NOTICE */ #define ML_KTHREAD 0x0000000400000000ULL/* kernel thread activity */ -#define ML_RESERVATIONS 0x0000000800000000ULL/* ocfs2 alloc reservations */ #define ML_CLUSTER 0x0000001000000000ULL/* cluster stack */ #define MLOG_INITIAL_AND_MASK (ML_ERROR|ML_NOTICE)
fs/ocfs2/ocfs2_trace.h +170 -0
176 lines not on this page · raw message
fs/ocfs2/reservations.c +26 -31
162 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH 23/34 ocfs2: Remove mlog(0) from quota_local.c.
In reply to Tao MaFrom: Tao Ma <[email protected]>
Remove mlog(0) from fs/ocfs2/quota_local.c.
--- fs/ocfs2/ocfs2_trace.h | 24 ++++++++++++++++++++++++ fs/ocfs2/quota_local.c | 13 +++++++------ 2 files changed, 31 insertions(+), 6 deletions(-)
fs/ocfs2/ocfs2_trace.h +24 -0
@@ -2976,6 +2976,30 @@ TRACE_EVENT(ocfs2_resmap_claimed_bits_end, __entry->len, __entry->last_start, __entry->last_len) );/* End of trace events for fs/ocfs2/reservations.c. */ + +/* Trace events for fs/ocfs2/quota_local.c. */ +DEFINE_EVENT (ocfs2__ull_uint, ocfs2_recover_local_quota_file, + + TP_PROTO(unsigned long long ino, unsigned int type), + +TP_ARGS (ino, type) +); + +DEFINE_EVENT (ocfs2__int, ocfs2_finish_quota_recovery, + + TP_PROTO(int slot_num), + +TP_ARGS (slot_num) +); + +DEFINE_EVENT (ocfs2__ull_ull_uint, olq_set_dquot, + + TP_PROTO(unsigned long long space, + unsigned long long inode, unsigned int id), + +TP_ARGS (space, inode, id) +); +/* End of trace events for fs/ocfs2/quota_local.c. */ #endif /* _TRACE_OCFS2_H */ /* This part must be outside protection */
fs/ocfs2/quota_local.c +7 -6
@@ -8,7 +8,6 @@#include <linux/quotaops.h> #include <linux/module.h> -#define MLOG_MASK_PREFIX ML_QUOTA#include <cluster/masklog.h> #include "ocfs2_fs.h"
@@ -23,6 +22,7 @@#include "quota.h" #include "uptodate.h" #include "super.h" +#include "ocfs2_trace.h" /* Number of local quota structures per block */ static inline unsigned int ol_quota_entries_per_block (struct super_block *sb)
@@ -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 (0 ,"ino=%lu type=%u" , (unsigned long )lqinode->i_ino, type); +trace_ocfs2_recover_local_quota_file ((unsigned long )lqinode->i_ino, type);list_for_each_entry_safe (rchunk, next, &(rec->r_list[type]), rc_list) { chunk = rchunk->rc_chunk;
@@ -601,7 +601,7 @@ int ocfs2_finish_quota_recovery(struct ocfs2_super *osb,for (type =0 ; type <MAXQUOTAS ; type++) {if (list_empty (&(rec->r_list[type])))continue ; -mlog (0 ,"Recovering quota in slot %d\n" , slot_num); +trace_ocfs2_finish_quota_recovery (slot_num); lqinode =ocfs2_get_system_file_inode (osb, ino[type], slot_num);if (!lqinode) { status = -ENOENT ;
@@ -883,9 +883,10 @@ static void olq_set_dquot(struct buffer_head *bh, void *private) dqblk->dqb_inodemod =cpu_to_le64 (od->dq_dquot.dq_dqb.dqb_curinodes - od->dq_originodes);spin_unlock (&dq_data_lock); -mlog (0 ,"Writing local dquot %u space %lld inodes %lld\n" , - od->dq_dquot.dq_id, (long long )le64_to_cpu (dqblk->dqb_spacemod), - (long long )le64_to_cpu (dqblk->dqb_inodemod)); +trace_olq_set_dquot ( + (unsigned long long )le64_to_cpu (dqblk->dqb_spacemod), + (unsigned long long )le64_to_cpu (dqblk->dqb_inodemod), + od->dq_dquot.dq_id); }/* Write dquot to local quota file */
Signature · 1 line
1.7.0.4
PATCH 24/34 ocfs2: Remove masklog ML_QUOTA.
In reply to Tao MaFrom: Tao Ma <[email protected]>
Remove mlog(0) from fs/ocfs2/quota_global.c and
the masklog QUOTA.
--- fs/ocfs2/cluster/masklog.c | 1 - fs/ocfs2/cluster/masklog.h | 1 - fs/ocfs2/ocfs2_trace.h | 110 ++++++++++++++++++++++++++++++++++++++++++++ fs/ocfs2/quota_global.c | 24 +++++----- 4 files changed, 122 insertions(+), 14 deletions(-)
fs/ocfs2/cluster/masklog.c +0 -1
@@ -102,7 +102,6 @@ static struct mlog_attribute mlog_attrs[MLOG_MAX_BITS] = {define_mask (CONN ),define_mask (QUORUM ),define_mask (EXPORT ), -define_mask (QUOTA ),define_mask (BASTS ),define_mask (ERROR ), define_mask(NOTICE),
fs/ocfs2/cluster/masklog.h +0 -1
@@ -104,7 +104,6 @@#define ML_CONN 0x0000000004000000ULL/* net connection management */ #define ML_QUORUM 0x0000000008000000ULL/* net connection quorum */ #define ML_EXPORT 0x0000000010000000ULL/* ocfs2 export operations */ -#define ML_QUOTA 0x0000000040000000ULL/* ocfs2 quota operations */ #define ML_BASTS 0x0000001000000000ULL/* dlmglue asts and basts */ /* bits that are infrequently given and frequently matched in the high word */ #define ML_ERROR 0x0000000100000000ULL/* sent to KERN_ERR */
fs/ocfs2/ocfs2_trace.h +110 -0
122 lines not on this page · raw message
fs/ocfs2/quota_global.c +12 -12
@@ -11,7 +11,6 @@#include <linux/writeback.h> #include <linux/workqueue.h> -#define MLOG_MASK_PREFIX ML_QUOTA#include <cluster/masklog.h> #include "ocfs2_fs.h"
@@ -27,6 +26,7 @@#include "super.h" #include "buffer_head_io.h" #include "quota.h" +#include "ocfs2_trace.h" /* * Locking of quotas with OCFS2 is rather complex. Here are rules that
@@ -132,8 +132,7 @@ int ocfs2_validate_quota_block(struct super_block *sb, struct buffer_head *bh)struct ocfs2_disk_dqtrailer *dqt =ocfs2_block_dqtrailer (sb->s_blocksize, bh->b_data); -mlog (0 ,"Validating quota block %llu\n" , - (unsigned long long )bh->b_blocknr); +trace_ocfs2_validate_quota_block ((unsigned long long )bh->b_blocknr);BUG_ON (!buffer_uptodate (bh));
@@ -509,9 +508,10 @@ int __ocfs2_sync_dquot(struct dquot *dquot, int freeing) olditime = dquot->dq_dqb.dqb_itime; oldbtime = dquot->dq_dqb.dqb_btime;ocfs2_global_disk2memdqb (dquot, &dqblk); -mlog (0 ,"Syncing global dquot %u space %lld+%lld, inodes %lld+%lld\n" , - dquot->dq_id, dquot->dq_dqb.dqb_curspace, (long long )spacechange, - dquot->dq_dqb.dqb_curinodes, (long long )inodechange); +trace_ocfs2_sync_dquot (dquot->dq_id, dquot->dq_dqb.dqb_curspace, + (long long )spacechange, + dquot->dq_dqb.dqb_curinodes, + (long long )inodechange);if (!test_bit (DQ_LASTSET_B +QIF_SPACE_B , &dquot->dq_flags)) dquot->dq_dqb.dqb_curspace += spacechange;if (!test_bit (DQ_LASTSET_B +QIF_INODES_B , &dquot->dq_flags))
@@ -595,8 +595,8 @@ static int ocfs2_sync_dquot_helper(struct dquot *dquot, unsigned long type)struct ocfs2_super *osb =OCFS2_SB (sb);int status =0 ; -mlog (0 ,"id=%u qtype=%u type=%lu device=%s\n" , dquot->dq_id, - dquot->dq_type, type, sb->s_id); +trace_ocfs2_sync_dquot_helper (dquot->dq_id, dquot->dq_type, + type, sb->s_id);if (type != dquot->dq_type) goto out; status =ocfs2_lock_global_qf (oinfo,1 );
@@ -647,7 +647,7 @@ static int ocfs2_write_dquot(struct dquot *dquot)struct ocfs2_super *osb =OCFS2_SB (dquot->dq_sb);int status =0 ; -mlog (0 ,"id=%u, type=%d" , dquot->dq_id, dquot->dq_type); +trace_ocfs2_write_dquot (dquot->dq_id, dquot->dq_type); handle =ocfs2_start_trans (osb,OCFS2_QWRITE_CREDITS );if (IS_ERR (handle)) {
@@ -685,7 +685,7 @@ static int ocfs2_release_dquot(struct dquot *dquot)struct ocfs2_super *osb =OCFS2_SB (dquot->dq_sb);int status =0 ; -mlog (0 ,"id=%u, type=%d" , dquot->dq_id, dquot->dq_type); +trace_ocfs2_release_dquot (dquot->dq_id, dquot->dq_type);mutex_lock (&dquot->dq_lock);/* Check whether we are not racing with some other dqget() */
@@ -743,7 +743,7 @@ static int ocfs2_acquire_dquot(struct dquot *dquot)int need_alloc =ocfs2_global_qinit_alloc (sb, type);handle_t *handle; -mlog (0 ,"id=%u, type=%d" , dquot->dq_id, type); +trace_ocfs2_acquire_dquot (dquot->dq_id, type);mutex_lock (&dquot->dq_lock);/* * We need an exclusive lock, because we're going to update use count
@@ -830,7 +830,7 @@ static int ocfs2_mark_dquot_dirty(struct dquot *dquot)handle_t *handle;struct ocfs2_super *osb =OCFS2_SB (sb); -mlog (0 ,"id=%u, type=%d" , dquot->dq_id, type); +trace_ocfs2_mark_dquot_dirty (dquot->dq_id, type);/* In case user set some limits, sync dquot immediately to global * quota file so that information propagates quicker */
Signature · 1 line
1.7.0.4
PATCH 25/34 ocfs2: remove NAMEI from symlink.c
In reply to Tao MaFrom: Tao Ma <[email protected]>
No mlog(0,...) in symlink.c, so just remove NAMEI.
--- fs/ocfs2/symlink.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
fs/ocfs2/symlink.c +0 -1
@@ -40,7 +40,6 @@#include <linux/pagemap.h> #include <linux/namei.h> -#define MLOG_MASK_PREFIX ML_NAMEI#include <cluster/masklog.h> #include "ocfs2.h"
Signature · 1 line
1.7.0.4
PATCH 26/34 ocfs2: Remove mlog(0) from fs/ocfs2/dir.c
In reply to Tao MaFrom: Tao Ma <[email protected]>
This is the 2nd step to remove the debug info of NAMEI.
--- fs/ocfs2/dir.c | 83 +++++++++----------- fs/ocfs2/ocfs2_trace.h | 197 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 234 insertions(+), 46 deletions(-)
fs/ocfs2/dir.c +37 -46
@@ -43,7 +43,6 @@#include <linux/quotaops.h> #include <linux/sort.h> -#define MLOG_MASK_PREFIX ML_NAMEI#include <cluster/masklog.h> #include "ocfs2.h"
@@ -61,6 +60,7 @@#include "super.h" #include "sysfile.h" #include "uptodate.h" +#include "ocfs2_trace.h" #include "buffer_head_io.h"
@@ -400,7 +400,7 @@ static int inline ocfs2_search_dirblock(struct buffer_head *bh, } bail: -mlog (0 ,"ret = %d\n" , ret); +trace_ocfs2_search_dirblock (ret);return ret; }
@@ -445,8 +445,7 @@ static int ocfs2_validate_dir_block(struct super_block *sb,* We don't validate dirents here, that's handled * in-place when the code walks them. */ -mlog (0 ,"Validating dirblock %llu\n" , - (unsigned long long )bh->b_blocknr); +trace_ocfs2_validate_dir_block ((unsigned long long )bh->b_blocknr);BUG_ON (!buffer_uptodate (bh));
@@ -784,7 +783,7 @@ cleanup_and_exit:for (; ra_ptr < ra_max; ra_ptr++)brelse (bh_use[ra_ptr]); -mlog (0 ,"ret = %p\n" , ret); +trace_ocfs2_find_entry_el (ret);return ret; }
@@ -946,11 +945,9 @@ static int ocfs2_dx_dir_search(const char *name, int namelen, goto out; } -mlog (0 ,"Dir %llu: name: \"%.*s\", lookup of hash: %u.0x%x " -"returns: %llu\n" , - (unsigned long long )OCFS2_I (dir)->ip_blkno, - namelen, name, hinfo->major_hash, hinfo->minor_hash, - (unsigned long long )phys); +trace_ocfs2_dx_dir_search ((unsigned long long )OCFS2_I (dir)->ip_blkno, + namelen, name, hinfo->major_hash, + hinfo->minor_hash, (unsigned long long )phys); ret =ocfs2_read_dx_leaf (dir, phys, &dx_leaf_bh);if (ret) {
@@ -960,9 +957,9 @@ static int ocfs2_dx_dir_search(const char *name, int namelen, dx_leaf = (struct ocfs2_dx_leaf *) dx_leaf_bh->b_data; -mlog (0 ,"leaf info: num_used: %d, count: %d\n" , -le16_to_cpu (dx_leaf->dl_list.de_num_used), -le16_to_cpu (dx_leaf->dl_list.de_count)); +trace_ocfs2_dx_dir_search_leaf_info ( +le16_to_cpu (dx_leaf->dl_list.de_num_used), +le16_to_cpu (dx_leaf->dl_list.de_count)); entry_list = &dx_leaf->dl_list;
@@ -1162,8 +1159,6 @@ 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 (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;
@@ -1343,8 +1338,8 @@ static int ocfs2_delete_entry_dx(handle_t *handle, struct inode *dir, } } -mlog (0 ,"Dir %llu: delete entry at index: %d\n" , - (unsigned long long )OCFS2_I (dir)->ip_blkno, index); +trace_ocfs2_delete_entry_dx ((unsigned long long )OCFS2_I (dir)->ip_blkno, + index); ret =__ocfs2_delete_entry (handle, dir, lookup->dl_entry, leaf_bh, leaf_bh->b_data, leaf_bh->b_size);
@@ -2022,8 +2017,7 @@ 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 (0 ,"dirino=%llu\n" , - (unsigned long long )OCFS2_I (inode)->ip_blkno); +trace_ocfs2_readdir ((unsigned long long )OCFS2_I (inode)->ip_blkno); error =ocfs2_inode_lock_atime (inode, filp->f_vfsmnt, &lock_level);if (lock_level && error >=0 ) {
@@ -2064,8 +2058,8 @@ int ocfs2_find_files_on_disk(const char *name, {int status = -ENOENT ; -mlog (0 ,"name=%.*s, blkno=%p, inode=%llu\n" , namelen, name, blkno, - (unsigned long long )OCFS2_I (inode)->ip_blkno); +trace_ocfs2_find_files_on_disk (namelen, name, blkno, + (unsigned long long )OCFS2_I (inode)->ip_blkno); status =ocfs2_find_entry (name, namelen, inode, lookup);if (status)
@@ -2109,8 +2103,8 @@ int ocfs2_check_dir_for_entry(struct inode *dir,int ret;struct ocfs2_dir_lookup_result lookup = {NULL , }; -mlog (0 ,"dir %llu, name '%.*s'\n" , - (unsigned long long )OCFS2_I (dir)->ip_blkno, namelen, name); +trace_ocfs2_check_dir_for_entry ( + (unsigned long long )OCFS2_I (dir)->ip_blkno, namelen, name); ret = -EEXIST ;if (ocfs2_find_entry (name, namelen, dir, &lookup) ==0 )
@@ -2402,9 +2396,9 @@ static int ocfs2_dx_dir_attach_index(struct ocfs2_super *osb, goto out; } -mlog (0 ,"Dir %llu, attach new index block: %llu\n" , - (unsigned long long )OCFS2_I (dir)->ip_blkno, - (unsigned long long )dr_blkno); +trace_ocfs2_dx_dir_attach_index ( + (unsigned long long )OCFS2_I (dir)->ip_blkno, + (unsigned long long )dr_blkno); dx_root_bh =sb_getblk (osb->sb, dr_blkno);if (dx_root_bh ==NULL ) {
@@ -2502,11 +2496,10 @@ static int ocfs2_dx_dir_format_cluster(struct ocfs2_super *osb, dx_leaf->dl_list.de_count =cpu_to_le16 (ocfs2_dx_entries_per_leaf (osb->sb)); -mlog (0 , -"Dir %llu, format dx_leaf: %llu, entry count: %u\n" , - (unsigned long long )OCFS2_I (dir)->ip_blkno, - (unsigned long long )bh->b_blocknr, -le16_to_cpu (dx_leaf->dl_list.de_count)); +trace_ocfs2_dx_dir_format_cluster ( + (unsigned long long )OCFS2_I (dir)->ip_blkno, + (unsigned long long )bh->b_blocknr, +le16_to_cpu (dx_leaf->dl_list.de_count));ocfs2_journal_dirty (handle, bh); }
@@ -2750,12 +2743,11 @@ static void ocfs2_dx_dir_index_root_block(struct inode *dir,ocfs2_dx_dir_name_hash (dir, de->name, de->name_len, &hinfo); -mlog (0 , -"dir: %llu, major: 0x%x minor: 0x%x, index: %u, name: %.*s\n" , - (unsigned long long )dir->i_ino, hinfo.major_hash, - hinfo.minor_hash, -le16_to_cpu (dx_root->dr_entries.de_num_used), - de->name_len, de->name); +trace_ocfs2_dx_dir_index_root_block ( + (unsigned long long )dir->i_ino, + hinfo.major_hash, hinfo.minor_hash, + de->name_len, de->name, +le16_to_cpu (dx_root->dr_entries.de_num_used));ocfs2_dx_entry_list_insert (&dx_root->dr_entries, &hinfo, dirent_blk);
@@ -3308,8 +3300,8 @@ static int ocfs2_extend_dir(struct ocfs2_super *osb,down_write (&OCFS2_I (dir)->ip_alloc_sem); drop_alloc_sem =1 ; dir_i_size =i_size_read (dir); -mlog (0 ,"extending dir %llu (i_size = %lld)\n" , - (unsigned long long )OCFS2_I (dir)->ip_blkno, dir_i_size); +trace_ocfs2_extend_dir ((unsigned long long )OCFS2_I (dir)->ip_blkno, + dir_i_size);/* dir->i_size is always block aligned. */ spin_lock (&OCFS2_I (dir)->ip_lock);
@@ -3803,9 +3795,9 @@ static int ocfs2_dx_dir_rebalance(struct ocfs2_super *osb, struct inode *dir,struct ocfs2_dx_root_block *dx_root;struct ocfs2_dx_leaf *tmp_dx_leaf =NULL ; -mlog (0 ,"DX Dir: %llu, rebalance leaf leaf_blkno: %llu insert: %u\n" , - (unsigned long long )OCFS2_I (dir)->ip_blkno, - (unsigned long long )leaf_blkno, insert_hash); +trace_ocfs2_dx_dir_rebalance ((unsigned long long )OCFS2_I (dir)->ip_blkno, + (unsigned long long )leaf_blkno, + insert_hash);ocfs2_init_dx_root_extent_tree (&et,INODE_CACHE (dir), dx_root_bh);
@@ -3885,8 +3877,7 @@ static int ocfs2_dx_dir_rebalance(struct ocfs2_super *osb, struct inode *dir, goto out_commit; } -mlog (0 ,"Split leaf (%u) at %u, insert major hash is %u\n" , - leaf_cpos, split_hash, insert_hash); +trace_ocfs2_dx_dir_rebalance_split (leaf_cpos, split_hash, insert_hash);/* * We have to carefully order operations here. There are items
@@ -4343,8 +4334,8 @@ int ocfs2_prepare_dir_for_insert(struct ocfs2_super *osb,unsigned int blocks_wanted =1 ;struct buffer_head *bh =NULL ; -mlog (0 ,"getting ready to insert namelen %d into dir %llu\n" , - namelen, (unsigned long long )OCFS2_I (dir)->ip_blkno); +trace_ocfs2_prepare_dir_for_insert ( + (unsigned long long )OCFS2_I (dir)->ip_blkno, namelen);if (!namelen) { ret = -EINVAL ;
fs/ocfs2/ocfs2_trace.h +197 -0
203 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH 27/34 ocfs2: Remove masklog ML_NAMEI.
In reply to Tao MaFrom: Tao Ma <[email protected]>
Remove mlog(0) from fs/ocfs2/namei.c and the masklog NAMEI finally.
--- fs/ocfs2/cluster/masklog.c | 1 - fs/ocfs2/cluster/masklog.h | 1 - fs/ocfs2/namei.c | 126 +++++++--------- fs/ocfs2/ocfs2_trace.h | 351 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 408 insertions(+), 71 deletions(-)
fs/ocfs2/cluster/masklog.c +0 -1
@@ -96,7 +96,6 @@ static struct mlog_attribute mlog_attrs[MLOG_MAX_BITS] = {define_mask (DLM_GLUE ),define_mask (BH_IO ),define_mask (UPTODATE ), -define_mask (NAMEI ),define_mask (VOTE ),define_mask (DCACHE ), define_mask(CONN),
fs/ocfs2/cluster/masklog.h +0 -1
@@ -98,7 +98,6 @@#define ML_DLM_GLUE 0x0000000000080000ULL/* ocfs2 dlm glue layer */ #define ML_BH_IO 0x0000000000100000ULL/* ocfs2 buffer I/O */ #define ML_UPTODATE 0x0000000000200000ULL/* ocfs2 caching sequence #'s */ -#define ML_NAMEI 0x0000000000400000ULL/* ocfs2 directory / namespace */ #define ML_VOTE 0x0000000001000000ULL/* ocfs2 node messaging */ #define ML_DCACHE 0x0000000002000000ULL/* ocfs2 dcache operations */ #define ML_CONN 0x0000000004000000ULL/* net connection management */
fs/ocfs2/namei.c +57 -69
306 lines not on this page · raw message
fs/ocfs2/ocfs2_trace.h +351 -0
357 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH 28/34 ocfs2: Remove masklog ML_DCACHE.
In reply to Tao MaFrom: Tao Ma <[email protected]>
Remove mlog(0) from fs/ocfs2/dcache.c and the masklog DCACHE.
--- fs/ocfs2/cluster/masklog.c | 1 - fs/ocfs2/cluster/masklog.h | 1 - fs/ocfs2/dcache.c | 44 +++++++------- fs/ocfs2/ocfs2_trace.h | 143 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 165 insertions(+), 24 deletions(-)
fs/ocfs2/cluster/masklog.c +0 -1
@@ -97,7 +97,6 @@ static struct mlog_attribute mlog_attrs[MLOG_MAX_BITS] = {define_mask (BH_IO ),define_mask (UPTODATE ),define_mask (VOTE ), -define_mask (DCACHE ),define_mask (CONN ),define_mask (QUORUM ), define_mask(EXPORT),
fs/ocfs2/cluster/masklog.h +0 -1
@@ -99,7 +99,6 @@#define ML_BH_IO 0x0000000000100000ULL/* ocfs2 buffer I/O */ #define ML_UPTODATE 0x0000000000200000ULL/* ocfs2 caching sequence #'s */ #define ML_VOTE 0x0000000001000000ULL/* ocfs2 node messaging */ -#define ML_DCACHE 0x0000000002000000ULL/* ocfs2 dcache operations */ #define ML_CONN 0x0000000004000000ULL/* net connection management */ #define ML_QUORUM 0x0000000008000000ULL/* net connection quorum */ #define ML_EXPORT 0x0000000010000000ULL/* ocfs2 export operations */
fs/ocfs2/dcache.c +22 -22
110 lines not on this page · raw message
fs/ocfs2/ocfs2_trace.h +143 -0
149 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH 29/34 ocfs2: Remove masklog ML_EXPORT.
In reply to Tao MaFrom: Tao Ma <[email protected]>
Remove mlog(0) from fs/ocfs2/export.c and the masklog EXPORT.
--- fs/ocfs2/cluster/masklog.c | 1 - fs/ocfs2/cluster/masklog.h | 1 - fs/ocfs2/export.c | 47 +++++++--------- fs/ocfs2/ocfs2_trace.h | 135 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 155 insertions(+), 29 deletions(-)
fs/ocfs2/cluster/masklog.c +0 -1
@@ -99,7 +99,6 @@ static struct mlog_attribute mlog_attrs[MLOG_MAX_BITS] = {define_mask (VOTE ),define_mask (CONN ),define_mask (QUORUM ), -define_mask (EXPORT ),define_mask (BASTS ),define_mask (ERROR ), define_mask(NOTICE),
fs/ocfs2/cluster/masklog.h +0 -1
@@ -101,7 +101,6 @@#define ML_VOTE 0x0000000001000000ULL/* ocfs2 node messaging */ #define ML_CONN 0x0000000004000000ULL/* net connection management */ #define ML_QUORUM 0x0000000008000000ULL/* net connection quorum */ -#define ML_EXPORT 0x0000000010000000ULL/* ocfs2 export operations */ #define ML_BASTS 0x0000001000000000ULL/* dlmglue asts and basts */ /* bits that are infrequently given and frequently matched in the high word */ #define ML_ERROR 0x0000000100000000ULL/* sent to KERN_ERR */
fs/ocfs2/export.c +20 -27
139 lines not on this page · raw message
fs/ocfs2/ocfs2_trace.h +135 -0
141 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH 30/34 ocfs2: Remove masklog ML_JOURNAL.
In reply to Tao MaFrom: Tao Ma <[email protected]>
Remove mlog(0) from fs/ocfs2/journal.c and the masklog JOURNAL.
--- fs/ocfs2/cluster/masklog.c | 1 - fs/ocfs2/cluster/masklog.h | 1 - fs/ocfs2/journal.c | 130 ++++++++++-------------- fs/ocfs2/ocfs2_trace.h | 241 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 295 insertions(+), 78 deletions(-)
fs/ocfs2/cluster/masklog.c +0 -1
@@ -92,7 +92,6 @@ static struct mlog_attribute mlog_attrs[MLOG_MAX_BITS] = {define_mask (DLM_MASTER ),define_mask (DLM_RECOVERY ),define_mask (AIO ), -define_mask (JOURNAL ),define_mask (DLM_GLUE ),define_mask (BH_IO ), define_mask(UPTODATE),
fs/ocfs2/cluster/masklog.h +0 -1
@@ -94,7 +94,6 @@#define ML_DLM_MASTER 0x0000000000000800ULL/* dlm master functions */ #define ML_DLM_RECOVERY 0x0000000000001000ULL/* dlm master functions */ #define ML_AIO 0x0000000000002000ULL/* ocfs2 aio read and write */ -#define ML_JOURNAL 0x0000000000004000ULL/* ocfs2 journalling functions */ #define ML_DLM_GLUE 0x0000000000080000ULL/* ocfs2 dlm glue layer */ #define ML_BH_IO 0x0000000000100000ULL/* ocfs2 buffer I/O */ #define ML_UPTODATE 0x0000000000200000ULL/* ocfs2 caching sequence #'s */
fs/ocfs2/journal.c +54 -76
358 lines not on this page · raw message
fs/ocfs2/ocfs2_trace.h +241 -0
247 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH 31/34 ocfs2: Remove masklog ML_BH_IO.
In reply to Tao MaFrom: Tao Ma <[email protected]>
Remove mlog(0,...) and mlog(ML_BH_IO,...) fromfs/ocfs2/buffer_head_io.c.
The masklog BH_IO is removed finally.
--- fs/ocfs2/buffer_head_io.c | 37 +++++++-------------- fs/ocfs2/cluster/masklog.c | 1 - fs/ocfs2/cluster/masklog.h | 1 - fs/ocfs2/ocfs2_trace.h | 76 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 89 insertions(+), 26 deletions(-)
fs/ocfs2/buffer_head_io.c +13 -24
@@ -35,8 +35,8 @@#include "inode.h" #include "journal.h" #include "uptodate.h" -#include "buffer_head_io.h" +#include "ocfs2_trace.h" /* * Bits on bh->b_state used by ocfs2.
@@ -55,8 +55,7 @@ int ocfs2_write_block(struct ocfs2_super *osb, struct buffer_head *bh, {int ret =0 ; -mlog (0 ,"(bh->b_blocknr = %llu, ci=%p)\n" , - (unsigned long long )bh->b_blocknr, ci); +trace_ocfs2_write_block ((unsigned long long )bh->b_blocknr, ci);BUG_ON (bh->b_blocknr <OCFS2_SUPER_BLOCK_BLKNO );BUG_ON (buffer_jbd (bh));
@@ -107,10 +106,10 @@ int ocfs2_read_blocks_sync(struct ocfs2_super *osb, u64 block,unsigned int i;struct buffer_head *bh; -if (!nr) { -mlog (ML_BH_IO ,"No buffers will be read!\n" ); +trace_ocfs2_read_blocks_sync ((unsigned long long )block, nr); + +if (!nr) goto bail; - }for (i =0 ; i < nr ; i++) {if (bhs[i] ==NULL ) {
@@ -124,10 +123,8 @@ int ocfs2_read_blocks_sync(struct ocfs2_super *osb, u64 block, bh = bhs[i];if (buffer_jbd (bh)) { -mlog (ML_BH_IO , -"trying to sync read a jbd " -"managed bh (blocknr = %llu), skipping\n" , - (unsigned long long )bh->b_blocknr); +trace_ocfs2_read_blocks_sync_jbd ( + (unsigned long long )bh->b_blocknr);continue ; }
@@ -187,8 +184,7 @@ 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 (0 ,"(ci=%p, block=(%llu), nr=(%d), flags=%d)\n" , - ci, (unsigned long long )block, nr, flags); +trace_ocfs2_read_blocks_begin (ci, (unsigned long long )block, nr, flags);BUG_ON (!ci); BUG_ON((flags & OCFS2_BH_READAHEAD) &&
@@ -208,7 +204,6 @@ int ocfs2_read_blocks(struct ocfs2_caching_info *ci, u64 block, int nr, }if (nr ==0 ) { -mlog (ML_BH_IO ,"No buffers will be read!\n" ); status =0 ; goto bail; }
@@ -261,11 +256,10 @@ int ocfs2_read_blocks(struct ocfs2_caching_info *ci, u64 block, int nr, ignore_cache =1 ; } +trace_ocfs2_read_blocks_bh ((unsigned long long )bh->b_blocknr, + ignore_cache,buffer_jbd (bh),buffer_dirty (bh)); +if (buffer_jbd (bh)) { -if (ignore_cache) -mlog (ML_BH_IO ,"trying to sync read a jbd " -"managed bh (blocknr = %llu)\n" , - (unsigned long long )bh->b_blocknr);continue ; }
@@ -273,9 +267,6 @@ int ocfs2_read_blocks(struct ocfs2_caching_info *ci, u64 block, int nr,if (buffer_dirty (bh)) {/* This should probably be a BUG, or * at least return an error. */ -mlog (ML_BH_IO ,"asking me to sync read a dirty " -"buffer! (blocknr = %llu)\n" , - (unsigned long long )bh->b_blocknr);continue ; }
@@ -368,10 +359,8 @@ int ocfs2_read_blocks(struct ocfs2_caching_info *ci, u64 block, int nr, }ocfs2_metadata_cache_io_unlock (ci); -mlog (ML_BH_IO ,"block=(%llu), nr=(%d), cached=%s, flags=0x%x\n" , - (unsigned long long )block, nr, - ((flags &OCFS2_BH_IGNORE_CACHE ) || ignore_cache) ?"no" :"yes" , - flags); +trace_ocfs2_read_blocks_end ((unsigned long long )block, nr, + flags, ignore_cache); bail:
fs/ocfs2/cluster/masklog.c +0 -1
@@ -93,7 +93,6 @@ static struct mlog_attribute mlog_attrs[MLOG_MAX_BITS] = {define_mask (DLM_RECOVERY ),define_mask (AIO ),define_mask (DLM_GLUE ), -define_mask (BH_IO ),define_mask (UPTODATE ),define_mask (VOTE ), define_mask(CONN),
fs/ocfs2/cluster/masklog.h +0 -1
@@ -95,7 +95,6 @@#define ML_DLM_RECOVERY 0x0000000000001000ULL/* dlm master functions */ #define ML_AIO 0x0000000000002000ULL/* ocfs2 aio read and write */ #define ML_DLM_GLUE 0x0000000000080000ULL/* ocfs2 dlm glue layer */ -#define ML_BH_IO 0x0000000000100000ULL/* ocfs2 buffer I/O */ #define ML_UPTODATE 0x0000000000200000ULL/* ocfs2 caching sequence #'s */ #define ML_VOTE 0x0000000001000000ULL/* ocfs2 node messaging */ #define ML_CONN 0x0000000004000000ULL/* net connection management */
fs/ocfs2/ocfs2_trace.h +76 -0
82 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH 32/34 ocfs2: Remove masklog ML_UPTODATE.
In reply to Tao MaFrom: Tao Ma <[email protected]>
Remove mlog(0,...) and mlog(ML_UPTODATE,...) from fs/ocfs2/uptodate.c and fs/ocfs2/buffer_head_io.c.
The masklog UPTODATE is removed finally.
--- fs/ocfs2/buffer_head_io.c | 3 +- fs/ocfs2/cluster/masklog.c | 1 - fs/ocfs2/cluster/masklog.h | 1 - fs/ocfs2/ocfs2_trace.h | 116 ++++++++++++++++++++++++++++++++++++++++++++ fs/ocfs2/uptodate.c | 73 ++++++++++++++-------------- 5 files changed, 153 insertions(+), 41 deletions(-)
fs/ocfs2/buffer_head_io.c +1 -2
@@ -247,8 +247,7 @@ int ocfs2_read_blocks(struct ocfs2_caching_info *ci, u64 block, int nr,*/ if (!ignore_cache && !ocfs2_buffer_uptodate (ci, bh)) { -mlog (ML_UPTODATE , -"bh (%llu), owner %llu not uptodate\n" , +trace_ocfs2_read_blocks_from_disk ( (unsigned long long )bh->b_blocknr, (unsigned long long )ocfs2_metadata_cache_owner (ci));/* We're using ignore_cache here to say
fs/ocfs2/cluster/masklog.c +0 -1
@@ -93,7 +93,6 @@ static struct mlog_attribute mlog_attrs[MLOG_MAX_BITS] = {define_mask (DLM_RECOVERY ),define_mask (AIO ),define_mask (DLM_GLUE ), -define_mask (UPTODATE ),define_mask (VOTE ),define_mask (CONN ), define_mask(QUORUM),
fs/ocfs2/cluster/masklog.h +0 -1
@@ -95,7 +95,6 @@#define ML_DLM_RECOVERY 0x0000000000001000ULL/* dlm master functions */ #define ML_AIO 0x0000000000002000ULL/* ocfs2 aio read and write */ #define ML_DLM_GLUE 0x0000000000080000ULL/* ocfs2 dlm glue layer */ -#define ML_UPTODATE 0x0000000000200000ULL/* ocfs2 caching sequence #'s */ #define ML_VOTE 0x0000000001000000ULL/* ocfs2 node messaging */ #define ML_CONN 0x0000000004000000ULL/* net connection management */ #define ML_QUORUM 0x0000000008000000ULL/* net connection quorum */
fs/ocfs2/ocfs2_trace.h +116 -0
128 lines not on this page · raw message
fs/ocfs2/uptodate.c +36 -37
169 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH 33/34 ocfs2: Remove masklog ML_AIO.
In reply to Tao MaFrom: Tao Ma <[email protected]>
There is no user for masklog AIO, so remove it.
--- fs/ocfs2/cluster/masklog.c | 1 - fs/ocfs2/cluster/masklog.h | 1 - 2 files changed, 0 insertions(+), 2 deletions(-)
fs/ocfs2/cluster/masklog.c +0 -1
@@ -91,7 +91,6 @@ static struct mlog_attribute mlog_attrs[MLOG_MAX_BITS] = {define_mask (DLM_THREAD ),define_mask (DLM_MASTER ),define_mask (DLM_RECOVERY ), -define_mask (AIO ),define_mask (DLM_GLUE ),define_mask (VOTE ), define_mask(CONN),
fs/ocfs2/cluster/masklog.h +0 -1
@@ -93,7 +93,6 @@#define ML_DLM_THREAD 0x0000000000000400ULL/* dlm domain thread */ #define ML_DLM_MASTER 0x0000000000000800ULL/* dlm master functions */ #define ML_DLM_RECOVERY 0x0000000000001000ULL/* dlm master functions */ -#define ML_AIO 0x0000000000002000ULL/* ocfs2 aio read and write */ #define ML_DLM_GLUE 0x0000000000080000ULL/* ocfs2 dlm glue layer */ #define ML_VOTE 0x0000000001000000ULL/* ocfs2 node messaging */ #define ML_CONN 0x0000000004000000ULL/* net connection management */
Signature · 1 line
1.7.0.4
PATCH 34/34 ocfs2: Make the left masklogs compat.
In reply to Tao MaFrom: Tao Ma <[email protected]>
Since we have removed almost all of the masklogs in fs/ocfs2/*, make the left masklogs compat.
--- fs/ocfs2/cluster/masklog.h | 40 ++++++++++++++++++++-------------------- 1 files changed, 20 insertions(+), 20 deletions(-)
fs/ocfs2/cluster/masklog.h +20 -20
@@ -82,27 +82,27 @@/* 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_TCP 0x0000000000000004ULL/* net cluster/tcp.c */ -#define ML_MSG 0x0000000000000008ULL/* net network messages */ -#define ML_SOCKET 0x0000000000000010ULL/* net socket lifetime */ -#define ML_HEARTBEAT 0x0000000000000020ULL/* hb all heartbeat tracking */ -#define ML_HB_BIO 0x0000000000000040ULL/* hb io tracing */ -#define ML_DLMFS 0x0000000000000080ULL/* dlm user dlmfs */ -#define ML_DLM 0x0000000000000100ULL/* dlm general debugging */ -#define ML_DLM_DOMAIN 0x0000000000000200ULL/* dlm domain debugging */ -#define ML_DLM_THREAD 0x0000000000000400ULL/* dlm domain thread */ -#define ML_DLM_MASTER 0x0000000000000800ULL/* dlm master functions */ -#define ML_DLM_RECOVERY 0x0000000000001000ULL/* dlm master functions */ -#define ML_DLM_GLUE 0x0000000000080000ULL/* ocfs2 dlm glue layer */ -#define ML_VOTE 0x0000000001000000ULL/* ocfs2 node messaging */ -#define ML_CONN 0x0000000004000000ULL/* net connection management */ -#define ML_QUORUM 0x0000000008000000ULL/* net connection quorum */ -#define ML_BASTS 0x0000001000000000ULL/* dlmglue asts and basts */ +#define ML_TCP 0x0000000000000001ULL/* net cluster/tcp.c */ +#define ML_MSG 0x0000000000000002ULL/* net network messages */ +#define ML_SOCKET 0x0000000000000004ULL/* net socket lifetime */ +#define ML_HEARTBEAT 0x0000000000000008ULL/* hb all heartbeat tracking */ +#define ML_HB_BIO 0x0000000000000010ULL/* hb io tracing */ +#define ML_DLMFS 0x0000000000000020ULL/* dlm user dlmfs */ +#define ML_DLM 0x0000000000000040ULL/* dlm general debugging */ +#define ML_DLM_DOMAIN 0x0000000000000080ULL/* dlm domain debugging */ +#define ML_DLM_THREAD 0x0000000000000100ULL/* dlm domain thread */ +#define ML_DLM_MASTER 0x0000000000000200ULL/* dlm master functions */ +#define ML_DLM_RECOVERY 0x0000000000000400ULL/* dlm master functions */ +#define ML_DLM_GLUE 0x0000000000000800ULL/* ocfs2 dlm glue layer */ +#define ML_VOTE 0x0000000000001000ULL/* ocfs2 node messaging */ +#define ML_CONN 0x0000000000002000ULL/* net connection management */ +#define ML_QUORUM 0x0000000000004000ULL/* net connection quorum */ +#define ML_BASTS 0x0000000000008000ULL/* dlmglue asts and basts */ /* bits that are infrequently given and frequently matched in the high word */ -#define ML_ERROR 0x0000000100000000ULL/* sent to KERN_ERR */ -#define ML_NOTICE 0x0000000200000000ULL/* setn to KERN_NOTICE */ -#define ML_KTHREAD 0x0000000400000000ULL/* kernel thread activity */ -#define ML_CLUSTER 0x0000001000000000ULL/* cluster stack */ +#define ML_ERROR 0x0000000000010000ULL/* sent to KERN_ERR */ +#define ML_NOTICE 0x0000000000020000ULL/* setn to KERN_NOTICE */ +#define ML_KTHREAD 0x0000000000040000ULL/* kernel thread activity */ +#define ML_CLUSTER 0x0000000000080000ULL/* cluster stack */ #define MLOG_INITIAL_AND_MASK (ML_ERROR|ML_NOTICE)#ifndef MLOG_MASK_PREFIX
Signature · 1 line
1.7.0.4
cover OCFS2: Add trace event and replace mlog(0).
In reply to Tao Maforget to say.
you can view from
http://repo.or.cz/w/taoma-kernel.git/shortlog/refs/heads/mlog_replace
and pull fromgit://repo.or.cz/taoma-kernel.git mlog_replace
Regards,
Tao
Quoted 26 lines · Tao Ma
Hi all,
This patch set is my attempt to replace our old debug(mlog) with new trace events.
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.All patches except one(see below) are only mlog related, so they shouldn't affect the normal operations in ocfs2 and they should be easy for review(patch 1-5 were already sent to the mail list around one month ago).
The only one that changes the codes somehow are patch 15, "ocfs2: Little refactoring against
ocfs2_iget", but it looks straightforward.Regards,
Tao_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel at oss.oracle.com
http://oss.oracle.com/mailman/listinfo/ocfs2-devel
cover OCFS2: Add trace event and replace mlog(0).
In reply to Tao MaOh, I suddenly found that I send an older version. So it contains some bugs and I will update them after the review is done.
But it doesn't prevent you guys from review, and please don't run it by now. ;)
Regards,
Tao
Quoted 26 lines · Tao Ma
Hi all,
This patch set is my attempt to replace our old debug(mlog) with new trace events.
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.All patches except one(see below) are only mlog related, so they shouldn't affect the normal operations in ocfs2 and they should be easy for review(patch 1-5 were already sent to the mail list around one month ago).
The only one that changes the codes somehow are patch 15, "ocfs2: Little refactoring against
ocfs2_iget", but it looks straightforward.Regards,
Tao_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel at oss.oracle.com
http://oss.oracle.com/mailman/listinfo/ocfs2-devel
cover OCFS2: Add trace event and replace mlog(0).
In reply to Tao MaQuoted 9 lines · Tao Ma
This patch set is my attempt to replace our old debug(mlog) with new trace events.
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.
Quoted 8 lines
All patches except one(see below) are only mlog related, so they shouldn't affect the normal operations in ocfs2 and they should be easy for review(patch 1-5 were already sent to the mail list around one month ago).
The only one that changes the codes somehow are patch 15, "ocfs2:
Little refactoring againstocfs2_iget", but it looks straightforward.
Tao,
Overall this seems pretty straightforward. There wasn't a lot
of editing of masklog entries; we still have a million tracepoints. I wonder how much memory that will use. Have you checked the space usage of all the sysfs files for all of our tracepoints?
Aside from my comment about marketing terms in patch comments
(hehe), I'm OK with going forward with these patches. I would love the ability to turn specific traces on and off.
Well, one generic comment. It seems a lot of our log messages
have gone from "ocfs2_foo(): Change blah 0x%p to new_blah 0x%p" to "ocfs2_foo(): %p %p". I wonder if that is going to be hard to read.
Joel
Signature · 9 lines
Bram's Law: The easier a piece of software is to write, the worse it's implemented in practice. Joel Becker Senior Development Manager Oracle E-mail: joel.becker at oracle.com Phone: (650) 506-8127
cover OCFS2: Add trace event and replace mlog(0).
Quoted 19 lines · Joel Becker
Quoted 9 lines · Tao Ma
This patch set is my attempt to replace our old debug(mlog) with new trace events.
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.Quoted 8 lines
All patches except one(see below) are only mlog related, so they shouldn't affect the normal operations in ocfs2 and they should be easy for review(patch 1-5 were already sent to the mail list around one month ago).
The only one that changes the codes somehow are patch 15, "ocfs2:
Little refactoring againstocfs2_iget", but it looks straightforward.
Quoted 5 lines
Tao,
Overall this seems pretty straightforward. There wasn't a lot
of editing of masklog entries; we still have a million tracepoints. I wonder how much memory that will use. Have you checked the space usage of all the sysfs files for all of our tracepoints?
Sorry, I don't know how to check the space usage of these files. any tips?
Quoted 3 lines
Aside from my comment about marketing terms in patch comments
(hehe), I'm OK with going forward with these patches. I would love the ability to turn specific traces on and off.
OK, I will regenerate the patches with advices from Christoph and your.
Quoted 3 lines
Well, one generic comment. It seems a lot of our log messages
have gone from "ocfs2_foo(): Change blah 0x%p tonew_blah0x%p" to "ocfs2_foo(): %p %p". I wonder if that is going to be hard to read.
Yeah, I used to think of adding all these descriptive strings to trace buffers, but finally I gave up. The reason is that no matter how we print the message in the trace buffer, we have to go to read the codes and with the codes, everything should be clear enough. ;)
Regards,
Tao
Joel Becker
maintainercover OCFS2: Add trace event and replace mlog(0).
Quoted 6 lines · Tao Ma
Quoted 4 lines · Joel Becker
Overall this seems pretty straightforward. There wasn't a lot
of editing of masklog entries; we still have a million tracepoints. I wonder how much memory that will use. Have you checked the space usage of all the sysfs files for all of our tracepoints?Sorry, I don't know how to check the space usage of these files. any tips?
Just count the number of files and directories added to sysfs.
I believe the files disappear when not open, but the directories I think have inode and dentry structures around permanently..
Quoted 7 lines
Quoted 3 lines
Well, one generic comment. It seems a lot of our log messages
have gone from "ocfs2_foo(): Change blah 0x%p tonew_blah0x%p" to "ocfs2_foo(): %p %p". I wonder if that is going to be hard to read.Yeah, I used to think of adding all these descriptive strings to trace buffers, but finally I gave up. The reason is that no matter how we print the message in the trace buffer, we have to go to read the codes and with the codes, everything should be clear enough. ;)
Ok, we'll give it a shot.
Joel
Signature · 6 lines
"The opposite of a correct statement is a false statement. The
opposite of a profound truth may well be another profound truth."
- Niels Bohr
http://www.jlbec.org/
jlbec at evilplan.orgcover OCFS2: Add trace event and replace mlog(0).
Quoted 11 lines · Joel Becker
Quoted 6 lines · Tao Ma
Quoted 4 lines · Joel Becker
Overall this seems pretty straightforward. There wasn't a lot
of editing of masklog entries; we still have a million tracepoints. I wonder how much memory that will use. Have you checked the space usage of all the sysfs files for all of our tracepoints?Sorry, I don't know how to check the space usage of these files. any tips?
Just count the number of files and directories added to sysfs.
I believe the files disappear when not open, but the directories I think have inode and dentry structures around permanently..
OK, so
#find /sys/kernel/debug/tracing/events/ocfs2 -type d|wc -l give me 319. Every trace event dir has 4 members(enable,filter,format and id). So it contains about 1600(dir+files).
Quoted 10 lines
Quoted 8 lines
Quoted 4 lines
Well, one generic comment. It seems a lot of our log messages
have gone from "ocfs2_foo(): Change blah 0x%p tonew_blah0x%p" to "ocfs2_foo(): %p %p". I wonder if that is going to be hard to read.Yeah, I used to think of adding all these descriptive strings to trace buffers, but finally I gave up. The reason is that no matter how we print the message in the trace buffer, we have to go to read the codes and with the codes, everything should be clear enough. ;)
Ok, we'll give it a shot.
I have rebased my tree with Linus' latest tree and integrated all the comments Christoph and you have prompted.
View:
http://repo.or.cz/w/taoma-kernel.git/shortlog/refs/heads/new_mlog_replace
and pull fromgit://repo.or.cz/taoma-kernel.git new_mlog_replace
Please consider merging it. Thanks.
Regards,
Tao
cover OCFS2: Add trace event and replace mlog(0).
Quoted 4 lines · Tao Ma
#find
/sys/kernel/debug/tracing/events/ocfs2-type d|wc -l give me 319. Every trace event dir has 4members(enable,filter,format and id). So it contains about 1600(dir+files).
That's a lot. ext4 currently has < 40.
I am wondering whether it is wise to treat this as a mlog replacement.
One suggestion would be to not remove all mlogs (other than remove _enter and _exit as they are completely useless). Add trace events one by one. Coarse tracing like ext4 has. Remove only those mlogs.
cover OCFS2: Add trace event and replace mlog(0).
In reply to Tao MaQuoted 9 lines · Tao Ma
Quoted 8 lines · Joel Becker
Quoted 6 lines · Tao Ma
Quoted 4 lines · Joel Becker
Overall this seems pretty straightforward. There wasn't a lot
of editing of masklog entries; we still have a million tracepoints. I wonder how much memory that will use. Have you checked the space usage of all the sysfs files for all of our tracepoints?Sorry, I don't know how to check the space usage of these files. any tips?
Quoted 8 lines
Quoted 3 lines
Just count the number of files and directories added to sysfs.
I believe the files disappear when not open, but the directories I think have inode and dentry structures around permanently..OK, so
#find/sys/kernel/debug/tracing/events/ocfs2-type d|wc -l give me 319. Every trace event dir has 4members(enable,filter,format and id). So it contains about 1600(dir+files).
I think what matters to count is dirs, because files disappear
when you're not using them.
If you have 319 trace event directories, that's 319 inodes. On
my x86, a vanilla struct inode is 360 bytes and a dentry is 136 bytes. That's 154K always in RAM for these knobs. I gotta say that I'm not too worried about 154K. On x86_64 (ca-build24) this grows to 241K. I imagine it will double when cluster and dlm are moved to similar trace events.
Are we OK with 300K on x86 and 500K on x86_64 always used up by
these tracing entries?
Joel
Signature · 10 lines
Life's Little Instruction Book #464 "Don't miss the magic of the moment by focusing on what's to come." Joel Becker Senior Development Manager Oracle E-mail: joel.becker at oracle.com Phone: (650) 506-8127
cover OCFS2: Add trace event and replace mlog(0).
Quoted 11 lines · Joel Becker
I think what matters to count is dirs, because files disappear
when you're not using them.
If you have 319 trace event directories, that's 319 inodes. On
my x86, a vanilla struct inode is 360 bytes and a dentry is 136 bytes. That's 154K always in RAM for these knobs. I gotta say that I'm not too worried about 154K. Onx86_64(ca-build24) this grows to 241K. I imagine it will double when cluster and dlm are moved to similar trace events.
Are we OK with 300K on x86 and 500K onx86_64always used up by
these tracing entries?
I'm ok with that.
cover OCFS2: Add trace event and replace mlog(0).
In reply to Joel BeckerQuoted 19 lines · Joel Becker
Quoted 9 lines · Tao Ma
Quoted 8 lines · Joel Becker
Quoted 6 lines · Tao Ma
Quoted 4 lines · Joel Becker
Overall this seems pretty straightforward. There wasn't a lot
of editing of masklog entries; we still have a million tracepoints. I wonder how much memory that will use. Have you checked the space usage of all the sysfs files for all of our tracepoints?Sorry, I don't know how to check the space usage of these files. any tips?
Quoted 8 lines
Quoted 3 lines
Just count the number of files and directories added to sysfs.
I believe the files disappear when not open, but the directories I think have inode and dentry structures around permanently..OK, so
#find/sys/kernel/debug/tracing/events/ocfs2-type d|wc -l give me 319. Every trace event dir has 4members(enable,filter,format and id). So it contains about 1600(dir+files).
Quoted 10 lines
I think what matters to count is dirs, because files disappear
when you're not using them.
If you have 319 trace event directories, that's 319 inodes. On
my x86, a vanilla struct inode is 360 bytes and a dentry is 136 bytes. That's 154K always in RAM for these knobs. I gotta say that I'm not too worried about 154K. Onx86_64(ca-build24) this grows to 241K. I imagine it will double when cluster and dlm are moved to similar trace events.
Are we OK with 300K on x86 and 500K onx86_64always used up by
these tracing entries?
yeah, it isn't much I guess.
And for ext4, yes, it has a small number because they have a very limited debug tracing than us, maybe because they evolved from ext2->ext3->ext4. So the code base is really stable now. And I guess we can remove some of the trace events if we feel that the code is stable enough. ;)
Regards,
Tao
cover OCFS2: Add trace event and replace mlog(0).
In reply to Tao MaI really don't like the way this is split into tons of patches, which makes reviewing what's going on pretty hard. In addition to the preparatiory patch just one patch is more than enough, or if you really want two: one to remove the old mlog code and one to add the trace events.
cover OCFS2: Add trace event and replace mlog(0).
Quoted 5 lines · Christoph Hellwig
I really don't like the way this is split into tons of patches, which makes reviewing what's going on pretty hard. In addition to the preparatiory patch just one patch is more than enough, or if you really want two: one to remove the old mlog code and one to add the trace events.
I have to say, I would have found a single massive patch really
painful to read. The eye glazes over so many repetitive changes. But I've now read it, and we can certainly push it upstream as one commit if you like.
Joel
Signature · 9 lines
Life's Little Instruction Book #497 "Go down swinging." Joel Becker Senior Development Manager Oracle E-mail: joel.becker at oracle.com Phone: (650) 506-8127
cover OCFS2: Add trace event and replace mlog(0).
Quoted 11 lines · Joel Becker
Quoted 5 lines · Christoph Hellwig
I really don't like the way this is split into tons of patches, which makes reviewing what's going on pretty hard. In addition to the preparatiory patch just one patch is more than enough, or if you really want two: one to remove the old mlog code and one to add the trace events.
I have to say, I would have found a single massive patch really
painful to read. The eye glazes over so many repetitive changes. But I've now read it, and we can certainly push it upstream as one commit if you like.
It doesn't matter too much - in the end it's mostly you guys who have to deal with it.
cover OCFS2: Add trace event and replace mlog(0).
In reply to Tao MaHi Joel,
any plan to integrate this patch set for the next merge window?
Regards,
Tao
Quoted 27 lines · Tao Ma
Hi all,
This patch set is my attempt to replace our old debug(mlog) with new trace events.
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.All patches except one(see below) are only mlog related, so they shouldn't affect the normal operations in ocfs2 and they should be easy for review(patch 1-5 were already sent to the mail list around one month ago).
The only one that changes the codes somehow are patch 15, "ocfs2: Little refactoring against
ocfs2_iget", but it looks straightforward.Regards,
Tao_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel at oss.oracle.com
http://oss.oracle.com/mailman/listinfo/ocfs2-devel