aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/inode.c
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2010-02-15 14:19:27 -0500
committerTheodore Ts'o <tytso@mit.edu>2010-02-15 14:19:27 -0500
commit12062dddda450976b129dcb1bacd91acaf4d8030 (patch)
treee64590b1147639cd3629f8a977b269410cd6bd13 /fs/ext4/inode.c
parentf710b4b96ba292dfed2153afc47e9063b0abfd89 (diff)
ext4: move __func__ into a macro for ext4_warning, ext4_error
Just a pet peeve of mine; we had a mishash of calls with either __func__ or "function_name" and the latter tends to get out of sync. I think it's easier to just hide the __func__ in a macro, and it'll be consistent from then on. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r--fs/ext4/inode.c43
1 files changed, 18 insertions, 25 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 3e530119d7f0..536067bcf75b 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -194,7 +194,7 @@ void ext4_delete_inode(struct inode *inode)
194 inode->i_size = 0; 194 inode->i_size = 0;
195 err = ext4_mark_inode_dirty(handle, inode); 195 err = ext4_mark_inode_dirty(handle, inode);
196 if (err) { 196 if (err) {
197 ext4_warning(inode->i_sb, __func__, 197 ext4_warning(inode->i_sb,
198 "couldn't mark inode dirty (err %d)", err); 198 "couldn't mark inode dirty (err %d)", err);
199 goto stop_handle; 199 goto stop_handle;
200 } 200 }
@@ -212,7 +212,7 @@ void ext4_delete_inode(struct inode *inode)
212 if (err > 0) 212 if (err > 0)
213 err = ext4_journal_restart(handle, 3); 213 err = ext4_journal_restart(handle, 3);
214 if (err != 0) { 214 if (err != 0) {
215 ext4_warning(inode->i_sb, __func__, 215 ext4_warning(inode->i_sb,
216 "couldn't extend journal (err %d)", err); 216 "couldn't extend journal (err %d)", err);
217 stop_handle: 217 stop_handle:
218 ext4_journal_stop(handle); 218 ext4_journal_stop(handle);
@@ -323,8 +323,7 @@ static int ext4_block_to_path(struct inode *inode,
323 offsets[n++] = i_block & (ptrs - 1); 323 offsets[n++] = i_block & (ptrs - 1);
324 final = ptrs; 324 final = ptrs;
325 } else { 325 } else {
326 ext4_warning(inode->i_sb, "ext4_block_to_path", 326 ext4_warning(inode->i_sb, "block %lu > max in inode %lu",
327 "block %lu > max in inode %lu",
328 i_block + direct_blocks + 327 i_block + direct_blocks +
329 indirect_blocks + double_blocks, inode->i_ino); 328 indirect_blocks + double_blocks, inode->i_ino);
330 } 329 }
@@ -344,7 +343,7 @@ static int __ext4_check_blockref(const char *function, struct inode *inode,
344 if (blk && 343 if (blk &&
345 unlikely(!ext4_data_block_valid(EXT4_SB(inode->i_sb), 344 unlikely(!ext4_data_block_valid(EXT4_SB(inode->i_sb),
346 blk, 1))) { 345 blk, 1))) {
347 ext4_error(inode->i_sb, function, 346 __ext4_error(inode->i_sb, function,
348 "invalid block reference %u " 347 "invalid block reference %u "
349 "in inode #%lu", blk, inode->i_ino); 348 "in inode #%lu", blk, inode->i_ino);
350 return -EIO; 349 return -EIO;
@@ -1125,7 +1124,7 @@ static int check_block_validity(struct inode *inode, const char *msg,
1125 sector_t logical, sector_t phys, int len) 1124 sector_t logical, sector_t phys, int len)
1126{ 1125{
1127 if (!ext4_data_block_valid(EXT4_SB(inode->i_sb), phys, len)) { 1126 if (!ext4_data_block_valid(EXT4_SB(inode->i_sb), phys, len)) {
1128 ext4_error(inode->i_sb, msg, 1127 __ext4_error(inode->i_sb, msg,
1129 "inode #%lu logical block %llu mapped to %llu " 1128 "inode #%lu logical block %llu mapped to %llu "
1130 "(size %d)", inode->i_ino, 1129 "(size %d)", inode->i_ino,
1131 (unsigned long long) logical, 1130 (unsigned long long) logical,
@@ -4147,7 +4146,7 @@ static int ext4_clear_blocks(handle_t *handle, struct inode *inode,
4147 4146
4148 if (!ext4_data_block_valid(EXT4_SB(inode->i_sb), block_to_free, 4147 if (!ext4_data_block_valid(EXT4_SB(inode->i_sb), block_to_free,
4149 count)) { 4148 count)) {
4150 ext4_error(inode->i_sb, __func__, "inode #%lu: " 4149 ext4_error(inode->i_sb, "inode #%lu: "
4151 "attempt to clear blocks %llu len %lu, invalid", 4150 "attempt to clear blocks %llu len %lu, invalid",
4152 inode->i_ino, (unsigned long long) block_to_free, 4151 inode->i_ino, (unsigned long long) block_to_free,
4153 count); 4152 count);
@@ -4255,7 +4254,7 @@ static void ext4_free_data(handle_t *handle, struct inode *inode,
4255 if ((EXT4_JOURNAL(inode) == NULL) || bh2jh(this_bh)) 4254 if ((EXT4_JOURNAL(inode) == NULL) || bh2jh(this_bh))
4256 ext4_handle_dirty_metadata(handle, inode, this_bh); 4255 ext4_handle_dirty_metadata(handle, inode, this_bh);
4257 else 4256 else
4258 ext4_error(inode->i_sb, __func__, 4257 ext4_error(inode->i_sb,
4259 "circular indirect block detected, " 4258 "circular indirect block detected, "
4260 "inode=%lu, block=%llu", 4259 "inode=%lu, block=%llu",
4261 inode->i_ino, 4260 inode->i_ino,
@@ -4297,7 +4296,7 @@ static void ext4_free_branches(handle_t *handle, struct inode *inode,
4297 4296
4298 if (!ext4_data_block_valid(EXT4_SB(inode->i_sb), 4297 if (!ext4_data_block_valid(EXT4_SB(inode->i_sb),
4299 nr, 1)) { 4298 nr, 1)) {
4300 ext4_error(inode->i_sb, __func__, 4299 ext4_error(inode->i_sb,
4301 "indirect mapped block in inode " 4300 "indirect mapped block in inode "
4302 "#%lu invalid (level %d, blk #%lu)", 4301 "#%lu invalid (level %d, blk #%lu)",
4303 inode->i_ino, depth, 4302 inode->i_ino, depth,
@@ -4313,7 +4312,7 @@ static void ext4_free_branches(handle_t *handle, struct inode *inode,
4313 * (should be rare). 4312 * (should be rare).
4314 */ 4313 */
4315 if (!bh) { 4314 if (!bh) {
4316 ext4_error(inode->i_sb, "ext4_free_branches", 4315 ext4_error(inode->i_sb,
4317 "Read failure, inode=%lu, block=%llu", 4316 "Read failure, inode=%lu, block=%llu",
4318 inode->i_ino, nr); 4317 inode->i_ino, nr);
4319 continue; 4318 continue;
@@ -4628,9 +4627,8 @@ static int __ext4_get_inode_loc(struct inode *inode,
4628 4627
4629 bh = sb_getblk(sb, block); 4628 bh = sb_getblk(sb, block);
4630 if (!bh) { 4629 if (!bh) {
4631 ext4_error(sb, "ext4_get_inode_loc", "unable to read " 4630 ext4_error(sb, "unable to read inode block - "
4632 "inode block - inode=%lu, block=%llu", 4631 "inode=%lu, block=%llu", inode->i_ino, block);
4633 inode->i_ino, block);
4634 return -EIO; 4632 return -EIO;
4635 } 4633 }
4636 if (!buffer_uptodate(bh)) { 4634 if (!buffer_uptodate(bh)) {
@@ -4728,9 +4726,8 @@ make_io:
4728 submit_bh(READ_META, bh); 4726 submit_bh(READ_META, bh);
4729 wait_on_buffer(bh); 4727 wait_on_buffer(bh);
4730 if (!buffer_uptodate(bh)) { 4728 if (!buffer_uptodate(bh)) {
4731 ext4_error(sb, __func__, 4729 ext4_error(sb, "unable to read inode block - inode=%lu,"
4732 "unable to read inode block - inode=%lu, " 4730 " block=%llu", inode->i_ino, block);
4733 "block=%llu", inode->i_ino, block);
4734 brelse(bh); 4731 brelse(bh);
4735 return -EIO; 4732 return -EIO;
4736 } 4733 }
@@ -4941,8 +4938,7 @@ struct inode *ext4_iget(struct super_block *sb, unsigned long ino)
4941 ret = 0; 4938 ret = 0;
4942 if (ei->i_file_acl && 4939 if (ei->i_file_acl &&
4943 !ext4_data_block_valid(EXT4_SB(sb), ei->i_file_acl, 1)) { 4940 !ext4_data_block_valid(EXT4_SB(sb), ei->i_file_acl, 1)) {
4944 ext4_error(sb, __func__, 4941 ext4_error(sb, "bad extended attribute block %llu inode #%lu",
4945 "bad extended attribute block %llu in inode #%lu",
4946 ei->i_file_acl, inode->i_ino); 4942 ei->i_file_acl, inode->i_ino);
4947 ret = -EIO; 4943 ret = -EIO;
4948 goto bad_inode; 4944 goto bad_inode;
@@ -4988,8 +4984,7 @@ struct inode *ext4_iget(struct super_block *sb, unsigned long ino)
4988 new_decode_dev(le32_to_cpu(raw_inode->i_block[1]))); 4984 new_decode_dev(le32_to_cpu(raw_inode->i_block[1])));
4989 } else { 4985 } else {
4990 ret = -EIO; 4986 ret = -EIO;
4991 ext4_error(inode->i_sb, __func__, 4987 ext4_error(inode->i_sb, "bogus i_mode (%o) for inode=%lu",
4992 "bogus i_mode (%o) for inode=%lu",
4993 inode->i_mode, inode->i_ino); 4988 inode->i_mode, inode->i_ino);
4994 goto bad_inode; 4989 goto bad_inode;
4995 } 4990 }
@@ -5228,10 +5223,8 @@ int ext4_write_inode(struct inode *inode, int wait)
5228 if (wait) 5223 if (wait)
5229 sync_dirty_buffer(iloc.bh); 5224 sync_dirty_buffer(iloc.bh);
5230 if (buffer_req(iloc.bh) && !buffer_uptodate(iloc.bh)) { 5225 if (buffer_req(iloc.bh) && !buffer_uptodate(iloc.bh)) {
5231 ext4_error(inode->i_sb, __func__, 5226 ext4_error(inode->i_sb, "IO error syncing inode, "
5232 "IO error syncing inode, " 5227 "inode=%lu, block=%llu", inode->i_ino,
5233 "inode=%lu, block=%llu",
5234 inode->i_ino,
5235 (unsigned long long)iloc.bh->b_blocknr); 5228 (unsigned long long)iloc.bh->b_blocknr);
5236 err = -EIO; 5229 err = -EIO;
5237 } 5230 }
@@ -5644,7 +5637,7 @@ int ext4_mark_inode_dirty(handle_t *handle, struct inode *inode)
5644 EXT4_STATE_NO_EXPAND); 5637 EXT4_STATE_NO_EXPAND);
5645 if (mnt_count != 5638 if (mnt_count !=
5646 le16_to_cpu(sbi->s_es->s_mnt_count)) { 5639 le16_to_cpu(sbi->s_es->s_mnt_count)) {
5647 ext4_warning(inode->i_sb, __func__, 5640 ext4_warning(inode->i_sb,
5648 "Unable to expand inode %lu. Delete" 5641 "Unable to expand inode %lu. Delete"
5649 " some EAs or run e2fsck.", 5642 " some EAs or run e2fsck.",
5650 inode->i_ino); 5643 inode->i_ino);