aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/move_extent.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2010-05-16 21:00:00 -0400
committerTheodore Ts'o <tytso@mit.edu>2010-05-16 21:00:00 -0400
commit24676da469f50f433baa347845639662c561d1f6 (patch)
treeb4b8205f8b50376af286193d0dcbe76f2bc2d1e1 /fs/ext4/move_extent.c
parent2ed886852adfcb070bf350e66a0da0d98b2f3ab5 (diff)
ext4: Convert calls of ext4_error() to EXT4_ERROR_INODE()
EXT4_ERROR_INODE() tends to provide better error information and in a more consistent format. Some errors were not even identifying the inode or directory which was corrupted, which made them not very useful. Addresses-Google-Bug: #2507977 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/move_extent.c')
-rw-r--r--fs/ext4/move_extent.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c
index 82621a360932..b8b8ea1ceda8 100644
--- a/fs/ext4/move_extent.c
+++ b/fs/ext4/move_extent.c
@@ -530,7 +530,7 @@ mext_leaf_block(handle_t *handle, struct inode *orig_inode,
530 * new_ext |-------| 530 * new_ext |-------|
531 */ 531 */
532 if (le32_to_cpu(oext->ee_block) + oext_alen - 1 < new_ext_end) { 532 if (le32_to_cpu(oext->ee_block) + oext_alen - 1 < new_ext_end) {
533 ext4_error(orig_inode->i_sb, 533 EXT4_ERROR_INODE(orig_inode,
534 "new_ext_end(%u) should be less than or equal to " 534 "new_ext_end(%u) should be less than or equal to "
535 "oext->ee_block(%u) + oext_alen(%d) - 1", 535 "oext->ee_block(%u) + oext_alen(%d) - 1",
536 new_ext_end, le32_to_cpu(oext->ee_block), 536 new_ext_end, le32_to_cpu(oext->ee_block),
@@ -693,12 +693,12 @@ mext_replace_branches(handle_t *handle, struct inode *orig_inode,
693 while (1) { 693 while (1) {
694 /* The extent for donor must be found. */ 694 /* The extent for donor must be found. */
695 if (!dext) { 695 if (!dext) {
696 ext4_error(donor_inode->i_sb, 696 EXT4_ERROR_INODE(donor_inode,
697 "The extent for donor must be found"); 697 "The extent for donor must be found");
698 *err = -EIO; 698 *err = -EIO;
699 goto out; 699 goto out;
700 } else if (donor_off != le32_to_cpu(tmp_dext.ee_block)) { 700 } else if (donor_off != le32_to_cpu(tmp_dext.ee_block)) {
701 ext4_error(donor_inode->i_sb, 701 EXT4_ERROR_INODE(donor_inode,
702 "Donor offset(%u) and the first block of donor " 702 "Donor offset(%u) and the first block of donor "
703 "extent(%u) should be equal", 703 "extent(%u) should be equal",
704 donor_off, 704 donor_off,
@@ -1355,7 +1355,7 @@ ext4_move_extents(struct file *o_filp, struct file *d_filp,
1355 if (ret1 < 0) 1355 if (ret1 < 0)
1356 break; 1356 break;
1357 if (*moved_len > len) { 1357 if (*moved_len > len) {
1358 ext4_error(orig_inode->i_sb, 1358 EXT4_ERROR_INODE(orig_inode,
1359 "We replaced blocks too much! " 1359 "We replaced blocks too much! "
1360 "sum of replaced: %llu requested: %llu", 1360 "sum of replaced: %llu requested: %llu",
1361 *moved_len, len); 1361 *moved_len, len);