~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to fs/ocfs2/journal.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
#include <linux/time.h>
32
32
#include <linux/random.h>
33
33
 
34
 
#define MLOG_MASK_PREFIX ML_JOURNAL
35
34
#include <cluster/masklog.h>
36
35
 
37
36
#include "ocfs2.h"
52
51
#include "quota.h"
53
52
 
54
53
#include "buffer_head_io.h"
 
54
#include "ocfs2_trace.h"
55
55
 
56
56
DEFINE_SPINLOCK(trans_inc_lock);
57
57
 
303
303
        unsigned int flushed;
304
304
        struct ocfs2_journal *journal = NULL;
305
305
 
306
 
        mlog_entry_void();
307
 
 
308
306
        journal = osb->journal;
309
307
 
310
308
        /* Flush all pending commits and checkpoint the journal. */
311
309
        down_write(&journal->j_trans_barrier);
312
310
 
313
 
        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) {
314
314
                up_write(&journal->j_trans_barrier);
315
 
                mlog(0, "No transactions for me to flush!\n");
316
315
                goto finally;
317
316
        }
318
317
 
331
330
        atomic_set(&journal->j_num_trans, 0);
332
331
        up_write(&journal->j_trans_barrier);
333
332
 
334
 
        mlog(0, "commit_thread: flushed transaction %lu (%u handles)\n",
335
 
             journal->j_trans_id, flushed);
 
333
        trace_ocfs2_commit_cache_end(journal->j_trans_id, flushed);
336
334
 
337
335
        ocfs2_wake_downconvert_thread(osb);
338
336
        wake_up(&journal->j_checkpointed);
339
337
finally:
340
 
        mlog_exit(status);
341
338
        return status;
342
339
}
343
340
 
425
422
                return 0;
426
423
 
427
424
        old_nblocks = handle->h_buffer_credits;
428
 
        mlog_entry_void();
429
425
 
430
 
        mlog(0, "Trying to extend transaction by %d blocks\n", nblocks);
 
426
        trace_ocfs2_extend_trans(old_nblocks, nblocks);
431
427
 
432
428
#ifdef CONFIG_OCFS2_DEBUG_FS
433
429
        status = 1;
440
436
#endif
441
437
 
442
438
        if (status > 0) {
443
 
                mlog(0,
444
 
                     "jbd2_journal_extend failed, trying "
445
 
                     "jbd2_journal_restart\n");
 
439
                trace_ocfs2_extend_trans_restart(old_nblocks + nblocks);
446
440
                status = jbd2_journal_restart(handle,
447
441
                                              old_nblocks + nblocks);
448
442
                if (status < 0) {
453
447
 
454
448
        status = 0;
455
449
bail:
456
 
 
457
 
        mlog_exit(status);
458
450
        return status;
459
451
}
460
452
 
622
614
        BUG_ON(!handle);
623
615
        BUG_ON(!bh);
624
616
 
625
 
        mlog_entry("bh->b_blocknr=%llu, type=%d (\"%s\"), bh->b_size = %zu\n",
626
 
                   (unsigned long long)bh->b_blocknr, type,
627
 
                   (type == OCFS2_JOURNAL_ACCESS_CREATE) ?
628
 
                   "OCFS2_JOURNAL_ACCESS_CREATE" :
629
 
                   "OCFS2_JOURNAL_ACCESS_WRITE",
630
 
                   bh->b_size);
 
617
        trace_ocfs2_journal_access(
 
618
                (unsigned long long)ocfs2_metadata_cache_owner(ci),
 
619
                (unsigned long long)bh->b_blocknr, type, bh->b_size);
631
620
 
632
621
        /* we can safely remove this assertion after testing. */
633
622
        if (!buffer_uptodate(bh)) {
668
657
                mlog(ML_ERROR, "Error %d getting %d access to buffer!\n",
669
658
                     status, type);
670
659
 
671
 
        mlog_exit(status);
672
660
        return status;
673
661
}
674
662
 
737
725
{
738
726
        int status;
739
727
 
740
 
        mlog_entry("(bh->b_blocknr=%llu)\n",
741
 
                   (unsigned long long)bh->b_blocknr);
 
728
        trace_ocfs2_journal_dirty((unsigned long long)bh->b_blocknr);
742
729
 
743
730
        status = jbd2_journal_dirty_metadata(handle, bh);
744
731
        BUG_ON(status);
745
 
 
746
 
        mlog_exit_void();
747
732
}
748
733
 
749
734
#define OCFS2_DEFAULT_COMMIT_INTERVAL   (HZ * JBD2_DEFAULT_MAX_COMMIT_AGE)
775
760
        struct ocfs2_super *osb;
776
761
        int inode_lock = 0;
777
762
 
778
 
        mlog_entry_void();
779
 
 
780
763
        BUG_ON(!journal);
781
764
 
782
765
        osb = journal->j_osb;
820
803
                goto done;
821
804
        }
