aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/suballoc.c
diff options
context:
space:
mode:
authorTao Ma <boyu.mt@taobao.com>2011-03-07 03:43:21 -0500
committerTao Ma <boyu.mt@taobao.com>2011-03-07 03:43:21 -0500
commitc1e8d35ef5ffb393b94a192034b5e3541e005d75 (patch)
treeb9a7f089acd3408c2835a3dfd6aa7bb0407587b3 /fs/ocfs2/suballoc.c
parentef6b689b63b9f5227ccee6f16dd9ee3faf58a464 (diff)
ocfs2: Remove EXIT from masklog.
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 or change it. So: 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. Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Diffstat (limited to 'fs/ocfs2/suballoc.c')
-rw-r--r--fs/ocfs2/suballoc.c54
1 files changed, 36 insertions, 18 deletions
diff --git a/fs/ocfs2/suballoc.c b/fs/ocfs2/suballoc.c
index dd618496c2c6..2d722f1fbaa0 100644
--- a/fs/ocfs2/suballoc.c
+++ b/fs/ocfs2/suballoc.c
@@ -434,7 +434,8 @@ static int ocfs2_block_group_fill(handle_t *handle,
434 * allocation time. */ 434 * allocation time. */
435 435
436bail: 436bail:
437 mlog_exit(status); 437 if (status)
438 mlog_errno(status);
438 return status; 439 return status;
439} 440}
440 441
@@ -792,7 +793,8 @@ bail:
792 793
793 brelse(bg_bh); 794 brelse(bg_bh);
794 795
795 mlog_exit(status); 796 if (status)
797 mlog_errno(status);
796 return status; 798 return status;
797} 799}
798 800
@@ -884,7 +886,8 @@ static int ocfs2_reserve_suballoc_bits(struct ocfs2_super *osb,
884bail: 886bail:
885 brelse(bh); 887 brelse(bh);
886 888
887 mlog_exit(status); 889 if (status)
890 mlog_errno(status);
888 return status; 891 return status;
889} 892}
890 893
@@ -1046,7 +1049,8 @@ bail:
1046 *ac = NULL; 1049 *ac = NULL;
1047 } 1050 }
1048 1051
1049 mlog_exit(status); 1052 if (status)
1053 mlog_errno(status);
1050 return status; 1054 return status;
1051} 1055}
1052 1056
@@ -1146,7 +1150,8 @@ bail:
1146 *ac = NULL; 1150 *ac = NULL;
1147 } 1151 }
1148 1152
1149 mlog_exit(status); 1153 if (status)
1154 mlog_errno(status);
1150 return status; 1155 return status;
1151} 1156}
1152 1157
@@ -1221,7 +1226,8 @@ bail:
1221 *ac = NULL; 1226 *ac = NULL;
1222 } 1227 }
1223 1228
1224 mlog_exit(status); 1229 if (status)
1230 mlog_errno(status);
1225 return status; 1231 return status;
1226} 1232}
1227 1233
@@ -1384,7 +1390,8 @@ static inline int ocfs2_block_group_set_bits(handle_t *handle,
1384 ocfs2_journal_dirty(handle, group_bh); 1390 ocfs2_journal_dirty(handle, group_bh);
1385 1391
1386bail: 1392bail:
1387 mlog_exit(status); 1393 if (status)
1394 mlog_errno(status);
1388 return status; 1395 return status;
1389} 1396}
1390 1397
@@ -1474,7 +1481,8 @@ out_rollback:
1474 prev_bg->bg_next_group = cpu_to_le64(prev_bg_ptr); 1481 prev_bg->bg_next_group = cpu_to_le64(prev_bg_ptr);
1475 } 1482 }
1476 1483
1477 mlog_exit(status); 1484 if (status)
1485 mlog_errno(status);
1478 return status; 1486 return status;
1479} 1487}
1480 1488
@@ -1860,7 +1868,8 @@ bail:
1860 brelse(group_bh); 1868 brelse(group_bh);
1861 brelse(prev_group_bh); 1869 brelse(prev_group_bh);
1862 1870
1863 mlog_exit(status); 1871 if (status)
1872 mlog_errno(status);
1864 return status; 1873 return status;
1865} 1874}
1866 1875
@@ -1972,7 +1981,8 @@ set_hint:
1972 } 1981 }
1973 1982
1974bail: 1983bail:
1975 mlog_exit(status); 1984 if (status)
1985 mlog_errno(status);
1976 return status; 1986 return status;
1977} 1987}
1978 1988
@@ -2009,7 +2019,8 @@ int ocfs2_claim_metadata(handle_t *handle,
2009 *num_bits = res.sr_bits; 2019 *num_bits = res.sr_bits;
2010 status = 0; 2020 status = 0;
2011bail: 2021bail:
2012 mlog_exit(status); 2022 if (status)
2023 mlog_errno(status);
2013 return status; 2024 return status;
2014} 2025}
2015 2026
@@ -2216,7 +2227,8 @@ int ocfs2_claim_new_inode(handle_t *handle,
2216 ocfs2_save_inode_ac_group(dir, ac); 2227 ocfs2_save_inode_ac_group(dir, ac);
2217 status = 0; 2228 status = 0;
2218bail: 2229bail:
2219 mlog_exit(status); 2230 if (status)
2231 mlog_errno(status);
2220 return status; 2232 return status;
2221} 2233}
2222 2234
@@ -2347,7 +2359,8 @@ int __ocfs2_claim_clusters(handle_t *handle,
2347 ac->ac_bits_given += *num_clusters; 2359 ac->ac_bits_given += *num_clusters;
2348 2360
2349bail: 2361bail:
2350 mlog_exit(status); 2362 if (status)
2363 mlog_errno(status);
2351 return status; 2364 return status;
2352} 2365}
2353 2366
@@ -2491,7 +2504,8 @@ static int _ocfs2_free_suballoc_bits(handle_t *handle,
2491bail: 2504bail:
2492 brelse(group_bh); 2505 brelse(group_bh);
2493 2506
2494 mlog_exit(status); 2507 if (status)
2508 mlog_errno(status);
2495 return status; 2509 return status;
2496} 2510}
2497 2511
@@ -2563,7 +2577,8 @@ static int _ocfs2_free_clusters(handle_t *handle,
2563 num_clusters); 2577 num_clusters);
2564 2578
2565out: 2579out:
2566 mlog_exit(status); 2580 if (status)
2581 mlog_errno(status);
2567 return status; 2582 return status;
2568} 2583}
2569 2584
@@ -2770,7 +2785,8 @@ static int ocfs2_get_suballoc_slot_bit(struct ocfs2_super *osb, u64 blkno,
2770bail: 2785bail:
2771 brelse(inode_bh); 2786 brelse(inode_bh);
2772 2787
2773 mlog_exit(status); 2788 if (status)
2789 mlog_errno(status);
2774 return status; 2790 return status;
2775} 2791}
2776 2792
@@ -2821,7 +2837,8 @@ static int ocfs2_test_suballoc_bit(struct ocfs2_super *osb,
2821bail: 2837bail:
2822 brelse(group_bh); 2838 brelse(group_bh);
2823 2839
2824 mlog_exit(status); 2840 if (status)
2841 mlog_errno(status);
2825 return status; 2842 return status;
2826} 2843}
2827 2844
@@ -2887,6 +2904,7 @@ int ocfs2_test_inode_bit(struct ocfs2_super *osb, u64 blkno, int *res)
2887 iput(inode_alloc_inode); 2904 iput(inode_alloc_inode);
2888 brelse(alloc_bh); 2905 brelse(alloc_bh);
2889bail: 2906bail:
2890 mlog_exit(status); 2907 if (status)
2908 mlog_errno(status);
2891 return status; 2909 return status;
2892} 2910}