diff options
author | Mark Fasheh <mark.fasheh@oracle.com> | 2006-03-03 13:24:33 -0500 |
---|---|---|
committer | Mark Fasheh <mark.fasheh@oracle.com> | 2006-03-24 17:58:28 -0500 |
commit | b0697053f9e8de9cea3d510d9e290851ece9460b (patch) | |
tree | bcfa2ae33e4a5302ddbe94dec0eaf95013e79850 /fs/ocfs2/alloc.c | |
parent | 29004858a76ba9e26393dd8a85e653f105a33753 (diff) |
ocfs2: don't use MLF* in the file system
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2/alloc.c')
-rw-r--r-- | fs/ocfs2/alloc.c | 88 |
1 files changed, 45 insertions, 43 deletions
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index 6b9812db3779..edaab05a93e0 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c | |||
@@ -566,9 +566,8 @@ static int ocfs2_do_insert_extent(struct ocfs2_super *osb, | |||
566 | next_free = le16_to_cpu(el->l_next_free_rec); | 566 | next_free = le16_to_cpu(el->l_next_free_rec); |
567 | if (next_free == 0) { | 567 | if (next_free == 0) { |
568 | ocfs2_error(inode->i_sb, | 568 | ocfs2_error(inode->i_sb, |
569 | "Dinode %"MLFu64" has a bad " | 569 | "Dinode %llu has a bad extent list", |
570 | "extent list", | 570 | (unsigned long long)OCFS2_I(inode)->ip_blkno); |
571 | OCFS2_I(inode)->ip_blkno); | ||
572 | status = -EIO; | 571 | status = -EIO; |
573 | goto bail; | 572 | goto bail; |
574 | } | 573 | } |
@@ -611,9 +610,8 @@ static int ocfs2_do_insert_extent(struct ocfs2_super *osb, | |||
611 | next_free = le16_to_cpu(el->l_next_free_rec); | 610 | next_free = le16_to_cpu(el->l_next_free_rec); |
612 | if (next_free == 0) { | 611 | if (next_free == 0) { |
613 | ocfs2_error(inode->i_sb, | 612 | ocfs2_error(inode->i_sb, |
614 | "Dinode %"MLFu64" has a bad " | 613 | "Dinode %llu has a bad extent list", |
615 | "extent list", | 614 | (unsigned long long)OCFS2_I(inode)->ip_blkno); |
616 | OCFS2_I(inode)->ip_blkno); | ||
617 | status = -EIO; | 615 | status = -EIO; |
618 | goto bail; | 616 | goto bail; |
619 | } | 617 | } |
@@ -652,8 +650,9 @@ static int ocfs2_do_insert_extent(struct ocfs2_super *osb, | |||
652 | /* having an empty extent at eof is legal. */ | 650 | /* having an empty extent at eof is legal. */ |
653 | if (el->l_recs[i].e_cpos != fe->i_clusters) { | 651 | if (el->l_recs[i].e_cpos != fe->i_clusters) { |
654 | ocfs2_error(inode->i_sb, | 652 | ocfs2_error(inode->i_sb, |
655 | "Dinode %"MLFu64" trailing extent is bad: " | 653 | "Dinode %llu trailing extent is bad: " |
656 | "cpos (%u) != number of clusters (%u)", | 654 | "cpos (%u) != number of clusters (%u)", |
655 | (unsigned long long)OCFS2_I(inode)->ip_blkno, | ||
657 | le32_to_cpu(el->l_recs[i].e_cpos), | 656 | le32_to_cpu(el->l_recs[i].e_cpos), |
658 | le32_to_cpu(fe->i_clusters)); | 657 | le32_to_cpu(fe->i_clusters)); |
659 | status = -EIO; | 658 | status = -EIO; |
@@ -747,19 +746,19 @@ static int ocfs2_find_branch_target(struct ocfs2_super *osb, | |||
747 | 746 | ||
748 | while(le16_to_cpu(el->l_tree_depth) > 1) { | 747 | while(le16_to_cpu(el->l_tree_depth) > 1) { |
749 | if (le16_to_cpu(el->l_next_free_rec) == 0) { | 748 | if (le16_to_cpu(el->l_next_free_rec) == 0) { |
750 | ocfs2_error(inode->i_sb, "Dinode %"MLFu64" has empty " | 749 | ocfs2_error(inode->i_sb, "Dinode %llu has empty " |
751 | "extent list (next_free_rec == 0)", | 750 | "extent list (next_free_rec == 0)", |
752 | OCFS2_I(inode)->ip_blkno); | 751 | (unsigned long long)OCFS2_I(inode)->ip_blkno); |
753 | status = -EIO; | 752 | status = -EIO; |
754 | goto bail; | 753 | goto bail; |
755 | } | 754 | } |
756 | i = le16_to_cpu(el->l_next_free_rec) - 1; | 755 | i = le16_to_cpu(el->l_next_free_rec) - 1; |
757 | blkno = le64_to_cpu(el->l_recs[i].e_blkno); | 756 | blkno = le64_to_cpu(el->l_recs[i].e_blkno); |
758 | if (!blkno) { | 757 | if (!blkno) { |
759 | ocfs2_error(inode->i_sb, "Dinode %"MLFu64" has extent " | 758 | ocfs2_error(inode->i_sb, "Dinode %llu has extent " |
760 | "list where extent # %d has no physical " | 759 | "list where extent # %d has no physical " |
761 | "block start", | 760 | "block start", |
762 | OCFS2_I(inode)->ip_blkno, i); | 761 | (unsigned long long)OCFS2_I(inode)->ip_blkno, i); |
763 | status = -EIO; | 762 | status = -EIO; |
764 | goto bail; | 763 | goto bail; |
765 | } | 764 | } |
@@ -826,9 +825,9 @@ int ocfs2_insert_extent(struct ocfs2_super *osb, | |||
826 | 825 | ||
827 | mlog_entry_void(); | 826 | mlog_entry_void(); |
828 | 827 | ||
829 | mlog(0, "add %u clusters starting at block %"MLFu64" to " | 828 | mlog(0, "add %u clusters starting at block %llu to inode %llu\n", |
830 | "inode %"MLFu64"\n", | 829 | new_clusters, (unsigned long long)start_blk, |
831 | new_clusters, start_blk, OCFS2_I(inode)->ip_blkno); | 830 | (unsigned long long)OCFS2_I(inode)->ip_blkno); |
832 | 831 | ||
833 | fe = (struct ocfs2_dinode *) fe_bh->b_data; | 832 | fe = (struct ocfs2_dinode *) fe_bh->b_data; |
834 | el = &fe->id2.i_list; | 833 | el = &fe->id2.i_list; |
@@ -963,8 +962,8 @@ static int ocfs2_truncate_log_append(struct ocfs2_super *osb, | |||
963 | struct ocfs2_dinode *di; | 962 | struct ocfs2_dinode *di; |
964 | struct ocfs2_truncate_log *tl; | 963 | struct ocfs2_truncate_log *tl; |
965 | 964 | ||
966 | mlog_entry("start_blk = %"MLFu64", num_clusters = %u\n", start_blk, | 965 | mlog_entry("start_blk = %llu, num_clusters = %u\n", |
967 | num_clusters); | 966 | (unsigned long long)start_blk, num_clusters); |
968 | 967 | ||
969 | BUG_ON(mutex_trylock(&tl_inode->i_mutex)); | 968 | BUG_ON(mutex_trylock(&tl_inode->i_mutex)); |
970 | 969 | ||
@@ -981,8 +980,9 @@ static int ocfs2_truncate_log_append(struct ocfs2_super *osb, | |||
981 | tl_count = le16_to_cpu(tl->tl_count); | 980 | tl_count = le16_to_cpu(tl->tl_count); |
982 | mlog_bug_on_msg(tl_count > ocfs2_truncate_recs_per_inode(osb->sb) || | 981 | mlog_bug_on_msg(tl_count > ocfs2_truncate_recs_per_inode(osb->sb) || |
983 | tl_count == 0, | 982 | tl_count == 0, |
984 | "Truncate record count on #%"MLFu64" invalid (" | 983 | "Truncate record count on #%llu invalid " |
985 | "wanted %u, actual %u\n", OCFS2_I(tl_inode)->ip_blkno, | 984 | "wanted %u, actual %u\n", |
985 | (unsigned long long)OCFS2_I(tl_inode)->ip_blkno, | ||
986 | ocfs2_truncate_recs_per_inode(osb->sb), | 986 | ocfs2_truncate_recs_per_inode(osb->sb), |
987 | le16_to_cpu(tl->tl_count)); | 987 | le16_to_cpu(tl->tl_count)); |
988 | 988 | ||
@@ -1002,8 +1002,8 @@ static int ocfs2_truncate_log_append(struct ocfs2_super *osb, | |||
1002 | } | 1002 | } |
1003 | 1003 | ||
1004 | mlog(0, "Log truncate of %u clusters starting at cluster %u to " | 1004 | mlog(0, "Log truncate of %u clusters starting at cluster %u to " |
1005 | "%"MLFu64" (index = %d)\n", num_clusters, start_cluster, | 1005 | "%llu (index = %d)\n", num_clusters, start_cluster, |
1006 | OCFS2_I(tl_inode)->ip_blkno, index); | 1006 | (unsigned long long)OCFS2_I(tl_inode)->ip_blkno, index); |
1007 | 1007 | ||
1008 | if (ocfs2_truncate_log_can_coalesce(tl, start_cluster)) { | 1008 | if (ocfs2_truncate_log_can_coalesce(tl, start_cluster)) { |
1009 | /* | 1009 | /* |
@@ -1134,8 +1134,8 @@ static int __ocfs2_flush_truncate_log(struct ocfs2_super *osb) | |||
1134 | } | 1134 | } |
1135 | 1135 | ||
1136 | num_to_flush = le16_to_cpu(tl->tl_used); | 1136 | num_to_flush = le16_to_cpu(tl->tl_used); |
1137 | mlog(0, "Flush %u records from truncate log #%"MLFu64"\n", | 1137 | mlog(0, "Flush %u records from truncate log #%llu\n", |
1138 | num_to_flush, OCFS2_I(tl_inode)->ip_blkno); | 1138 | num_to_flush, (unsigned long long)OCFS2_I(tl_inode)->ip_blkno); |
1139 | if (!num_to_flush) { | 1139 | if (!num_to_flush) { |
1140 | status = 0; | 1140 | status = 0; |
1141 | goto bail; | 1141 | goto bail; |
@@ -1360,8 +1360,8 @@ int ocfs2_complete_truncate_log_recovery(struct ocfs2_super *osb, | |||
1360 | 1360 | ||
1361 | tl = &tl_copy->id2.i_dealloc; | 1361 | tl = &tl_copy->id2.i_dealloc; |
1362 | num_recs = le16_to_cpu(tl->tl_used); | 1362 | num_recs = le16_to_cpu(tl->tl_used); |
1363 | mlog(0, "cleanup %u records from %"MLFu64"\n", num_recs, | 1363 | mlog(0, "cleanup %u records from %llu\n", num_recs, |
1364 | tl_copy->i_blkno); | 1364 | (unsigned long long)tl_copy->i_blkno); |
1365 | 1365 | ||
1366 | mutex_lock(&tl_inode->i_mutex); | 1366 | mutex_lock(&tl_inode->i_mutex); |
1367 | for(i = 0; i < num_recs; i++) { | 1367 | for(i = 0; i < num_recs; i++) { |
@@ -1529,7 +1529,8 @@ static int ocfs2_find_new_last_ext_blk(struct ocfs2_super *osb, | |||
1529 | 1529 | ||
1530 | *new_last_eb = bh; | 1530 | *new_last_eb = bh; |
1531 | get_bh(*new_last_eb); | 1531 | get_bh(*new_last_eb); |
1532 | mlog(0, "returning block %"MLFu64"\n", le64_to_cpu(eb->h_blkno)); | 1532 | mlog(0, "returning block %llu\n", |
1533 | (unsigned long long)le64_to_cpu(eb->h_blkno)); | ||
1533 | bail: | 1534 | bail: |
1534 | if (bh) | 1535 | if (bh) |
1535 | brelse(bh); | 1536 | brelse(bh); |
@@ -1646,8 +1647,8 @@ static int ocfs2_do_truncate(struct ocfs2_super *osb, | |||
1646 | 1647 | ||
1647 | /* if our tree depth > 0, update all the tree blocks below us. */ | 1648 | /* if our tree depth > 0, update all the tree blocks below us. */ |
1648 | while (depth) { | 1649 | while (depth) { |
1649 | mlog(0, "traveling tree (depth = %d, next_eb = %"MLFu64")\n", | 1650 | mlog(0, "traveling tree (depth = %d, next_eb = %llu)\n", |
1650 | depth, next_eb); | 1651 | depth, (unsigned long long)next_eb); |
1651 | status = ocfs2_read_block(osb, next_eb, &eb_bh, | 1652 | status = ocfs2_read_block(osb, next_eb, &eb_bh, |
1652 | OCFS2_BH_CACHED, inode); | 1653 | OCFS2_BH_CACHED, inode); |
1653 | if (status < 0) { | 1654 | if (status < 0) { |
@@ -1674,12 +1675,12 @@ static int ocfs2_do_truncate(struct ocfs2_super *osb, | |||
1674 | 1675 | ||
1675 | i = le16_to_cpu(el->l_next_free_rec) - 1; | 1676 | i = le16_to_cpu(el->l_next_free_rec) - 1; |
1676 | 1677 | ||
1677 | mlog(0, "extent block %"MLFu64", before: record %d: " | 1678 | mlog(0, "extent block %llu, before: record %d: " |
1678 | "(%u, %u, %"MLFu64"), next = %u\n", | 1679 | "(%u, %u, %llu), next = %u\n", |
1679 | le64_to_cpu(eb->h_blkno), i, | 1680 | (unsigned long long)le64_to_cpu(eb->h_blkno), i, |
1680 | le32_to_cpu(el->l_recs[i].e_cpos), | 1681 | le32_to_cpu(el->l_recs[i].e_cpos), |
1681 | le32_to_cpu(el->l_recs[i].e_clusters), | 1682 | le32_to_cpu(el->l_recs[i].e_clusters), |
1682 | le64_to_cpu(el->l_recs[i].e_blkno), | 1683 | (unsigned long long)le64_to_cpu(el->l_recs[i].e_blkno), |
1683 | le16_to_cpu(el->l_next_free_rec)); | 1684 | le16_to_cpu(el->l_next_free_rec)); |
1684 | 1685 | ||
1685 | BUG_ON(le32_to_cpu(el->l_recs[i].e_clusters) < clusters_to_del); | 1686 | BUG_ON(le32_to_cpu(el->l_recs[i].e_clusters) < clusters_to_del); |
@@ -1697,12 +1698,12 @@ static int ocfs2_do_truncate(struct ocfs2_super *osb, | |||
1697 | BUG_ON(!el->l_next_free_rec); | 1698 | BUG_ON(!el->l_next_free_rec); |
1698 | le16_add_cpu(&el->l_next_free_rec, -1); | 1699 | le16_add_cpu(&el->l_next_free_rec, -1); |
1699 | } | 1700 | } |
1700 | mlog(0, "extent block %"MLFu64", after: record %d: " | 1701 | mlog(0, "extent block %llu, after: record %d: " |
1701 | "(%u, %u, %"MLFu64"), next = %u\n", | 1702 | "(%u, %u, %llu), next = %u\n", |
1702 | le64_to_cpu(eb->h_blkno), i, | 1703 | (unsigned long long)le64_to_cpu(eb->h_blkno), i, |
1703 | le32_to_cpu(el->l_recs[i].e_cpos), | 1704 | le32_to_cpu(el->l_recs[i].e_cpos), |
1704 | le32_to_cpu(el->l_recs[i].e_clusters), | 1705 | le32_to_cpu(el->l_recs[i].e_clusters), |
1705 | le64_to_cpu(el->l_recs[i].e_blkno), | 1706 | (unsigned long long)le64_to_cpu(el->l_recs[i].e_blkno), |
1706 | le16_to_cpu(el->l_next_free_rec)); | 1707 | le16_to_cpu(el->l_next_free_rec)); |
1707 | 1708 | ||
1708 | status = ocfs2_journal_dirty(handle, eb_bh); | 1709 | status = ocfs2_journal_dirty(handle, eb_bh); |
@@ -1792,10 +1793,10 @@ int ocfs2_commit_truncate(struct ocfs2_super *osb, | |||
1792 | last_eb = le64_to_cpu(fe->i_last_eb_blk); | 1793 | last_eb = le64_to_cpu(fe->i_last_eb_blk); |
1793 | start: | 1794 | start: |
1794 | mlog(0, "ocfs2_commit_truncate: fe->i_clusters = %u, " | 1795 | mlog(0, "ocfs2_commit_truncate: fe->i_clusters = %u, " |
1795 | "last_eb = %"MLFu64", fe->i_last_eb_blk = %"MLFu64", " | 1796 | "last_eb = %llu, fe->i_last_eb_blk = %llu, " |
1796 | "fe->id2.i_list.l_tree_depth = %u last_eb_bh = %p\n", | 1797 | "fe->id2.i_list.l_tree_depth = %u last_eb_bh = %p\n", |
1797 | le32_to_cpu(fe->i_clusters), last_eb, | 1798 | le32_to_cpu(fe->i_clusters), (unsigned long long)last_eb, |
1798 | le64_to_cpu(fe->i_last_eb_blk), | 1799 | (unsigned long long)le64_to_cpu(fe->i_last_eb_blk), |
1799 | le16_to_cpu(fe->id2.i_list.l_tree_depth), last_eb_bh); | 1800 | le16_to_cpu(fe->id2.i_list.l_tree_depth), last_eb_bh); |
1800 | 1801 | ||
1801 | if (last_eb != le64_to_cpu(fe->i_last_eb_blk)) { | 1802 | if (last_eb != le64_to_cpu(fe->i_last_eb_blk)) { |
@@ -1934,16 +1935,17 @@ int ocfs2_prepare_truncate(struct ocfs2_super *osb, | |||
1934 | fe = (struct ocfs2_dinode *) fe_bh->b_data; | 1935 | fe = (struct ocfs2_dinode *) fe_bh->b_data; |
1935 | 1936 | ||
1936 | mlog(0, "fe->i_clusters = %u, new_i_clusters = %u, fe->i_size =" | 1937 | mlog(0, "fe->i_clusters = %u, new_i_clusters = %u, fe->i_size =" |
1937 | "%"MLFu64"\n", fe->i_clusters, new_i_clusters, fe->i_size); | 1938 | "%llu\n", fe->i_clusters, new_i_clusters, |
1939 | (unsigned long long)fe->i_size); | ||
1938 | 1940 | ||
1939 | if (le32_to_cpu(fe->i_clusters) <= new_i_clusters) { | 1941 | if (le32_to_cpu(fe->i_clusters) <= new_i_clusters) { |
1940 | ocfs2_error(inode->i_sb, "Dinode %"MLFu64" has cluster count " | 1942 | ocfs2_error(inode->i_sb, "Dinode %llu has cluster count " |
1941 | "%u and size %"MLFu64" whereas struct inode has " | 1943 | "%u and size %llu whereas struct inode has " |
1942 | "cluster count %u and size %llu which caused an " | 1944 | "cluster count %u and size %llu which caused an " |
1943 | "invalid truncate to %u clusters.", | 1945 | "invalid truncate to %u clusters.", |
1944 | le64_to_cpu(fe->i_blkno), | 1946 | (unsigned long long)le64_to_cpu(fe->i_blkno), |
1945 | le32_to_cpu(fe->i_clusters), | 1947 | le32_to_cpu(fe->i_clusters), |
1946 | le64_to_cpu(fe->i_size), | 1948 | (unsigned long long)le64_to_cpu(fe->i_size), |
1947 | OCFS2_I(inode)->ip_clusters, i_size_read(inode), | 1949 | OCFS2_I(inode)->ip_clusters, i_size_read(inode), |
1948 | new_i_clusters); | 1950 | new_i_clusters); |
1949 | mlog_meta_lvb(ML_ERROR, &OCFS2_I(inode)->ip_meta_lockres); | 1951 | mlog_meta_lvb(ML_ERROR, &OCFS2_I(inode)->ip_meta_lockres); |