diff options
author | Tao Ma <boyu.mt@taobao.com> | 2011-03-07 03:43:21 -0500 |
---|---|---|
committer | Tao Ma <boyu.mt@taobao.com> | 2011-03-07 03:43:21 -0500 |
commit | c1e8d35ef5ffb393b94a192034b5e3541e005d75 (patch) | |
tree | b9a7f089acd3408c2835a3dfd6aa7bb0407587b3 /fs/ocfs2/localalloc.c | |
parent | ef6b689b63b9f5227ccee6f16dd9ee3faf58a464 (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/localalloc.c')
-rw-r--r-- | fs/ocfs2/localalloc.c | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c index 5f08c703f354..36636e1c84e7 100644 --- a/fs/ocfs2/localalloc.c +++ b/fs/ocfs2/localalloc.c | |||
@@ -364,7 +364,8 @@ bail: | |||
364 | 364 | ||
365 | mlog(0, "Local alloc window bits = %d\n", osb->local_alloc_bits); | 365 | mlog(0, "Local alloc window bits = %d\n", osb->local_alloc_bits); |
366 | 366 | ||
367 | mlog_exit(status); | 367 | if (status) |
368 | mlog_errno(status); | ||
368 | return status; | 369 | return status; |
369 | } | 370 | } |
370 | 371 | ||
@@ -478,8 +479,6 @@ out: | |||
478 | 479 | ||
479 | if (alloc_copy) | 480 | if (alloc_copy) |
480 | kfree(alloc_copy); | 481 | kfree(alloc_copy); |
481 | |||
482 | mlog_exit_void(); | ||
483 | } | 482 | } |
484 | 483 | ||
485 | /* | 484 | /* |
@@ -548,7 +547,8 @@ bail: | |||
548 | iput(inode); | 547 | iput(inode); |
549 | } | 548 | } |
550 | 549 | ||
551 | mlog_exit(status); | 550 | if (status) |
551 | mlog_errno(status); | ||
552 | return status; | 552 | return status; |
553 | } | 553 | } |
554 | 554 | ||
@@ -614,7 +614,8 @@ out_mutex: | |||
614 | out: | 614 | out: |
615 | if (!status) | 615 | if (!status) |
616 | ocfs2_init_steal_slots(osb); | 616 | ocfs2_init_steal_slots(osb); |
617 | mlog_exit(status); | 617 | if (status) |
618 | mlog_errno(status); | ||
618 | return status; | 619 | return status; |
619 | } | 620 | } |
620 | 621 | ||
@@ -724,7 +725,8 @@ bail: | |||
724 | mlog(0, "bits=%d, slot=%d, ret=%d\n", bits_wanted, osb->slot_num, | 725 | mlog(0, "bits=%d, slot=%d, ret=%d\n", bits_wanted, osb->slot_num, |
725 | status); | 726 | status); |
726 | 727 | ||
727 | mlog_exit(status); | 728 | if (status) |
729 | mlog_errno(status); | ||
728 | return status; | 730 | return status; |
729 | } | 731 | } |
730 | 732 | ||
@@ -779,7 +781,8 @@ int ocfs2_claim_local_alloc_bits(struct ocfs2_super *osb, | |||
779 | ocfs2_journal_dirty(handle, osb->local_alloc_bh); | 781 | ocfs2_journal_dirty(handle, osb->local_alloc_bh); |
780 | 782 | ||
781 | bail: | 783 | bail: |
782 | mlog_exit(status); | 784 | if (status) |
785 | mlog_errno(status); | ||
783 | return status; | 786 | return status; |
784 | } | 787 | } |
785 | 788 | ||
@@ -794,7 +797,7 @@ static u32 ocfs2_local_alloc_count_bits(struct ocfs2_dinode *alloc) | |||
794 | for (i = 0; i < le16_to_cpu(la->la_size); i++) | 797 | for (i = 0; i < le16_to_cpu(la->la_size); i++) |
795 | count += hweight8(buffer[i]); | 798 | count += hweight8(buffer[i]); |
796 | 799 | ||
797 | mlog_exit(count); | 800 | mlog(0, "count %u\n", count); |
798 | return count; | 801 | return count; |
799 | } | 802 | } |
800 | 803 | ||
@@ -884,7 +887,7 @@ bail: | |||
884 | if (local_resv) | 887 | if (local_resv) |
885 | ocfs2_resv_discard(resmap, resv); | 888 | ocfs2_resv_discard(resmap, resv); |
886 | 889 | ||
887 | mlog_exit(bitoff); | 890 | mlog(0, "bitoff %d\n", bitoff); |
888 | return bitoff; | 891 | return bitoff; |
889 | } | 892 | } |
890 | 893 | ||
@@ -898,8 +901,6 @@ static void ocfs2_clear_local_alloc(struct ocfs2_dinode *alloc) | |||
898 | la->la_bm_off = 0; | 901 | la->la_bm_off = 0; |
899 | for(i = 0; i < le16_to_cpu(la->la_size); i++) | 902 | for(i = 0; i < le16_to_cpu(la->la_size); i++) |
900 | la->la_bitmap[i] = 0; | 903 | la->la_bitmap[i] = 0; |
901 | |||
902 | mlog_exit_void(); | ||
903 | } | 904 | } |
904 | 905 | ||
905 | #if 0 | 906 | #if 0 |
@@ -995,7 +996,8 @@ static int ocfs2_sync_local_to_main(struct ocfs2_super *osb, | |||
995 | } | 996 | } |
996 | 997 | ||
997 | bail: | 998 | bail: |
998 | mlog_exit(status); | 999 | if (status) |
1000 | mlog_errno(status); | ||
999 | return status; | 1001 | return status; |
1000 | } | 1002 | } |
1001 | 1003 | ||
@@ -1120,7 +1122,8 @@ bail: | |||
1120 | *ac = NULL; | 1122 | *ac = NULL; |
1121 | } | 1123 | } |
1122 | 1124 | ||
1123 | mlog_exit(status); | 1125 | if (status) |
1126 | mlog_errno(status); | ||
1124 | return status; | 1127 | return status; |
1125 | } | 1128 | } |
1126 | 1129 | ||
@@ -1212,7 +1215,8 @@ retry_enospc: | |||
1212 | mlog(0, "window bits = %u\n", le32_to_cpu(alloc->id1.bitmap1.i_total)); | 1215 | mlog(0, "window bits = %u\n", le32_to_cpu(alloc->id1.bitmap1.i_total)); |
1213 | 1216 | ||
1214 | bail: | 1217 | bail: |
1215 | mlog_exit(status); | 1218 | if (status) |
1219 | mlog_errno(status); | ||
1216 | return status; | 1220 | return status; |
1217 | } | 1221 | } |
1218 | 1222 | ||
@@ -1308,7 +1312,8 @@ bail: | |||
1308 | if (ac) | 1312 | if (ac) |
1309 | ocfs2_free_alloc_context(ac); | 1313 | ocfs2_free_alloc_context(ac); |
1310 | 1314 | ||
1311 | mlog_exit(status); | 1315 | if (status) |
1316 | mlog_errno(status); | ||
1312 | return status; | 1317 | return status; |
1313 | } | 1318 | } |
1314 | 1319 | ||