aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/localalloc.c
diff options
context:
space:
mode:
authorTao Ma <boyu.mt@taobao.com>2011-02-20 22:10:44 -0500
committerTao Ma <boyu.mt@taobao.com>2011-02-20 22:10:44 -0500
commitef6b689b63b9f5227ccee6f16dd9ee3faf58a464 (patch)
treeebe3416fcc221e152f2625e8e8794e92e3d8c979 /fs/ocfs2/localalloc.c
parent422e6c4bc4b48c15b3cb57a1ca71431abfc57e54 (diff)
ocfs2: Remove ENTRY from masklog.
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. Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Diffstat (limited to 'fs/ocfs2/localalloc.c')
-rw-r--r--fs/ocfs2/localalloc.c26
1 files changed, 5 insertions, 21 deletions
diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c
index ec6adbf8f551..5f08c703f354 100644
--- a/fs/ocfs2/localalloc.c
+++ b/fs/ocfs2/localalloc.c
@@ -291,8 +291,6 @@ int ocfs2_load_local_alloc(struct ocfs2_super *osb)
291 struct inode *inode = NULL; 291 struct inode *inode = NULL;
292 struct ocfs2_local_alloc *la; 292 struct ocfs2_local_alloc *la;
293 293
294 mlog_entry_void();
295
296 if (osb->local_alloc_bits == 0) 294 if (osb->local_alloc_bits == 0)
297 goto bail; 295 goto bail;
298 296
@@ -388,8 +386,6 @@ void ocfs2_shutdown_local_alloc(struct ocfs2_super *osb)
388 struct ocfs2_dinode *alloc_copy = NULL; 386 struct ocfs2_dinode *alloc_copy = NULL;
389 struct ocfs2_dinode *alloc = NULL; 387 struct ocfs2_dinode *alloc = NULL;
390 388
391 mlog_entry_void();
392
393 cancel_delayed_work(&osb->la_enable_wq); 389 cancel_delayed_work(&osb->la_enable_wq);
394 flush_workqueue(ocfs2_wq); 390 flush_workqueue(ocfs2_wq);
395 391
@@ -502,7 +498,7 @@ int ocfs2_begin_local_alloc_recovery(struct ocfs2_super *osb,
502 struct inode *inode = NULL; 498 struct inode *inode = NULL;
503 struct ocfs2_dinode *alloc; 499 struct ocfs2_dinode *alloc;
504 500
505 mlog_entry("(slot_num = %d)\n", slot_num); 501 mlog(0, "(slot_num = %d)\n", slot_num);
506 502
507 *alloc_copy = NULL; 503 *alloc_copy = NULL;
508 504
@@ -570,8 +566,6 @@ int ocfs2_complete_local_alloc_recovery(struct ocfs2_super *osb,
570 struct buffer_head *main_bm_bh = NULL; 566 struct buffer_head *main_bm_bh = NULL;
571 struct inode *main_bm_inode; 567 struct inode *main_bm_inode;
572 568
573 mlog_entry_void();
574
575 main_bm_inode = ocfs2_get_system_file_inode(osb, 569 main_bm_inode = ocfs2_get_system_file_inode(osb,
576 GLOBAL_BITMAP_SYSTEM_INODE, 570 GLOBAL_BITMAP_SYSTEM_INODE,
577 OCFS2_INVALID_SLOT); 571 OCFS2_INVALID_SLOT);
@@ -640,8 +634,6 @@ int ocfs2_reserve_local_alloc_bits(struct ocfs2_super *osb,
640 struct inode *local_alloc_inode; 634 struct inode *local_alloc_inode;
641 unsigned int free_bits; 635 unsigned int free_bits;
642 636
643 mlog_entry_void();
644
645 BUG_ON(!ac); 637 BUG_ON(!ac);
646 638
647 local_alloc_inode = 639 local_alloc_inode =
@@ -749,7 +741,6 @@ int ocfs2_claim_local_alloc_bits(struct ocfs2_super *osb,
749 struct ocfs2_dinode *alloc; 741 struct ocfs2_dinode *alloc;
750 struct ocfs2_local_alloc *la; 742 struct ocfs2_local_alloc *la;
751 743
752 mlog_entry_void();
753 BUG_ON(ac->ac_which != OCFS2_AC_USE_LOCAL); 744 BUG_ON(ac->ac_which != OCFS2_AC_USE_LOCAL);
754 745
755 local_alloc_inode = ac->ac_inode; 746 local_alloc_inode = ac->ac_inode;
@@ -799,8 +790,6 @@ static u32 ocfs2_local_alloc_count_bits(struct ocfs2_dinode *alloc)
799 u32 count = 0; 790 u32 count = 0;
800 struct ocfs2_local_alloc *la = OCFS2_LOCAL_ALLOC(alloc); 791 struct ocfs2_local_alloc *la = OCFS2_LOCAL_ALLOC(alloc);
801 792
802 mlog_entry_void();
803
804 buffer = la->la_bitmap; 793 buffer = la->la_bitmap;
805 for (i = 0; i < le16_to_cpu(la->la_size); i++) 794 for (i = 0; i < le16_to_cpu(la->la_size); i++)
806 count += hweight8(buffer[i]); 795 count += hweight8(buffer[i]);
@@ -820,7 +809,7 @@ static int ocfs2_local_alloc_find_clear_bits(struct ocfs2_super *osb,
820 void *bitmap = NULL; 809 void *bitmap = NULL;
821 struct ocfs2_reservation_map *resmap = &osb->osb_la_resmap; 810 struct ocfs2_reservation_map *resmap = &osb->osb_la_resmap;
822 811
823 mlog_entry("(numbits wanted = %u)\n", *numbits); 812 mlog(0, "(numbits wanted = %u)\n", *numbits);
824 813
825 if (!alloc->id1.bitmap1.i_total) { 814 if (!alloc->id1.bitmap1.i_total) {
826 mlog(0, "No bits in my window!\n"); 815 mlog(0, "No bits in my window!\n");
@@ -903,7 +892,6 @@ static void ocfs2_clear_local_alloc(struct ocfs2_dinode *alloc)
903{ 892{
904 struct ocfs2_local_alloc *la = OCFS2_LOCAL_ALLOC(alloc); 893 struct ocfs2_local_alloc *la = OCFS2_LOCAL_ALLOC(alloc);
905 int i; 894 int i;
906 mlog_entry_void();
907 895
908 alloc->id1.bitmap1.i_total = 0; 896 alloc->id1.bitmap1.i_total = 0;
909 alloc->id1.bitmap1.i_used = 0; 897 alloc->id1.bitmap1.i_used = 0;
@@ -952,9 +940,9 @@ static int ocfs2_sync_local_to_main(struct ocfs2_super *osb,
952 void *bitmap; 940 void *bitmap;
953 struct ocfs2_local_alloc *la = OCFS2_LOCAL_ALLOC(alloc); 941 struct ocfs2_local_alloc *la = OCFS2_LOCAL_ALLOC(alloc);
954 942
955 mlog_entry("total = %u, used = %u\n", 943 mlog(0, "total = %u, used = %u\n",
956 le32_to_cpu(alloc->id1.bitmap1.i_total), 944 le32_to_cpu(alloc->id1.bitmap1.i_total),
957 le32_to_cpu(alloc->id1.bitmap1.i_used)); 945 le32_to_cpu(alloc->id1.bitmap1.i_used));
958 946
959 if (!alloc->id1.bitmap1.i_total) { 947 if (!alloc->id1.bitmap1.i_total) {
960 mlog(0, "nothing to sync!\n"); 948 mlog(0, "nothing to sync!\n");
@@ -1148,8 +1136,6 @@ static int ocfs2_local_alloc_new_window(struct ocfs2_super *osb,
1148 struct ocfs2_dinode *alloc = NULL; 1136 struct ocfs2_dinode *alloc = NULL;
1149 struct ocfs2_local_alloc *la; 1137 struct ocfs2_local_alloc *la;
1150 1138
1151 mlog_entry_void();
1152
1153 alloc = (struct ocfs2_dinode *) osb->local_alloc_bh->b_data; 1139 alloc = (struct ocfs2_dinode *) osb->local_alloc_bh->b_data;
1154 la = OCFS2_LOCAL_ALLOC(alloc); 1140 la = OCFS2_LOCAL_ALLOC(alloc);
1155 1141
@@ -1243,8 +1229,6 @@ static int ocfs2_local_alloc_slide_window(struct ocfs2_super *osb,
1243 struct ocfs2_dinode *alloc_copy = NULL; 1229 struct ocfs2_dinode *alloc_copy = NULL;
1244 struct ocfs2_alloc_context *ac = NULL; 1230 struct ocfs2_alloc_context *ac = NULL;
1245 1231
1246 mlog_entry_void();
1247
1248 ocfs2_recalc_la_window(osb, OCFS2_LA_EVENT_SLIDE); 1232 ocfs2_recalc_la_window(osb, OCFS2_LA_EVENT_SLIDE);
1249 1233
1250 /* This will lock the main bitmap for us. */ 1234 /* This will lock the main bitmap for us. */