822
805
 
823
 
        mlog(0, "inode->i_size = %lld\n", inode->i_size);
824
 
        mlog(0, "inode->i_blocks = %llu\n",
825
 
                        (unsigned long long)inode->i_blocks);
826
 
        mlog(0, "inode->ip_clusters = %u\n", OCFS2_I(inode)->ip_clusters);
 
806
        trace_ocfs2_journal_init(inode->i_size,
 
807
                                 (unsigned long long)inode->i_blocks,
 
808
                                 OCFS2_I(inode)->ip_clusters);
827
809
 
828
810
        /* call the kernels journal init function now */
829
811
        j_journal = jbd2_journal_init_inode(inode);
833
815
                goto done;
834
816
        }
835
817
 
836
 
        mlog(0, "Returned from jbd2_journal_init_inode\n");
837
 
        mlog(0, "j_journal->j_maxlen = %u\n", j_journal->j_maxlen);
 
818
        trace_ocfs2_journal_init_maxlen(j_journal->j_maxlen);
838
819
 
839
820
        *dirty = (le32_to_cpu(di->id1.journal1.ij_flags) &
840
821
                  OCFS2_JOURNAL_DIRTY_FL);
859
840
                }
860
841
        }
861
842
 
862
 
        mlog_exit(status);
863
843
        return status;
864
844
}
865
845
 
882
862
        struct buffer_head *bh = journal->j_bh;
883
863
        struct ocfs2_dinode *fe;
884
864
 
885
 
        mlog_entry_void();
886
 
 
887
865
        fe = (struct ocfs2_dinode *)bh->b_data;
888
866
 
889
867
        /* The journal bh on the osb always comes from ocfs2_journal_init()
906
884
        if (status < 0)
907
885
                mlog_errno(status);
908
886
 
909
 
        mlog_exit(status);
910
887
        return status;
911
888
}
912
889
 
921
898
        struct inode *inode = NULL;
922
899
        int num_running_trans = 0;
923
900
 
924
 
        mlog_entry_void();
925
 
 
926
901
        BUG_ON(!osb);
927
902
 
928
903
        journal = osb->journal;
939
914
                BUG();
940
915
 
941
916
        num_running_trans = atomic_read(&(osb->journal->j_num_trans));
942
 
        if (num_running_trans > 0)
943
 
                mlog(0, "Shutting down journal: must wait on %d "
944
 
                     "running transactions!\n",
945
 
                     num_running_trans);
 
917
        trace_ocfs2_journal_shutdown(num_running_trans);
946
918
 
947
919
        /* Do a commit_cache here. It will flush our journal, *and*
948
920
         * release any locks that are still held.
955
927
         * completely destroy the journal. */
956
928
        if (osb->commit_task) {
957
929
                /* Wait for the commit thread */
958
 
                mlog(0, "Waiting for ocfs2commit to exit....\n");
 
930
                trace_ocfs2_journal_shutdown_wait(osb->commit_task);
959
931
                kthread_stop(osb->commit_task);
960
932
                osb->commit_task = NULL;
961
933
        }
998
970
done:
999
971
        if (inode)
1000
972
                iput(inode);
1001
 
        mlog_exit_void();
1002
973
}
1003
974
 
1004
975
static void ocfs2_clear_journal_error(struct super_block *sb,
1024
995
        int status = 0;
1025
996
        struct ocfs2_super *osb;
1026
997
 
1027
 
        mlog_entry_void();
1028
 
 
1029
998
        BUG_ON(!journal);
1030
999
 
1031
1000
        osb = journal->j_osb;
1059
1028
                osb->commit_task = NULL;
1060
1029
 
1061
1030
done:
1062
 
        mlog_exit(status);
1063
1031
        return status;
1064
1032
}
1065
1033
 
