aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/journal.c
diff options
context:
space:
mode:
authorTao Ma <boyu.mt@taobao.com>2011-02-24 01:15:35 -0500
committerTao Ma <boyu.mt@taobao.com>2011-02-24 01:15:35 -0500
commitb41079504c786eb226e7e1e3dc5cc1f37fbd1c2b (patch)
treece449319016d1ddf2a319f3f1a093471043d9a46 /fs/ocfs2/journal.c
parent781f200cb7a657339c8760984870c252701aa485 (diff)
ocfs2: Remove masklog ML_JOURNAL.
Remove mlog(0) from fs/ocfs2/journal.c and the masklog JOURNAL. Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Diffstat (limited to 'fs/ocfs2/journal.c')
-rw-r--r--fs/ocfs2/journal.c130
1 files changed, 54 insertions, 76 deletions
diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c
index 956509167bf5..dcc2d9327150 100644
--- a/fs/ocfs2/journal.c
+++ b/fs/ocfs2/journal.c
@@ -31,7 +31,6 @@
31#include <linux/time.h> 31#include <linux/time.h>
32#include <linux/random.h> 32#include <linux/random.h>
33 33
34#define MLOG_MASK_PREFIX ML_JOURNAL
35#include <cluster/masklog.h> 34#include <cluster/masklog.h>
36 35
37#include "ocfs2.h" 36#include "ocfs2.h"
@@ -52,6 +51,7 @@
52#include "quota.h" 51#include "quota.h"
53 52
54#include "buffer_head_io.h" 53#include "buffer_head_io.h"
54#include "ocfs2_trace.h"
55 55
56DEFINE_SPINLOCK(trans_inc_lock); 56DEFINE_SPINLOCK(trans_inc_lock);
57 57
@@ -308,9 +308,10 @@ static int ocfs2_commit_cache(struct ocfs2_super *osb)
308 /* Flush all pending commits and checkpoint the journal. */ 308 /* Flush all pending commits and checkpoint the journal. */
309 down_write(&journal->j_trans_barrier); 309 down_write(&journal->j_trans_barrier);
310 310
311 if (atomic_read(&journal->j_num_trans) == 0) { 311 flushed = atomic_read(&journal->j_num_trans);
312 trace_ocfs2_commit_cache_begin(flushed);
313 if (flushed == 0) {
312 up_write(&journal->j_trans_barrier); 314 up_write(&journal->j_trans_barrier);
313 mlog(0, "No transactions for me to flush!\n");
314 goto finally; 315 goto finally;
315 } 316 }
316 317
@@ -329,8 +330,7 @@ static int ocfs2_commit_cache(struct ocfs2_super *osb)
329 atomic_set(&journal->j_num_trans, 0); 330 atomic_set(&journal->j_num_trans, 0);
330 up_write(&journal->j_trans_barrier); 331 up_write(&journal->j_trans_barrier);
331 332
332 mlog(0, "commit_thread: flushed transaction %lu (%u handles)\n", 333 trace_ocfs2_commit_cache_end(journal->j_trans_id, flushed);
333 journal->j_trans_id, flushed);
334 334
335 ocfs2_wake_downconvert_thread(osb); 335 ocfs2_wake_downconvert_thread(osb);
336 wake_up(&journal->j_checkpointed); 336 wake_up(&journal->j_checkpointed);
@@ -423,7 +423,7 @@ int ocfs2_extend_trans(handle_t *handle, int nblocks)
423 423
424 old_nblocks = handle->h_buffer_credits; 424 old_nblocks = handle->h_buffer_credits;
425 425
426 mlog(0, "Trying to extend transaction by %d blocks\n", nblocks); 426 trace_ocfs2_extend_trans(old_nblocks, nblocks);
427 427
428#ifdef CONFIG_OCFS2_DEBUG_FS 428#ifdef CONFIG_OCFS2_DEBUG_FS
429 status = 1; 429 status = 1;
@@ -436,9 +436,7 @@ int ocfs2_extend_trans(handle_t *handle, int nblocks)
436#endif 436#endif
437 437
438 if (status > 0) { 438 if (status > 0) {
439 mlog(0, 439 trace_ocfs2_extend_trans_restart(old_nblocks + nblocks);
440 "jbd2_journal_extend failed, trying "
441 "jbd2_journal_restart\n");
442 status = jbd2_journal_restart(handle, 440 status = jbd2_journal_restart(handle,
443 old_nblocks + nblocks); 441 old_nblocks + nblocks);
444 if (status < 0) { 442 if (status < 0) {
@@ -616,12 +614,9 @@ static int __ocfs2_journal_access(handle_t *handle,
616 BUG_ON(!handle); 614 BUG_ON(!handle);
617 BUG_ON(!bh); 615 BUG_ON(!bh);
618 616
619 mlog(0, "bh->b_blocknr=%llu, type=%d (\"%s\"), bh->b_size = %zu\n", 617 trace_ocfs2_journal_access(
620 (unsigned long long)bh->b_blocknr, type, 618 (unsigned long long)ocfs2_metadata_cache_owner(ci),
621 (type == OCFS2_JOURNAL_ACCESS_CREATE) ? 619 (unsigned long long)bh->b_blocknr, type, bh->b_size);
622 "OCFS2_JOURNAL_ACCESS_CREATE" :
623 "OCFS2_JOURNAL_ACCESS_WRITE",
624 bh->b_size);
625 620
626 /* we can safely remove this assertion after testing. */ 621 /* we can safely remove this assertion after testing. */
627 if (!buffer_uptodate(bh)) { 622 if (!buffer_uptodate(bh)) {
@@ -730,8 +725,7 @@ void ocfs2_journal_dirty(handle_t *handle, struct buffer_head *bh)
730{ 725{
731 int status; 726 int status;
732 727
733 mlog(0, "(bh->b_blocknr=%llu)\n", 728 trace_ocfs2_journal_dirty((unsigned long long)bh->b_blocknr);
734 (unsigned long long)bh->b_blocknr);
735 729
736 status = jbd2_journal_dirty_metadata(handle, bh); 730 status = jbd2_journal_dirty_metadata(handle, bh);
737 BUG_ON(status); 731 BUG_ON(status);
@@ -809,10 +803,9 @@ int ocfs2_journal_init(struct ocfs2_journal *journal, int *dirty)
809 goto done; 803 goto done;
810 } 804 }
811 805
812 mlog(0, "inode->i_size = %lld\n", inode->i_size); 806 trace_ocfs2_journal_init(inode->i_size,
813 mlog(0, "inode->i_blocks = %llu\n", 807 (unsigned long long)inode->i_blocks,
814 (unsigned long long)inode->i_blocks); 808 OCFS2_I(inode)->ip_clusters);
815 mlog(0, "inode->ip_clusters = %u\n", OCFS2_I(inode)->ip_clusters);
816 809
817 /* call the kernels journal init function now */ 810 /* call the kernels journal init function now */
818 j_journal = jbd2_journal_init_inode(inode); 811 j_journal = jbd2_journal_init_inode(inode);
@@ -822,8 +815,7 @@ int ocfs2_journal_init(struct ocfs2_journal *journal, int *dirty)
822 goto done; 815 goto done;
823 } 816 }
824 817
825 mlog(0, "Returned from jbd2_journal_init_inode\n"); 818 trace_ocfs2_journal_init_maxlen(j_journal->j_maxlen);
826 mlog(0, "j_journal->j_maxlen = %u\n", j_journal->j_maxlen);
827 819
828 *dirty = (le32_to_cpu(di->id1.journal1.ij_flags) & 820 *dirty = (le32_to_cpu(di->id1.journal1.ij_flags) &
829 OCFS2_JOURNAL_DIRTY_FL); 821 OCFS2_JOURNAL_DIRTY_FL);
@@ -922,10 +914,7 @@ void ocfs2_journal_shutdown(struct ocfs2_super *osb)
922 BUG(); 914 BUG();
923 915
924 num_running_trans = atomic_read(&(osb->journal->j_num_trans)); 916 num_running_trans = atomic_read(&(osb->journal->j_num_trans));
925 if (num_running_trans > 0) 917 trace_ocfs2_journal_shutdown(num_running_trans);
926 mlog(0, "Shutting down journal: must wait on %d "
927 "running transactions!\n",
928 num_running_trans);
929 918
930 /* Do a commit_cache here. It will flush our journal, *and* 919 /* Do a commit_cache here. It will flush our journal, *and*
931 * release any locks that are still held. 920 * release any locks that are still held.
@@ -938,7 +927,7 @@ void ocfs2_journal_shutdown(struct ocfs2_super *osb)
938 * completely destroy the journal. */ 927 * completely destroy the journal. */
939 if (osb->commit_task) { 928 if (osb->commit_task) {
940 /* Wait for the commit thread */ 929 /* Wait for the commit thread */
941 mlog(0, "Waiting for ocfs2commit to exit....\n"); 930 trace_ocfs2_journal_shutdown_wait(osb->commit_task);
942 kthread_stop(osb->commit_task); 931 kthread_stop(osb->commit_task);
943 osb->commit_task = NULL; 932 osb->commit_task = NULL;
944 } 933 }
@@ -1158,7 +1147,7 @@ struct ocfs2_la_recovery_item {
1158 */ 1147 */
1159void ocfs2_complete_recovery(struct work_struct *work) 1148void ocfs2_complete_recovery(struct work_struct *work)
1160{ 1149{
1161 int ret; 1150 int ret = 0;
1162 struct ocfs2_journal *journal = 1151 struct ocfs2_journal *journal =
1163 container_of(work, struct ocfs2_journal, j_recovery_work); 1152 container_of(work, struct ocfs2_journal, j_recovery_work);
1164 struct ocfs2_super *osb = journal->j_osb; 1153 struct ocfs2_super *osb = journal->j_osb;
@@ -1167,7 +1156,8 @@ void ocfs2_complete_recovery(struct work_struct *work)
1167 struct ocfs2_quota_recovery *qrec; 1156 struct ocfs2_quota_recovery *qrec;
1168 LIST_HEAD(tmp_la_list); 1157 LIST_HEAD(tmp_la_list);
1169 1158
1170 mlog(0, "completing recovery from keventd\n"); 1159 trace_ocfs2_complete_recovery(
1160 (unsigned long long)OCFS2_I(journal->j_inode)->ip_blkno);
1171 1161
1172 spin_lock(&journal->j_lock); 1162 spin_lock(&journal->j_lock);
1173 list_splice_init(&journal->j_la_cleanups, &tmp_la_list); 1163 list_splice_init(&journal->j_la_cleanups, &tmp_la_list);
@@ -1176,15 +1166,18 @@ void ocfs2_complete_recovery(struct work_struct *work)
1176 list_for_each_entry_safe(item, n, &tmp_la_list, lri_list) { 1166 list_for_each_entry_safe(item, n, &tmp_la_list, lri_list) {
1177 list_del_init(&item->lri_list); 1167 list_del_init(&item->lri_list);
1178 1168
1179 mlog(0, "Complete recovery for slot %d\n", item->lri_slot);
1180
1181 ocfs2_wait_on_quotas(osb); 1169 ocfs2_wait_on_quotas(osb);
1182 1170
1183 la_dinode = item->lri_la_dinode; 1171 la_dinode = item->lri_la_dinode;
1184 if (la_dinode) { 1172 tl_dinode = item->lri_tl_dinode;
1185 mlog(0, "Clean up local alloc %llu\n", 1173 qrec = item->lri_qrec;
1186 (unsigned long long)le64_to_cpu(la_dinode->i_blkno));
1187 1174
1175 trace_ocfs2_complete_recovery_slot(item->lri_slot,
1176 la_dinode ? le64_to_cpu(la_dinode->i_blkno) : 0,
1177 tl_dinode ? le64_to_cpu(tl_dinode->i_blkno) : 0,
1178 qrec);
1179
1180 if (la_dinode) {
1188 ret = ocfs2_complete_local_alloc_recovery(osb, 1181 ret = ocfs2_complete_local_alloc_recovery(osb,
1189 la_dinode); 1182 la_dinode);
1190 if (ret < 0) 1183 if (ret < 0)
@@ -1193,11 +1186,7 @@ void ocfs2_complete_recovery(struct work_struct *work)
1193 kfree(la_dinode); 1186 kfree(la_dinode);
1194 } 1187 }
1195 1188
1196 tl_dinode = item->lri_tl_dinode;
1197 if (tl_dinode) { 1189 if (tl_dinode) {
1198 mlog(0, "Clean up truncate log %llu\n",
1199 (unsigned long long)le64_to_cpu(tl_dinode->i_blkno));
1200
1201 ret = ocfs2_complete_truncate_log_recovery(osb, 1190 ret = ocfs2_complete_truncate_log_recovery(osb,
1202 tl_dinode); 1191 tl_dinode);
1203 if (ret < 0) 1192 if (ret < 0)
@@ -1210,9 +1199,7 @@ void ocfs2_complete_recovery(struct work_struct *work)
1210 if (ret < 0) 1199 if (ret < 0)
1211 mlog_errno(ret); 1200 mlog_errno(ret);
1212 1201
1213 qrec = item->lri_qrec;
1214 if (qrec) { 1202 if (qrec) {
1215 mlog(0, "Recovering quota files");
1216 ret = ocfs2_finish_quota_recovery(osb, qrec, 1203 ret = ocfs2_finish_quota_recovery(osb, qrec,
1217 item->lri_slot); 1204 item->lri_slot);
1218 if (ret < 0) 1205 if (ret < 0)
@@ -1223,7 +1210,7 @@ void ocfs2_complete_recovery(struct work_struct *work)
1223 kfree(item); 1210 kfree(item);
1224 } 1211 }
1225 1212
1226 mlog(0, "Recovery completion\n"); 1213 trace_ocfs2_complete_recovery_end(ret);
1227} 1214}
1228 1215
1229/* NOTE: This function always eats your references to la_dinode and 1216/* NOTE: This function always eats your references to la_dinode and
@@ -1340,15 +1327,12 @@ restart:
1340 * clear it until ocfs2_recover_node() has succeeded. */ 1327 * clear it until ocfs2_recover_node() has succeeded. */
1341 node_num = rm->rm_entries[0]; 1328 node_num = rm->rm_entries[0];
1342 spin_unlock(&osb->osb_lock); 1329 spin_unlock(&osb->osb_lock);
1343 mlog(0, "checking node %d\n", node_num);
1344 slot_num = ocfs2_node_num_to_slot(osb, node_num); 1330 slot_num = ocfs2_node_num_to_slot(osb, node_num);
1331 trace_ocfs2_recovery_thread_node(node_num, slot_num);
1345 if (slot_num == -ENOENT) { 1332 if (slot_num == -ENOENT) {
1346 status = 0; 1333 status = 0;
1347 mlog(0, "no slot for this node, so no recovery"
1348 "required.\n");
1349 goto skip_recovery; 1334 goto skip_recovery;
1350 } 1335 }
1351 mlog(0, "node %d was using slot %d\n", node_num, slot_num);
1352 1336
1353 /* It is a bit subtle with quota recovery. We cannot do it 1337 /* It is a bit subtle with quota recovery. We cannot do it
1354 * immediately because we have to obtain cluster locks from 1338 * immediately because we have to obtain cluster locks from
@@ -1375,7 +1359,7 @@ skip_recovery:
1375 spin_lock(&osb->osb_lock); 1359 spin_lock(&osb->osb_lock);
1376 } 1360 }
1377 spin_unlock(&osb->osb_lock); 1361 spin_unlock(&osb->osb_lock);
1378 mlog(0, "All nodes recovered\n"); 1362 trace_ocfs2_recovery_thread_end(status);
1379 1363
1380 /* Refresh all journal recovery generations from disk */ 1364 /* Refresh all journal recovery generations from disk */
1381 status = ocfs2_check_journals_nolocks(osb); 1365 status = ocfs2_check_journals_nolocks(osb);
@@ -1428,19 +1412,15 @@ bail:
1428 1412
1429void ocfs2_recovery_thread(struct ocfs2_super *osb, int node_num) 1413void ocfs2_recovery_thread(struct ocfs2_super *osb, int node_num)
1430{ 1414{
1431 mlog(0, "(node_num=%d, osb->node_num = %d)\n",
1432 node_num, osb->node_num);
1433
1434 mutex_lock(&osb->recovery_lock); 1415 mutex_lock(&osb->recovery_lock);
1435 if (osb->disable_recovery)
1436 goto out;
1437 1416
1438 /* People waiting on recovery will wait on 1417 trace_ocfs2_recovery_thread(node_num, osb->node_num,
1439 * the recovery map to empty. */ 1418 osb->disable_recovery, osb->recovery_thread_task,
1440 if (ocfs2_recovery_map_set(osb, node_num)) 1419 osb->disable_recovery ?
1441 mlog(0, "node %d already in recovery map.\n", node_num); 1420 -1 : ocfs2_recovery_map_set(osb, node_num));
1442 1421
1443 mlog(0, "starting recovery thread...\n"); 1422 if (osb->disable_recovery)
1423 goto out;
1444 1424
1445 if (osb->recovery_thread_task) 1425 if (osb->recovery_thread_task)
1446 goto out; 1426 goto out;
@@ -1528,7 +1508,7 @@ static int ocfs2_replay_journal(struct ocfs2_super *osb,
1528 * If not, it needs recovery. 1508 * If not, it needs recovery.
1529 */ 1509 */
1530 if (osb->slot_recovery_generations[slot_num] != slot_reco_gen) { 1510 if (osb->slot_recovery_generations[slot_num] != slot_reco_gen) {
1531 mlog(0, "Slot %u already recovered (old/new=%u/%u)\n", slot_num, 1511 trace_ocfs2_replay_journal_recovered(slot_num,
1532 osb->slot_recovery_generations[slot_num], slot_reco_gen); 1512 osb->slot_recovery_generations[slot_num], slot_reco_gen);
1533 osb->slot_recovery_generations[slot_num] = slot_reco_gen; 1513 osb->slot_recovery_generations[slot_num] = slot_reco_gen;
1534 status = -EBUSY; 1514 status = -EBUSY;
@@ -1539,7 +1519,7 @@ static int ocfs2_replay_journal(struct ocfs2_super *osb,
1539 1519
1540 status = ocfs2_inode_lock_full(inode, &bh, 1, OCFS2_META_LOCK_RECOVERY); 1520 status = ocfs2_inode_lock_full(inode, &bh, 1, OCFS2_META_LOCK_RECOVERY);
1541 if (status < 0) { 1521 if (status < 0) {
1542 mlog(0, "status returned from ocfs2_inode_lock=%d\n", status); 1522 trace_ocfs2_replay_journal_lock_err(status);
1543 if (status != -ERESTARTSYS) 1523 if (status != -ERESTARTSYS)
1544 mlog(ML_ERROR, "Could not lock journal!\n"); 1524 mlog(ML_ERROR, "Could not lock journal!\n");
1545 goto done; 1525 goto done;
@@ -1552,7 +1532,7 @@ static int ocfs2_replay_journal(struct ocfs2_super *osb,
1552 slot_reco_gen = ocfs2_get_recovery_generation(fe); 1532 slot_reco_gen = ocfs2_get_recovery_generation(fe);
1553 1533
1554 if (!(flags & OCFS2_JOURNAL_DIRTY_FL)) { 1534 if (!(flags & OCFS2_JOURNAL_DIRTY_FL)) {
1555 mlog(0, "No recovery required for node %d\n", node_num); 1535 trace_ocfs2_replay_journal_skip(node_num);
1556 /* Refresh recovery generation for the slot */ 1536 /* Refresh recovery generation for the slot */
1557 osb->slot_recovery_generations[slot_num] = slot_reco_gen; 1537 osb->slot_recovery_generations[slot_num] = slot_reco_gen;
1558 goto done; 1538 goto done;
@@ -1573,7 +1553,6 @@ static int ocfs2_replay_journal(struct ocfs2_super *osb,
1573 goto done; 1553 goto done;
1574 } 1554 }
1575 1555
1576 mlog(0, "calling journal_init_inode\n");
1577 journal = jbd2_journal_init_inode(inode); 1556 journal = jbd2_journal_init_inode(inode);
1578 if (journal == NULL) { 1557 if (journal == NULL) {
1579 mlog(ML_ERROR, "Linux journal layer error\n"); 1558 mlog(ML_ERROR, "Linux journal layer error\n");
@@ -1593,7 +1572,6 @@ static int ocfs2_replay_journal(struct ocfs2_super *osb,
1593 ocfs2_clear_journal_error(osb->sb, journal, slot_num); 1572 ocfs2_clear_journal_error(osb->sb, journal, slot_num);
1594 1573
1595 /* wipe the journal */ 1574 /* wipe the journal */
1596 mlog(0, "flushing the journal.\n");
1597 jbd2_journal_lock_updates(journal); 1575 jbd2_journal_lock_updates(journal);
1598 status = jbd2_journal_flush(journal); 1576 status = jbd2_journal_flush(journal);
1599 jbd2_journal_unlock_updates(journal); 1577 jbd2_journal_unlock_updates(journal);
@@ -1652,8 +1630,7 @@ static int ocfs2_recover_node(struct ocfs2_super *osb,
1652 struct ocfs2_dinode *la_copy = NULL; 1630 struct ocfs2_dinode *la_copy = NULL;
1653 struct ocfs2_dinode *tl_copy = NULL; 1631 struct ocfs2_dinode *tl_copy = NULL;
1654 1632
1655 mlog(0, "(node_num=%d, slot_num=%d, osb->node_num = %d)\n", 1633 trace_ocfs2_recover_node(node_num, slot_num, osb->node_num);
1656 node_num, slot_num, osb->node_num);
1657 1634
1658 /* Should not ever be called to recover ourselves -- in that 1635 /* Should not ever be called to recover ourselves -- in that
1659 * case we should've called ocfs2_journal_load instead. */ 1636 * case we should've called ocfs2_journal_load instead. */
@@ -1662,9 +1639,7 @@ static int ocfs2_recover_node(struct ocfs2_super *osb,
1662 status = ocfs2_replay_journal(osb, node_num, slot_num); 1639 status = ocfs2_replay_journal(osb, node_num, slot_num);
1663 if (status < 0) { 1640 if (status < 0) {
1664 if (status == -EBUSY) { 1641 if (status == -EBUSY) {
1665 mlog(0, "Skipping recovery for slot %u (node %u) " 1642 trace_ocfs2_recover_node_skip(slot_num, node_num);
1666 "as another node has recovered it\n", slot_num,
1667 node_num);
1668 status = 0; 1643 status = 0;
1669 goto done; 1644 goto done;
1670 } 1645 }
@@ -1771,8 +1746,8 @@ int ocfs2_mark_dead_nodes(struct ocfs2_super *osb)
1771 spin_lock(&osb->osb_lock); 1746 spin_lock(&osb->osb_lock);
1772 osb->slot_recovery_generations[i] = gen; 1747 osb->slot_recovery_generations[i] = gen;
1773 1748
1774 mlog(0, "Slot %u recovery generation is %u\n", i, 1749 trace_ocfs2_mark_dead_nodes(i,
1775 osb->slot_recovery_generations[i]); 1750 osb->slot_recovery_generations[i]);
1776 1751
1777 if (i == osb->slot_num) { 1752 if (i == osb->slot_num) {
1778 spin_unlock(&osb->osb_lock); 1753 spin_unlock(&osb->osb_lock);
@@ -1846,11 +1821,12 @@ void ocfs2_queue_orphan_scan(struct ocfs2_super *osb)
1846 1821
1847 os = &osb->osb_orphan_scan; 1822 os = &osb->osb_orphan_scan;
1848 1823
1849 mlog(0, "Begin orphan scan\n");
1850
1851 if (atomic_read(&os->os_state) == ORPHAN_SCAN_INACTIVE) 1824 if (atomic_read(&os->os_state) == ORPHAN_SCAN_INACTIVE)
1852 goto out; 1825 goto out;
1853 1826
1827 trace_ocfs2_queue_orphan_scan_begin(os->os_count, os->os_seqno,
1828 atomic_read(&os->os_state));
1829
1854 status = ocfs2_orphan_scan_lock(osb, &seqno); 1830 status = ocfs2_orphan_scan_lock(osb, &seqno);
1855 if (status < 0) { 1831 if (status < 0) {
1856 if (status != -EAGAIN) 1832 if (status != -EAGAIN)
@@ -1880,7 +1856,8 @@ void ocfs2_queue_orphan_scan(struct ocfs2_super *osb)
1880unlock: 1856unlock:
1881 ocfs2_orphan_scan_unlock(osb, seqno); 1857 ocfs2_orphan_scan_unlock(osb, seqno);
1882out: 1858out:
1883 mlog(0, "Orphan scan completed\n"); 1859 trace_ocfs2_queue_orphan_scan_end(os->os_count, os->os_seqno,
1860 atomic_read(&os->os_state));
1884 return; 1861 return;
1885} 1862}
1886 1863
@@ -1964,8 +1941,7 @@ static int ocfs2_orphan_filldir(void *priv, const char *name, int name_len,
1964 if (IS_ERR(iter)) 1941 if (IS_ERR(iter))
1965 return 0; 1942 return 0;
1966 1943
1967 mlog(0, "queue orphan %llu\n", 1944 trace_ocfs2_orphan_filldir((unsigned long long)OCFS2_I(iter)->ip_blkno);
1968 (unsigned long long)OCFS2_I(iter)->ip_blkno);
1969 /* No locking is required for the next_orphan queue as there 1945 /* No locking is required for the next_orphan queue as there
1970 * is only ever a single process doing orphan recovery. */ 1946 * is only ever a single process doing orphan recovery. */
1971 OCFS2_I(iter)->ip_next_orphan = p->head; 1947 OCFS2_I(iter)->ip_next_orphan = p->head;
@@ -2081,7 +2057,7 @@ static int ocfs2_recover_orphans(struct ocfs2_super *osb,
2081 struct inode *iter; 2057 struct inode *iter;
2082 struct ocfs2_inode_info *oi; 2058 struct ocfs2_inode_info *oi;
2083 2059
2084 mlog(0, "Recover inodes from orphan dir in slot %d\n", slot); 2060 trace_ocfs2_recover_orphans(slot);
2085 2061
2086 ocfs2_mark_recovering_orphan_dir(osb, slot); 2062 ocfs2_mark_recovering_orphan_dir(osb, slot);
2087 ret = ocfs2_queue_orphans(osb, slot, &inode); 2063 ret = ocfs2_queue_orphans(osb, slot, &inode);
@@ -2094,7 +2070,8 @@ static int ocfs2_recover_orphans(struct ocfs2_super *osb,
2094 2070
2095 while (inode) { 2071 while (inode) {
2096 oi = OCFS2_I(inode); 2072 oi = OCFS2_I(inode);
2097 mlog(0, "iput orphan %llu\n", (unsigned long long)oi->ip_blkno); 2073 trace_ocfs2_recover_orphans_iput(
2074 (unsigned long long)oi->ip_blkno);
2098 2075
2099 iter = oi->ip_next_orphan; 2076 iter = oi->ip_next_orphan;
2100 2077
@@ -2132,6 +2109,7 @@ static int __ocfs2_wait_on_mount(struct ocfs2_super *osb, int quota)
2132 * MOUNTED flag, but this is set right before 2109 * MOUNTED flag, but this is set right before
2133 * dismount_volume() so we can trust it. */ 2110 * dismount_volume() so we can trust it. */
2134 if (atomic_read(&osb->vol_state) == VOLUME_DISABLED) { 2111 if (atomic_read(&osb->vol_state) == VOLUME_DISABLED) {
2112 trace_ocfs2_wait_on_mount(VOLUME_DISABLED);
2135 mlog(0, "mount error, exiting!\n"); 2113 mlog(0, "mount error, exiting!\n");
2136 return -EBUSY; 2114 return -EBUSY;
2137 } 2115 }