From: Lukas Czerner <lczerner@redhat.com>
To: linux-ext4@vger.kernel.org
Cc: tytso@mit.edu, achender@linux.vnet.ibm.com,
Lukas Czerner <lczerner@redhat.com>
Subject: [PATCH 3/3] ext4: Give more helpful error message in ext4_ext_rm_leaf()
Date: Fri, 2 Mar 2012 11:26:03 +0100 [thread overview]
Message-ID: <1330683963-15791-3-git-send-email-lczerner@redhat.com> (raw)
In-Reply-To: <1330683963-15791-1-git-send-email-lczerner@redhat.com>
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>
---
fs/ext4/extents.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index f773e5f..a7c2c4c 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -2364,8 +2364,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\n",
+ start, end, ex_ee_block,
+ ex_ee_block + ex_ee_len - 1);
err = -EIO;
goto out;
} else if (a != ex_ee_block) {
--
1.7.4.4
next prev parent reply other threads:[~2012-03-02 10:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-02 10:26 [PATCH 1/3] ext4: Rewrite punch hole to use ext4_ext_remove_space() Lukas Czerner
2012-03-02 10:26 ` [PATCH 2/3] ext4: Remove unused code from ext4_ext_map_blocks() Lukas Czerner
2012-03-02 10:26 ` Lukas Czerner [this message]
2012-03-06 4:52 ` [PATCH 1/3] ext4: Rewrite punch hole to use ext4_ext_remove_space() Allison Henderson
2012-03-06 7:29 ` Lukas Czerner
2012-03-07 6:11 ` Allison Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1330683963-15791-3-git-send-email-lczerner@redhat.com \
--to=lczerner@redhat.com \
--cc=achender@linux.vnet.ibm.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).