1070
1038
{
1071
1039
        int status;
1072
1040
 
1073
 
        mlog_entry_void();
1074
 
 
1075
1041
        BUG_ON(!journal);
1076
1042
 
1077
1043
        status = jbd2_journal_wipe(journal->j_journal, full);
1085
1051
                mlog_errno(status);
1086
1052
 
1087
1053
bail:
1088
 
        mlog_exit(status);
1089
1054
        return status;
1090
1055
}
1091
1056
 
1124
1089
#define CONCURRENT_JOURNAL_FILL 32ULL
1125
1090
        struct buffer_head *bhs[CONCURRENT_JOURNAL_FILL];
1126
1091
 
1127
 
        mlog_entry_void();
1128
 
 
1129
1092
        memset(bhs, 0, sizeof(struct buffer_head *) * CONCURRENT_JOURNAL_FILL);
1130
1093
 
1131
1094
        num_blocks = ocfs2_blocks_for_bytes(inode->i_sb, inode->i_size);
1161
1124
bail:
1162
1125
        for(i = 0; i < CONCURRENT_JOURNAL_FILL; i++)
1163
1126
                brelse(bhs[i]);
1164
 
        mlog_exit(status);
1165
1127
        return status;
1166
1128
}
1167
1129
 
1185
1147
 */
