ext4: give more helpful error message in ext4_ext_rm_leaf()
authorLukas Czerner <lczerner@redhat.com>
Tue, 20 Mar 2012 03:07:43 +0000 (23:07 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 20 Mar 2012 03:07:43 +0000 (23:07 -0400)
The error message produced by the ext4_ext_rm_leaf() when we are
removing blocks which accidentally ends up inside the existing extent,
is not very helpful, because we would like to also know which extent did
we collide with.

This commit changes the error message to get us also the information
about the extent we are colliding with.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/extents.c

index 9ac89b67104730f630c885ebe00b9e565da605a0..5c9c067abca06b92851d8a936226fc18e793882f 100644 (file)
@@ -2366,8 +2366,11 @@ ext4_ext_rm_leaf(handle_t *handle, struct inode *inode,
                        ex_ee_len = ext4_ext_get_actual_len(ex);
                        continue;
                } else if (b != ex_ee_block + ex_ee_len - 1) {
-                       EXT4_ERROR_INODE(inode,"  bad truncate %u:%u\n",
-                                        start, end);
+                       EXT4_ERROR_INODE(inode,
+                                        "can not handle truncate %u:%u "
+                                        "on extent %u:%u",
+                                        start, end, ex_ee_block,
+                                        ex_ee_block + ex_ee_len - 1);
                        err = -EIO;
                        goto out;
                } else if (a != ex_ee_block) {
This page took 0.027786 seconds and 5 git commands to generate.