aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/suballoc.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/suballoc.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/suballoc.c')
-rw-r--r--fs/ocfs2/suballoc.c35
1 files changed, 6 insertions, 29 deletions
diff --git a/fs/ocfs2/suballoc.c b/fs/ocfs2/suballoc.c
index 71998d4d61d5..dd618496c2c6 100644
--- a/fs/ocfs2/suballoc.c
+++ b/fs/ocfs2/suballoc.c
@@ -389,8 +389,6 @@ static int ocfs2_block_group_fill(handle_t *handle,
389 struct ocfs2_group_desc *bg = (struct ocfs2_group_desc *) bg_bh->b_data; 389 struct ocfs2_group_desc *bg = (struct ocfs2_group_desc *) bg_bh->b_data;
390 struct super_block * sb = alloc_inode->i_sb; 390 struct super_block * sb = alloc_inode->i_sb;
391 391
392 mlog_entry_void();
393
394 if (((unsigned long long) bg_bh->b_blocknr) != group_blkno) { 392 if (((unsigned long long) bg_bh->b_blocknr) != group_blkno) {
395 ocfs2_error(alloc_inode->i_sb, "group block (%llu) != " 393 ocfs2_error(alloc_inode->i_sb, "group block (%llu) != "
396 "b_blocknr (%llu)", 394 "b_blocknr (%llu)",
@@ -707,8 +705,6 @@ static int ocfs2_block_group_alloc(struct ocfs2_super *osb,
707 705
708 BUG_ON(ocfs2_is_cluster_bitmap(alloc_inode)); 706 BUG_ON(ocfs2_is_cluster_bitmap(alloc_inode));
709 707
710 mlog_entry_void();
711
712 cl = &fe->id2.i_chain; 708 cl = &fe->id2.i_chain;
713 status = ocfs2_reserve_clusters_with_limit(osb, 709 status = ocfs2_reserve_clusters_with_limit(osb,
714 le16_to_cpu(cl->cl_cpg), 710 le16_to_cpu(cl->cl_cpg),
@@ -814,8 +810,6 @@ static int ocfs2_reserve_suballoc_bits(struct ocfs2_super *osb,
814 struct ocfs2_dinode *fe; 810 struct ocfs2_dinode *fe;
815 u32 free_bits; 811 u32 free_bits;
816 812
817 mlog_entry_void();
818
819 alloc_inode = ocfs2_get_system_file_inode(osb, type, slot); 813 alloc_inode = ocfs2_get_system_file_inode(osb, type, slot);
820 if (!alloc_inode) { 814 if (!alloc_inode) {
821 mlog_errno(-EINVAL); 815 mlog_errno(-EINVAL);
@@ -1189,8 +1183,6 @@ static int ocfs2_reserve_clusters_with_limit(struct ocfs2_super *osb,
1189{ 1183{
1190 int status; 1184 int status;
1191 1185
1192 mlog_entry_void();
1193
1194 *ac = kzalloc(sizeof(struct ocfs2_alloc_context), GFP_KERNEL); 1186 *ac = kzalloc(sizeof(struct ocfs2_alloc_context), GFP_KERNEL);
1195 if (!(*ac)) { 1187 if (!(*ac)) {
1196 status = -ENOMEM; 1188 status = -ENOMEM;
@@ -1357,8 +1349,6 @@ static inline int ocfs2_block_group_set_bits(handle_t *handle,
1357 void *bitmap = bg->bg_bitmap; 1349 void *bitmap = bg->bg_bitmap;
1358 int journal_type = OCFS2_JOURNAL_ACCESS_WRITE; 1350 int journal_type = OCFS2_JOURNAL_ACCESS_WRITE;
1359 1351
1360 mlog_entry_void();
1361
1362 /* All callers get the descriptor via 1352 /* All callers get the descriptor via
1363 * ocfs2_read_group_descriptor(). Any corruption is a code bug. */ 1353 * ocfs2_read_group_descriptor(). Any corruption is a code bug. */
1364 BUG_ON(!OCFS2_IS_VALID_GROUP_DESC(bg)); 1354 BUG_ON(!OCFS2_IS_VALID_GROUP_DESC(bg));
@@ -1888,8 +1878,6 @@ static int ocfs2_claim_suballoc_bits(struct ocfs2_alloc_context *ac,
1888 struct ocfs2_chain_list *cl; 1878 struct ocfs2_chain_list *cl;
1889 struct ocfs2_dinode *fe; 1879 struct ocfs2_dinode *fe;
1890 1880
1891 mlog_entry_void();
1892
1893 BUG_ON(ac->ac_bits_given >= ac->ac_bits_wanted); 1881 BUG_ON(ac->ac_bits_given >= ac->ac_bits_wanted);
1894 BUG_ON(bits_wanted > (ac->ac_bits_wanted - ac->ac_bits_given)); 1882 BUG_ON(bits_wanted > (ac->ac_bits_wanted - ac->ac_bits_given));
1895 BUG_ON(!ac->ac_bh); 1883 BUG_ON(!ac->ac_bh);
@@ -2201,8 +2189,6 @@ int ocfs2_claim_new_inode(handle_t *handle,
2201 int status; 2189 int status;
2202 struct ocfs2_suballoc_result res; 2190 struct ocfs2_suballoc_result res;
2203 2191
2204 mlog_entry_void();
2205
2206 BUG_ON(!ac); 2192 BUG_ON(!ac);
2207 BUG_ON(ac->ac_bits_given != 0); 2193 BUG_ON(ac->ac_bits_given != 0);
2208 BUG_ON(ac->ac_bits_wanted != 1); 2194 BUG_ON(ac->ac_bits_wanted != 1);
@@ -2307,8 +2293,6 @@ int __ocfs2_claim_clusters(handle_t *handle,
2307 struct ocfs2_suballoc_result res = { .sr_blkno = 0, }; 2293 struct ocfs2_suballoc_result res = { .sr_blkno = 0, };
2308 struct ocfs2_super *osb = OCFS2_SB(ac->ac_inode->i_sb); 2294 struct ocfs2_super *osb = OCFS2_SB(ac->ac_inode->i_sb);
2309 2295
2310 mlog_entry_void();
2311
2312 BUG_ON(ac->ac_bits_given >= ac->ac_bits_wanted); 2296 BUG_ON(ac->ac_bits_given >= ac->ac_bits_wanted);
2313 2297
2314 BUG_ON(ac->ac_which != OCFS2_AC_USE_LOCAL 2298 BUG_ON(ac->ac_which != OCFS2_AC_USE_LOCAL
@@ -2392,8 +2376,6 @@ static int ocfs2_block_group_clear_bits(handle_t *handle,
2392 unsigned int tmp; 2376 unsigned int tmp;
2393 struct ocfs2_group_desc *undo_bg = NULL; 2377 struct ocfs2_group_desc *undo_bg = NULL;
2394 2378
2395 mlog_entry_void();
2396
2397 /* The caller got this descriptor from 2379 /* The caller got this descriptor from
2398 * ocfs2_read_group_descriptor(). Any corruption is a code bug. */ 2380 * ocfs2_read_group_descriptor(). Any corruption is a code bug. */
2399 BUG_ON(!OCFS2_IS_VALID_GROUP_DESC(bg)); 2381 BUG_ON(!OCFS2_IS_VALID_GROUP_DESC(bg));
@@ -2463,8 +2445,6 @@ static int _ocfs2_free_suballoc_bits(handle_t *handle,
2463 struct buffer_head *group_bh = NULL; 2445 struct buffer_head *group_bh = NULL;
2464 struct ocfs2_group_desc *group; 2446 struct ocfs2_group_desc *group;
2465 2447
2466 mlog_entry_void();
2467
2468 /* The alloc_bh comes from ocfs2_free_dinode() or 2448 /* The alloc_bh comes from ocfs2_free_dinode() or
2469 * ocfs2_free_clusters(). The callers have all locked the 2449 * ocfs2_free_clusters(). The callers have all locked the
2470 * allocator and gotten alloc_bh from the lock call. This 2450 * allocator and gotten alloc_bh from the lock call. This
@@ -2556,11 +2536,8 @@ static int _ocfs2_free_clusters(handle_t *handle,
2556 2536
2557 /* You can't ever have a contiguous set of clusters 2537 /* You can't ever have a contiguous set of clusters
2558 * bigger than a block group bitmap so we never have to worry 2538 * bigger than a block group bitmap so we never have to worry
2559 * about looping on them. */ 2539 * about looping on them.
2560 2540 * This is expensive. We can safely remove once this stuff has
2561 mlog_entry_void();
2562
2563 /* This is expensive. We can safely remove once this stuff has
2564 * gotten tested really well. */ 2541 * gotten tested really well. */
2565 BUG_ON(start_blk != ocfs2_clusters_to_blocks(bitmap_inode->i_sb, ocfs2_blocks_to_clusters(bitmap_inode->i_sb, start_blk))); 2542 BUG_ON(start_blk != ocfs2_clusters_to_blocks(bitmap_inode->i_sb, ocfs2_blocks_to_clusters(bitmap_inode->i_sb, start_blk)));
2566 2543
@@ -2756,7 +2733,7 @@ static int ocfs2_get_suballoc_slot_bit(struct ocfs2_super *osb, u64 blkno,
2756 struct buffer_head *inode_bh = NULL; 2733 struct buffer_head *inode_bh = NULL;
2757 struct ocfs2_dinode *inode_fe; 2734 struct ocfs2_dinode *inode_fe;
2758 2735
2759 mlog_entry("blkno: %llu\n", (unsigned long long)blkno); 2736 mlog(0, "blkno: %llu\n", (unsigned long long)blkno);
2760 2737
2761 /* dirty read disk */ 2738 /* dirty read disk */
2762 status = ocfs2_read_blocks_sync(osb, blkno, 1, &inode_bh); 2739 status = ocfs2_read_blocks_sync(osb, blkno, 1, &inode_bh);
@@ -2816,8 +2793,8 @@ static int ocfs2_test_suballoc_bit(struct ocfs2_super *osb,
2816 u64 bg_blkno; 2793 u64 bg_blkno;
2817 int status; 2794 int status;
2818 2795
2819 mlog_entry("blkno: %llu bit: %u\n", (unsigned long long)blkno, 2796 mlog(0, "blkno: %llu bit: %u\n", (unsigned long long)blkno,
2820 (unsigned int)bit); 2797 (unsigned int)bit);
2821 2798
2822 alloc_di = (struct ocfs2_dinode *)alloc_bh->b_data; 2799 alloc_di = (struct ocfs2_dinode *)alloc_bh->b_data;
2823 if ((bit + 1) > ocfs2_bits_per_group(&alloc_di->id2.i_chain)) { 2800 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)
2869 struct inode *inode_alloc_inode; 2846 struct inode *inode_alloc_inode;
2870 struct buffer_head *alloc_bh = NULL; 2847 struct buffer_head *alloc_bh = NULL;
2871 2848
2872 mlog_entry("blkno: %llu", (unsigned long long)blkno); 2849 mlog(0, "blkno: %llu", (unsigned long long)blkno);
2873 2850
2874 status = ocfs2_get_suballoc_slot_bit(osb, blkno, &suballoc_slot, 2851 status = ocfs2_get_suballoc_slot_bit(osb, blkno, &suballoc_slot,
2875 &group_blkno, &suballoc_bit); 2852 &group_blkno, &suballoc_bit);