1186
1148
void ocfs2_complete_recovery(struct work_struct *work)
1187
1149
{
1188
 
        int ret;
 
1150
        int ret = 0;
1189
1151
        struct ocfs2_journal *journal =
1190
1152
                container_of(work, struct ocfs2_journal, j_recovery_work);
1191
1153
        struct ocfs2_super *osb = journal->j_osb;
1194
1156
        struct ocfs2_quota_recovery *qrec;
1195
1157
        LIST_HEAD(tmp_la_list);
1196
1158
 
1197
 
        mlog_entry_void();
1198
 
 
1199
 
        mlog(0, "completing recovery from keventd\n");
 
1159
        trace_ocfs2_complete_recovery(
 
1160
                (unsigned long long)OCFS2_I(journal->j_inode)->ip_blkno);
1200
1161
 
1201
1162
        spin_lock(&journal->j_lock);
1202
1163
        list_splice_init(&journal->j_la_cleanups, &tmp_la_list);
1205
1166
        list_for_each_entry_safe(item, n, &tmp_la_list, lri_list) {
1206
1167
                list_del_init(&item->lri_list);
1207
1168
 
1208
 
                mlog(0, "Complete recovery for slot %d\n", item->lri_slot);
1209
 
 
1210
1169
                ocfs2_wait_on_quotas(osb);
1211
1170
 
1212
1171
                la_dinode = item->lri_la_dinode;
 
1172
                tl_dinode = item->lri_tl_dinode;
 
1173
                qrec = item->lri_qrec;
 
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
 
1213
1180
                if (la_dinode) {
1214
 
                        mlog(0, "Clean up local alloc %llu\n",
1215
 
                             (unsigned long long)le64_to_cpu(la_dinode->i_blkno));
1216
 
 
1217
1181
                        ret = ocfs2_complete_local_alloc_recovery(osb,
1218
1182
                                                                  la_dinode);
1219
1183
                        if (ret < 0)
1222
1186
                        kfree(la_dinode);
1223
1187
                }
1224
1188
 
1225
 
                tl_dinode = item->lri_tl_dinode;
1226
1189
                if (tl_dinode) {
1227
 
                        mlog(0, "Clean up truncate log %llu\n",
1228
 
                             (unsigned long long)le64_to_cpu(tl_dinode->i_blkno));
1229
 
 
1230
1190
                        ret = ocfs2_complete_truncate_log_recovery(osb,
1231
1191
                                                                   tl_dinode);
1232
1192
                        if (ret < 0)
1239
1199
                if (ret < 0)
1240
1200
                        mlog_errno(ret);
1241
1201
 
1242
 
                qrec = item->lri_qrec;
1243
1202
                if (qrec) {
1244
 
                        mlog(0, "Recovering quota files");
1245
1203
                        ret = ocfs2_finish_quota_recovery(osb, qrec,
1246
1204
                                                          item->lri_slot);
1247
1205
                        if (ret < 0)
1252
1210
                kfree(item);
1253
1211
        }
1254
1212
 
1255
 
        mlog(0, "Recovery completion\n");
1256
 
        mlog_exit_void();
 
1213
        trace_ocfs2_complete_recovery_end(ret);
1257
1214
}
1258
1215
 
1259
1216
/* NOTE: This function always eats your references to la_dinode and
1303
1260
{
1304
1261
        struct ocfs2_journal *journal = osb->journal;
1305
1262
 
 
1263
        if (ocfs2_is_hard_readonly(osb))
 
1264
                return;
 
1265
 
1306
1266
        /* No need to queue up our truncate_log as regular cleanup will catch
1307
1267
         * that */
1308
1268
        ocfs2_queue_recovery_completion(journal, osb->slot_num,
1339
1299
        int rm_quota_used = 0, i;
1340
1300
        struct ocfs2_quota_recovery *qrec;
1341
1301
 
1342
 
        mlog_entry_void();
1343
 
 
1344
1302
        status = ocfs2_wait_on_mount(osb);
1345
1303
        if (status < 0) {
1346
1304
                goto bail;
1372
1330
                 * clear it until ocfs2_recover_node() has succeeded. */
1373
1331
                node_num = rm->rm_entries[0];
1374
1332
                spin_unlock(&osb->osb_lock);
1375
 
                mlog(0, "checking node %d\n", node_num);
1376
1333
                slot_num = ocfs2_node_num_to_slot(osb, node_num);
 
1334
                trace_ocfs2_recovery_thread_node(node_num, slot_num);
1377
1335
                if (slot_num == -ENOENT) {
1378
1336
                        status = 0;
1379
 
                        mlog(0, "no slot for this node, so no recovery"
1380
 
                             "required.\n");
1381
1337
                        goto skip_recovery;
1382
1338
                }
1383
 
                mlog(0, "node %d was using slot %d\n", node_num, slot_num);
1384
1339
 
1385
1340
                /* It is a bit subtle with quota recovery. We cannot do it
1386
1341
                 * immediately because we have to obtain cluster locks from
1407
1362
                spin_lock(&osb->osb_lock);
1408
1363
        }
1409
1364
        spin_unlock(&osb->osb_lock);
1410
 
        mlog(0, "All nodes recovered\n");
 
1365
        trace_ocfs2_recovery_thread_end(status);
1411
1366
 
1412
1367
        /* Refresh all journal recovery generations from disk */
1413
1368
        status = ocfs2_check_journals_nolocks(osb);
1416
1371
                mlog_errno(status);
1417
1372
 
1418
1373
        /* Now it is right time to recover quotas... We have to do this under
1419
 
         * superblock lock so that noone can start using the slot (and crash)
 
1374
         * superblock lock so that no one can start using the slot (and crash)
1420
1375
         * before we recover it */
1421
1376
        for (i = 0; i < rm_quota_used; i++) {
1422
1377
                qrec = ocfs2_begin_quota_recovery(osb, rm_quota[i]);
1451
1406
        if (rm_quota)
1452
1407
                kfree(rm_quota);
1453
1408
 
1454
 
        mlog_exit(status);
1455
1409
        /* no one is callint kthread_stop() for us so the kthread() api
1456
1410
         * requires that we call do_exit().  And it isn't exported, but
1457
1411
         * complete_and_exit() seems to be a minimal wrapper around it. */
1461
1415
 
1462
1416
void ocfs2_recovery_thread(struct ocfs2_super *osb, int node_num)
1463
1417
{
1464
 
        mlog_entry("(node_num=%d, osb->node_num = %d)\n",
1465
 
                   node_num, osb->node_num);
1466
 
 
1467
1418
        mutex_lock(&osb->recovery_lock);
 
1419
 
 
1420
        trace_ocfs2_recovery_thread(node_num, osb->node_num,
 
1421
                osb->disable_recovery, osb->recovery_thread_task,
 
1422
                osb->disable_recovery ?
 
1423
                -1 : ocfs2_recovery_map_set(osb, node_num));
 
1424
 
1468
1425
        if (osb->disable_recovery)
1469
1426
                goto out;
1470
1427
 
1471
 
        /* People waiting on recovery will wait on
1472
 
         * the recovery map to empty. */
1473
 
        if (ocfs2_recovery_map_set(osb, node_num))
1474
 
                mlog(0, "node %d already in recovery map.\n", node_num);
1475
 
 
1476
 
        mlog(0, "starting recovery thread...\n");
1477
 
 
1478
1428
        if (osb->recovery_thread_task)
1479
1429
                goto out;
1480
1430
 
1488
1438
out:
1489
1439
        mutex_unlock(&osb->recovery_lock);
1490
1440
        wake_up(&osb->recovery_event);
1491
 
 
1492
 
        mlog_exit_void();
1493
1441
}
1494
1442
 
1495
1443
static int ocfs2_read_journal_inode(struct ocfs2_super *osb,
1563
1511
         * If not, it needs recovery.
1564
1512
         */
1565
1513
        if (osb->slot_recovery_generations[slot_num] != slot_reco_gen) {
1566
 
                mlog(0, "Slot %u already recovered (old/new=%u/%u)\n", slot_num,
 
1514
                trace_ocfs2_replay_journal_recovered(slot_num,
1567
1515
                     osb->slot_recovery_generations[slot_num], slot_reco_gen);
1568
1516
                osb->slot_recovery_generations[slot_num] = slot_reco_gen;
1569
1517
                status = -EBUSY;
1574
1522
 
1575
1523
        status = ocfs2_inode_lock_full(inode, &bh, 1, OCFS2_META_LOCK_RECOVERY);
1576
1524
        if (status < 0) {
1577
 
                mlog(0, "status returned from ocfs2_inode_lock=%d\n", status);
 
1525
                trace_ocfs2_replay_journal_lock_err(status);
1578
1526
                if (status != -ERESTARTSYS)
1579
1527
                        mlog(ML_ERROR, "Could not lock journal!\n");
1580
1528
                goto done;
1587
1535
        slot_reco_gen = ocfs2_get_recovery_generation(fe);
1588
1536
 
1589
1537
        if (!(flags & OCFS2_JOURNAL_DIRTY_FL)) {
1590
 
                mlog(0, "No recovery required for node %d\n", node_num);
 
1538
                trace_ocfs2_replay_journal_skip(node_num);
1591
1539
                /* Refresh recovery generation for the slot */
1592
1540
                osb->slot_recovery_generations[slot_num] = slot_reco_gen;
1593
1541
                goto done;
1608
1556
                goto done;
1609
1557
        }
1610
1558
 
1611
 
        mlog(0, "calling journal_init_inode\n");
1612
1559
        journal = jbd2_journal_init_inode(inode);
1613
1560
        if (journal == NULL) {
1614
1561
                mlog(ML_ERROR, "Linux journal layer error\n");
1628
1575
        ocfs2_clear_journal_error(osb->sb, journal, slot_num);
1629
1576
 
1630
1577
        /* wipe the journal */
1631
 
        mlog(0, "flushing the journal.\n");
1632
1578
        jbd2_journal_lock_updates(journal);
1633
1579
        status = jbd2_journal_flush(journal);
1634
1580
        jbd2_journal_unlock_updates(journal);
1665
1611
 
1666
1612
        brelse(bh);
1667
1613
 
1668
 
        mlog_exit(status);
1669
1614
        return status;
1670
1615
}
1671
1616
 
1688
1633
        struct ocfs2_dinode *la_copy = NULL;
1689
1634
        struct ocfs2_dinode *tl_copy = NULL;
1690
1635
 
1691
 
        mlog_entry("(node_num=%d, slot_num=%d, osb->node_num = %d)\n",
1692
 
                   node_num, slot_num, osb->node_num);
 
1636
        trace_ocfs2_recover_node(node_num, slot_num, osb->node_num);
1693
1637
 
1694
1638
        /* Should not ever be called to recover ourselves -- in that
1695
1639
         * case we should've called ocfs2_journal_load instead. */
1698
1642
        status = ocfs2_replay_journal(osb, node_num, slot_num);
1699
1643
        if (status < 0) {
1700
1644
                if (status == -EBUSY) {
1701
 
                        mlog(0, "Skipping recovery for slot %u (node %u) "
1702
 
                             "as another node has recovered it\n", slot_num,
1703
 
                             node_num);
 
1645
                        trace_ocfs2_recover_node_skip(slot_num, node_num);
1704
1646
                        status = 0;
1705
1647
                        goto done;
1706
1648
                }
1735
1677
        status = 0;
1736
1678
done:
1737
1679
 
1738
 
        mlog_exit(status);
1739
1680
        return status;
1740
1681
}
1741
1682
 
1808
1749
                spin_lock(&osb->osb_lock);
1809
1750
                osb->slot_recovery_generations[i] = gen;
1810
1751
 
1811
 
                mlog(0, "Slot %u recovery generation is %u\n", i,
1812
 
                     osb->slot_recovery_generations[i]);
 
1752
                trace_ocfs2_mark_dead_nodes(i,
 
1753
                                            osb->slot_recovery_generations[i]);
1813
1754
 
1814
1755
                if (i == osb->slot_num) {
1815
1756
                        spin_unlock(&osb->osb_lock);
1845
1786
 
1846
1787
        status = 0;
1847
1788
bail:
1848
 
        mlog_exit(status);
1849
1789
        return status;
1850
1790
}
1851
1791
 
1884
1824
 
1885
1825
        os = &osb->osb_orphan_scan;
1886
1826
 
1887
 
        mlog(0, "Begin orphan scan\n");
1888
 
 
1889
1827
        if (atomic_read(&os->os_state) == ORPHAN_SCAN_INACTIVE)
1890
1828
                goto out;
1891
1829
 
 
1830
        trace_ocfs2_queue_orphan_scan_begin(os->os_count, os->os_seqno,
 
1831
                                            atomic_read(&os->os_state));
 
1832
 
1892
1833
        status = ocfs2_orphan_scan_lock(osb, &seqno);
1893
1834
        if (status < 0) {
1894
1835
                if (status != -EAGAIN)
1918
1859
unlock:
1919
1860
        ocfs2_orphan_scan_unlock(osb, seqno);
1920
1861
out:
1921
 
        mlog(0, "Orphan scan completed\n");
 
1862
        trace_ocfs2_queue_orphan_scan_end(os->os_count, os->os_seqno,
 
1863
                                          atomic_read(&os->os_state));
1922
1864
        return;
1923
1865
}
1924
1866
 
2002
1944
        if (IS_ERR(iter))
2003
1945
                return 0;
2004
1946
 
2005
 
        mlog(0, "queue orphan %llu\n",
2006
 
             (unsigned long long)OCFS2_I(iter)->ip_blkno);
 
1947
        trace_ocfs2_orphan_filldir((unsigned long long)OCFS2_I(iter)->ip_blkno);
2007
1948
        /* No locking is required for the next_orphan queue as there
2008
1949
         * is only ever a single process doing orphan recovery. */
2009
1950
        OCFS2_I(iter)->ip_next_orphan = p->head;
2119
2060
        struct inode *iter;
2120
2061
        struct ocfs2_inode_info *oi;
2121
2062
 
2122
 
        mlog(0, "Recover inodes from orphan dir in slot %d\n", slot);
 
2063
        trace_ocfs2_recover_orphans(slot);
2123
2064
 
2124
2065
        ocfs2_mark_recovering_orphan_dir(osb, slot);
2125
2066
        ret = ocfs2_queue_orphans(osb, slot, &inode);
2132
2073
 
2133
2074
        while (inode) {
2134
2075
                oi = OCFS2_I(inode);
2135
 
                mlog(0, "iput orphan %llu\n", (unsigned long long)oi->ip_blkno);
 
2076
                trace_ocfs2_recover_orphans_iput(
 
2077
                                        (unsigned long long)oi->ip_blkno);
2136
2078
 
2137
2079
                iter = oi->ip_next_orphan;
2138
2080
 
2170
2112
         * MOUNTED flag, but this is set right before
2171
2113
         * dismount_volume() so we can trust it. */
2172
2114
        if (atomic_read(&osb->vol_state) == VOLUME_DISABLED) {
 
2115
                trace_ocfs2_wait_on_mount(VOLUME_DISABLED);
2173
2116
                mlog(0, "mount error, exiting!\n");
2174
2117
                return -EBUSY;
2175
2118
        }