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/inode.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/inode.c')
-rw-r--r-- | fs/ocfs2/inode.c | 116 |
1 files changed, 61 insertions, 55 deletions
diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c index 315472a5c192..327a5b7b86ed 100644 --- a/fs/ocfs2/inode.c +++ b/fs/ocfs2/inode.c | |||
@@ -95,7 +95,7 @@ struct inode *ocfs2_iget(struct ocfs2_super *osb, u64 blkno) | |||
95 | struct super_block *sb = osb->sb; | 95 | struct super_block *sb = osb->sb; |
96 | struct ocfs2_find_inode_args args; | 96 | struct ocfs2_find_inode_args args; |
97 | 97 | ||
98 | mlog_entry("(blkno = %"MLFu64")\n", blkno); | 98 | mlog_entry("(blkno = %llu)\n", (unsigned long long)blkno); |
99 | 99 | ||
100 | /* Ok. By now we've either got the offsets passed to us by the | 100 | /* Ok. By now we've either got the offsets passed to us by the |
101 | * caller, or we just pulled them off the bh. Lets do some | 101 | * caller, or we just pulled them off the bh. Lets do some |
@@ -134,8 +134,8 @@ struct inode *ocfs2_iget(struct ocfs2_super *osb, u64 blkno) | |||
134 | 134 | ||
135 | bail: | 135 | bail: |
136 | if (!IS_ERR(inode)) { | 136 | if (!IS_ERR(inode)) { |
137 | mlog(0, "returning inode with number %"MLFu64"\n", | 137 | mlog(0, "returning inode with number %llu\n", |
138 | OCFS2_I(inode)->ip_blkno); | 138 | (unsigned long long)OCFS2_I(inode)->ip_blkno); |
139 | mlog_exit_ptr(inode); | 139 | mlog_exit_ptr(inode); |
140 | } else | 140 | } else |
141 | mlog_errno(PTR_ERR(inode)); | 141 | mlog_errno(PTR_ERR(inode)); |
@@ -219,7 +219,8 @@ int ocfs2_populate_inode(struct inode *inode, struct ocfs2_dinode *fe, | |||
219 | struct ocfs2_super *osb; | 219 | struct ocfs2_super *osb; |
220 | int status = -EINVAL; | 220 | int status = -EINVAL; |
221 | 221 | ||
222 | mlog_entry("(0x%p, size:%"MLFu64")\n", inode, fe->i_size); | 222 | mlog_entry("(0x%p, size:%llu)\n", inode, |
223 | (unsigned long long)fe->i_size); | ||
223 | 224 | ||
224 | sb = inode->i_sb; | 225 | sb = inode->i_sb; |
225 | osb = OCFS2_SB(sb); | 226 | osb = OCFS2_SB(sb); |
@@ -228,9 +229,10 @@ int ocfs2_populate_inode(struct inode *inode, struct ocfs2_dinode *fe, | |||
228 | * today. change if needed. */ | 229 | * today. change if needed. */ |
229 | if (!OCFS2_IS_VALID_DINODE(fe) || | 230 | if (!OCFS2_IS_VALID_DINODE(fe) || |
230 | !(fe->i_flags & cpu_to_le32(OCFS2_VALID_FL))) { | 231 | !(fe->i_flags & cpu_to_le32(OCFS2_VALID_FL))) { |
231 | mlog(ML_ERROR, "Invalid dinode: i_ino=%lu, i_blkno=%"MLFu64", " | 232 | mlog(ML_ERROR, "Invalid dinode: i_ino=%lu, i_blkno=%llu, " |
232 | "signature = %.*s, flags = 0x%x\n", | 233 | "signature = %.*s, flags = 0x%x\n", |
233 | inode->i_ino, le64_to_cpu(fe->i_blkno), 7, | 234 | inode->i_ino, |
235 | (unsigned long long)le64_to_cpu(fe->i_blkno), 7, | ||
234 | fe->i_signature, le32_to_cpu(fe->i_flags)); | 236 | fe->i_signature, le32_to_cpu(fe->i_flags)); |
235 | goto bail; | 237 | goto bail; |
236 | } | 238 | } |
@@ -268,8 +270,9 @@ int ocfs2_populate_inode(struct inode *inode, struct ocfs2_dinode *fe, | |||
268 | 270 | ||
269 | if (OCFS2_I(inode)->ip_blkno != le64_to_cpu(fe->i_blkno)) | 271 | if (OCFS2_I(inode)->ip_blkno != le64_to_cpu(fe->i_blkno)) |
270 | mlog(ML_ERROR, | 272 | mlog(ML_ERROR, |
271 | "ip_blkno %"MLFu64" != i_blkno %"MLFu64"!\n", | 273 | "ip_blkno %llu != i_blkno %llu!\n", |
272 | OCFS2_I(inode)->ip_blkno, fe->i_blkno); | 274 | (unsigned long long)OCFS2_I(inode)->ip_blkno, |
275 | (unsigned long long)fe->i_blkno); | ||
273 | 276 | ||
274 | OCFS2_I(inode)->ip_clusters = le32_to_cpu(fe->i_clusters); | 277 | OCFS2_I(inode)->ip_clusters = le32_to_cpu(fe->i_clusters); |
275 | OCFS2_I(inode)->ip_orphaned_slot = OCFS2_INVALID_SLOT; | 278 | OCFS2_I(inode)->ip_orphaned_slot = OCFS2_INVALID_SLOT; |
@@ -278,8 +281,8 @@ int ocfs2_populate_inode(struct inode *inode, struct ocfs2_dinode *fe, | |||
278 | inode->i_ino = ino_from_blkno(inode->i_sb, | 281 | inode->i_ino = ino_from_blkno(inode->i_sb, |
279 | le64_to_cpu(fe->i_blkno)); | 282 | le64_to_cpu(fe->i_blkno)); |
280 | 283 | ||
281 | mlog(0, "blkno = %"MLFu64", ino = %lu, create_ino = %s\n", | 284 | mlog(0, "blkno = %llu, ino = %lu, create_ino = %s\n", |
282 | fe->i_blkno, inode->i_ino, create_ino ? "true" : "false"); | 285 | (unsigned long long)fe->i_blkno, inode->i_ino, create_ino ? "true" : "false"); |
283 | 286 | ||
284 | inode->i_nlink = le16_to_cpu(fe->i_links_count); | 287 | inode->i_nlink = le16_to_cpu(fe->i_links_count); |
285 | 288 | ||
@@ -371,8 +374,8 @@ static int ocfs2_read_locked_inode(struct inode *inode, | |||
371 | 374 | ||
372 | fe = (struct ocfs2_dinode *) bh->b_data; | 375 | fe = (struct ocfs2_dinode *) bh->b_data; |
373 | if (!OCFS2_IS_VALID_DINODE(fe)) { | 376 | if (!OCFS2_IS_VALID_DINODE(fe)) { |
374 | mlog(ML_ERROR, "Invalid dinode #%"MLFu64": signature = %.*s\n", | 377 | mlog(ML_ERROR, "Invalid dinode #%llu: signature = %.*s\n", |
375 | fe->i_blkno, 7, fe->i_signature); | 378 | (unsigned long long)fe->i_blkno, 7, fe->i_signature); |
376 | make_bad_inode(inode); | 379 | make_bad_inode(inode); |
377 | goto bail; | 380 | goto bail; |
378 | } | 381 | } |
@@ -386,8 +389,8 @@ static int ocfs2_read_locked_inode(struct inode *inode, | |||
386 | 389 | ||
387 | status = -EINVAL; | 390 | status = -EINVAL; |
388 | if (ocfs2_populate_inode(inode, fe, 0) < 0) { | 391 | if (ocfs2_populate_inode(inode, fe, 0) < 0) { |
389 | mlog(ML_ERROR, "populate inode failed! i_blkno=%"MLFu64", " | 392 | mlog(ML_ERROR, "populate failed! i_blkno=%llu, i_ino=%lu\n", |
390 | "i_ino=%lu\n", fe->i_blkno, inode->i_ino); | 393 | (unsigned long long)fe->i_blkno, inode->i_ino); |
391 | make_bad_inode(inode); | 394 | make_bad_inode(inode); |
392 | goto bail; | 395 | goto bail; |
393 | } | 396 | } |
@@ -675,8 +678,8 @@ static int ocfs2_inode_is_valid_to_delete(struct inode *inode) | |||
675 | * never get here as system file inodes should always have a | 678 | * never get here as system file inodes should always have a |
676 | * positive link count. */ | 679 | * positive link count. */ |
677 | if (oi->ip_flags & OCFS2_INODE_SYSTEM_FILE) { | 680 | if (oi->ip_flags & OCFS2_INODE_SYSTEM_FILE) { |
678 | mlog(ML_ERROR, "Skipping delete of system file %"MLFu64".\n", | 681 | mlog(ML_ERROR, "Skipping delete of system file %llu\n", |
679 | oi->ip_blkno); | 682 | (unsigned long long)oi->ip_blkno); |
680 | goto bail_unlock; | 683 | goto bail_unlock; |
681 | } | 684 | } |
682 | 685 | ||
@@ -715,16 +718,16 @@ static int ocfs2_query_inode_wipe(struct inode *inode, | |||
715 | * ocfs2_delete_inode, another node might have asked to delete | 718 | * ocfs2_delete_inode, another node might have asked to delete |
716 | * the inode. Recheck our flags to catch this. */ | 719 | * the inode. Recheck our flags to catch this. */ |
717 | if (!ocfs2_inode_is_valid_to_delete(inode)) { | 720 | if (!ocfs2_inode_is_valid_to_delete(inode)) { |
718 | mlog(0, "Skipping delete of %"MLFu64" because flags changed\n", | 721 | mlog(0, "Skipping delete of %llu because flags changed\n", |
719 | oi->ip_blkno); | 722 | (unsigned long long)oi->ip_blkno); |
720 | goto bail; | 723 | goto bail; |
721 | } | 724 | } |
722 | 725 | ||
723 | /* Now that we have an up to date inode, we can double check | 726 | /* Now that we have an up to date inode, we can double check |
724 | * the link count. */ | 727 | * the link count. */ |
725 | if (inode->i_nlink) { | 728 | if (inode->i_nlink) { |
726 | mlog(0, "Skipping delete of %"MLFu64" because nlink = %u\n", | 729 | mlog(0, "Skipping delete of %llu because nlink = %u\n", |
727 | oi->ip_blkno, inode->i_nlink); | 730 | (unsigned long long)oi->ip_blkno, inode->i_nlink); |
728 | goto bail; | 731 | goto bail; |
729 | } | 732 | } |
730 | 733 | ||
@@ -734,9 +737,11 @@ static int ocfs2_query_inode_wipe(struct inode *inode, | |||
734 | /* for lack of a better error? */ | 737 | /* for lack of a better error? */ |
735 | status = -EEXIST; | 738 | status = -EEXIST; |
736 | mlog(ML_ERROR, | 739 | mlog(ML_ERROR, |
737 | "Inode %"MLFu64" (on-disk %"MLFu64") not orphaned! " | 740 | "Inode %llu (on-disk %llu) not orphaned! " |
738 | "Disk flags 0x%x, inode flags 0x%x\n", | 741 | "Disk flags 0x%x, inode flags 0x%x\n", |
739 | oi->ip_blkno, di->i_blkno, di->i_flags, oi->ip_flags); | 742 | (unsigned long long)oi->ip_blkno, |
743 | (unsigned long long)di->i_blkno, di->i_flags, | ||
744 | oi->ip_flags); | ||
740 | goto bail; | 745 | goto bail; |
741 | } | 746 | } |
742 | 747 | ||
@@ -753,8 +758,8 @@ static int ocfs2_query_inode_wipe(struct inode *inode, | |||
753 | * disk and let them worry about deleting it. */ | 758 | * disk and let them worry about deleting it. */ |
754 | if (status == -EBUSY) { | 759 | if (status == -EBUSY) { |
755 | status = 0; | 760 | status = 0; |
756 | mlog(0, "Skipping delete of %"MLFu64" because it is in use on" | 761 | mlog(0, "Skipping delete of %llu because it is in use on" |
757 | "other nodes\n", oi->ip_blkno); | 762 | "other nodes\n", (unsigned long long)oi->ip_blkno); |
758 | goto bail; | 763 | goto bail; |
759 | } | 764 | } |
760 | if (status < 0) { | 765 | if (status < 0) { |
@@ -768,13 +773,13 @@ static int ocfs2_query_inode_wipe(struct inode *inode, | |||
768 | * into. This may happen during node death and | 773 | * into. This may happen during node death and |
769 | * recovery knows how to clean it up so we can safely | 774 | * recovery knows how to clean it up so we can safely |
770 | * ignore this inode for now on. */ | 775 | * ignore this inode for now on. */ |
771 | mlog(0, "Nobody knew where inode %"MLFu64" was orphaned!\n", | 776 | mlog(0, "Nobody knew where inode %llu was orphaned!\n", |
772 | oi->ip_blkno); | 777 | (unsigned long long)oi->ip_blkno); |
773 | } else { | 778 | } else { |
774 | *wipe = 1; | 779 | *wipe = 1; |
775 | 780 | ||
776 | mlog(0, "Inode %"MLFu64" is ok to wipe from orphan dir %d\n", | 781 | mlog(0, "Inode %llu is ok to wipe from orphan dir %d\n", |
777 | oi->ip_blkno, oi->ip_orphaned_slot); | 782 | (unsigned long long)oi->ip_blkno, oi->ip_orphaned_slot); |
778 | } | 783 | } |
779 | spin_unlock(&oi->ip_lock); | 784 | spin_unlock(&oi->ip_lock); |
780 | 785 | ||
@@ -788,8 +793,8 @@ bail: | |||
788 | static void ocfs2_cleanup_delete_inode(struct inode *inode, | 793 | static void ocfs2_cleanup_delete_inode(struct inode *inode, |
789 | int sync_data) | 794 | int sync_data) |
790 | { | 795 | { |
791 | mlog(0, "Cleanup inode %"MLFu64", sync = %d\n", | 796 | mlog(0, "Cleanup inode %llu, sync = %d\n", |
792 | OCFS2_I(inode)->ip_blkno, sync_data); | 797 | (unsigned long long)OCFS2_I(inode)->ip_blkno, sync_data); |
793 | if (sync_data) | 798 | if (sync_data) |
794 | write_inode_now(inode, 1); | 799 | write_inode_now(inode, 1); |
795 | truncate_inode_pages(&inode->i_data, 0); | 800 | truncate_inode_pages(&inode->i_data, 0); |
@@ -897,8 +902,8 @@ void ocfs2_clear_inode(struct inode *inode) | |||
897 | if (!inode) | 902 | if (!inode) |
898 | goto bail; | 903 | goto bail; |
899 | 904 | ||
900 | mlog(0, "Clearing inode: %"MLFu64", nlink = %u\n", | 905 | mlog(0, "Clearing inode: %llu, nlink = %u\n", |
901 | OCFS2_I(inode)->ip_blkno, inode->i_nlink); | 906 | (unsigned long long)OCFS2_I(inode)->ip_blkno, inode->i_nlink); |
902 | 907 | ||
903 | mlog_bug_on_msg(OCFS2_SB(inode->i_sb) == NULL, | 908 | mlog_bug_on_msg(OCFS2_SB(inode->i_sb) == NULL, |
904 | "Inode=%lu\n", inode->i_ino); | 909 | "Inode=%lu\n", inode->i_ino); |
@@ -919,8 +924,8 @@ void ocfs2_clear_inode(struct inode *inode) | |||
919 | ocfs2_checkpoint_inode(inode); | 924 | ocfs2_checkpoint_inode(inode); |
920 | 925 | ||
921 | mlog_bug_on_msg(!list_empty(&oi->ip_io_markers), | 926 | mlog_bug_on_msg(!list_empty(&oi->ip_io_markers), |
922 | "Clear inode of %"MLFu64", inode has io markers\n", | 927 | "Clear inode of %llu, inode has io markers\n", |
923 | oi->ip_blkno); | 928 | (unsigned long long)oi->ip_blkno); |
924 | 929 | ||
925 | ocfs2_extent_map_drop(inode, 0); | 930 | ocfs2_extent_map_drop(inode, 0); |
926 | ocfs2_extent_map_init(inode); | 931 | ocfs2_extent_map_init(inode); |
@@ -936,20 +941,20 @@ void ocfs2_clear_inode(struct inode *inode) | |||
936 | ocfs2_metadata_cache_purge(inode); | 941 | ocfs2_metadata_cache_purge(inode); |
937 | 942 | ||
938 | mlog_bug_on_msg(oi->ip_metadata_cache.ci_num_cached, | 943 | mlog_bug_on_msg(oi->ip_metadata_cache.ci_num_cached, |
939 | "Clear inode of %"MLFu64", inode has %u cache items\n", | 944 | "Clear inode of %llu, inode has %u cache items\n", |
940 | oi->ip_blkno, oi->ip_metadata_cache.ci_num_cached); | 945 | (unsigned long long)oi->ip_blkno, oi->ip_metadata_cache.ci_num_cached); |
941 | 946 | ||
942 | mlog_bug_on_msg(!(oi->ip_flags & OCFS2_INODE_CACHE_INLINE), | 947 | mlog_bug_on_msg(!(oi->ip_flags & OCFS2_INODE_CACHE_INLINE), |
943 | "Clear inode of %"MLFu64", inode has a bad flag\n", | 948 | "Clear inode of %llu, inode has a bad flag\n", |
944 | oi->ip_blkno); | 949 | (unsigned long long)oi->ip_blkno); |
945 | 950 | ||
946 | mlog_bug_on_msg(spin_is_locked(&oi->ip_lock), | 951 | mlog_bug_on_msg(spin_is_locked(&oi->ip_lock), |
947 | "Clear inode of %"MLFu64", inode is locked\n", | 952 | "Clear inode of %llu, inode is locked\n", |
948 | oi->ip_blkno); | 953 | (unsigned long long)oi->ip_blkno); |
949 | 954 | ||
950 | mlog_bug_on_msg(!mutex_trylock(&oi->ip_io_mutex), | 955 | mlog_bug_on_msg(!mutex_trylock(&oi->ip_io_mutex), |
951 | "Clear inode of %"MLFu64", io_mutex is locked\n", | 956 | "Clear inode of %llu, io_mutex is locked\n", |
952 | oi->ip_blkno); | 957 | (unsigned long long)oi->ip_blkno); |
953 | mutex_unlock(&oi->ip_io_mutex); | 958 | mutex_unlock(&oi->ip_io_mutex); |
954 | 959 | ||
955 | /* | 960 | /* |
@@ -957,19 +962,19 @@ void ocfs2_clear_inode(struct inode *inode) | |||
957 | * kernel 1, world 0 | 962 | * kernel 1, world 0 |
958 | */ | 963 | */ |
959 | mlog_bug_on_msg(!down_write_trylock(&oi->ip_alloc_sem), | 964 | mlog_bug_on_msg(!down_write_trylock(&oi->ip_alloc_sem), |
960 | "Clear inode of %"MLFu64", alloc_sem is locked\n", | 965 | "Clear inode of %llu, alloc_sem is locked\n", |
961 | oi->ip_blkno); | 966 | (unsigned long long)oi->ip_blkno); |
962 | up_write(&oi->ip_alloc_sem); | 967 | up_write(&oi->ip_alloc_sem); |
963 | 968 | ||
964 | mlog_bug_on_msg(oi->ip_open_count, | 969 | mlog_bug_on_msg(oi->ip_open_count, |
965 | "Clear inode of %"MLFu64" has open count %d\n", | 970 | "Clear inode of %llu has open count %d\n", |
966 | oi->ip_blkno, oi->ip_open_count); | 971 | (unsigned long long)oi->ip_blkno, oi->ip_open_count); |
967 | mlog_bug_on_msg(!list_empty(&oi->ip_handle_list), | 972 | mlog_bug_on_msg(!list_empty(&oi->ip_handle_list), |
968 | "Clear inode of %"MLFu64" has non empty handle list\n", | 973 | "Clear inode of %llu has non empty handle list\n", |
969 | oi->ip_blkno); | 974 | (unsigned long long)oi->ip_blkno); |
970 | mlog_bug_on_msg(oi->ip_handle, | 975 | mlog_bug_on_msg(oi->ip_handle, |
971 | "Clear inode of %"MLFu64" has non empty handle pointer\n", | 976 | "Clear inode of %llu has non empty handle pointer\n", |
972 | oi->ip_blkno); | 977 | (unsigned long long)oi->ip_blkno); |
973 | 978 | ||
974 | /* Clear all other flags. */ | 979 | /* Clear all other flags. */ |
975 | oi->ip_flags = OCFS2_INODE_CACHE_INLINE; | 980 | oi->ip_flags = OCFS2_INODE_CACHE_INLINE; |
@@ -991,8 +996,8 @@ void ocfs2_drop_inode(struct inode *inode) | |||
991 | 996 | ||
992 | mlog_entry_void(); | 997 | mlog_entry_void(); |
993 | 998 | ||
994 | mlog(0, "Drop inode %"MLFu64", nlink = %u, ip_flags = 0x%x\n", | 999 | mlog(0, "Drop inode %llu, nlink = %u, ip_flags = 0x%x\n", |
995 | oi->ip_blkno, inode->i_nlink, oi->ip_flags); | 1000 | (unsigned long long)oi->ip_blkno, inode->i_nlink, oi->ip_flags); |
996 | 1001 | ||
997 | /* Testing ip_orphaned_slot here wouldn't work because we may | 1002 | /* Testing ip_orphaned_slot here wouldn't work because we may |
998 | * not have gotten a delete_inode vote from any other nodes | 1003 | * not have gotten a delete_inode vote from any other nodes |
@@ -1069,8 +1074,8 @@ int ocfs2_inode_revalidate(struct dentry *dentry) | |||
1069 | struct inode *inode = dentry->d_inode; | 1074 | struct inode *inode = dentry->d_inode; |
1070 | int status = 0; | 1075 | int status = 0; |
1071 | 1076 | ||
1072 | mlog_entry("(inode = 0x%p, ino = %"MLFu64")\n", inode, | 1077 | mlog_entry("(inode = 0x%p, ino = %llu)\n", inode, |
1073 | inode ? OCFS2_I(inode)->ip_blkno : 0ULL); | 1078 | inode ? (unsigned long long)OCFS2_I(inode)->ip_blkno : 0ULL); |
1074 | 1079 | ||
1075 | if (!inode) { | 1080 | if (!inode) { |
1076 | mlog(0, "eep, no inode!\n"); | 1081 | mlog(0, "eep, no inode!\n"); |
@@ -1114,7 +1119,8 @@ int ocfs2_mark_inode_dirty(struct ocfs2_journal_handle *handle, | |||
1114 | int status; | 1119 | int status; |
1115 | struct ocfs2_dinode *fe = (struct ocfs2_dinode *) bh->b_data; | 1120 | struct ocfs2_dinode *fe = (struct ocfs2_dinode *) bh->b_data; |
1116 | 1121 | ||
1117 | mlog_entry("(inode %"MLFu64")\n", OCFS2_I(inode)->ip_blkno); | 1122 | mlog_entry("(inode %llu)\n", |
1123 | (unsigned long long)OCFS2_I(inode)->ip_blkno); | ||
1118 | 1124 | ||
1119 | status = ocfs2_journal_access(handle, inode, bh, | 1125 | status = ocfs2_journal_access(handle, inode, bh, |
1120 | OCFS2_JOURNAL_ACCESS_WRITE); | 1126 | OCFS2_JOURNAL_ACCESS_WRITE); |