* [PATCH] ext4: Note the error in ext4_end_bio()
@ 2014-04-02 14:35 Matthew Wilcox
2014-04-02 15:35 ` Theodore Ts'o
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Matthew Wilcox @ 2014-04-02 14:35 UTC (permalink / raw)
To: linux-ext4
ext4_end_bio() currently throws away the error that it receives. Chances
are this is part of a spate of errors, one of which will end up getting
the error returned to userspace somehow, but we shouldn't take that risk.
Also print out the errno to aid in debug.
Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
---
fs/ext4/page-io.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c
index ab95508..c18d95b 100644
--- a/fs/ext4/page-io.c
+++ b/fs/ext4/page-io.c
@@ -308,13 +308,14 @@ static void ext4_end_bio(struct bio *bio, int error)
if (error) {
struct inode *inode = io_end->inode;
- ext4_warning(inode->i_sb, "I/O error writing to inode %lu "
+ ext4_warning(inode->i_sb, "I/O error %d writing to inode %lu "
"(offset %llu size %ld starting block %llu)",
- inode->i_ino,
+ error, inode->i_ino,
(unsigned long long) io_end->offset,
(long) io_end->size,
(unsigned long long)
bi_sector >> (inode->i_blkbits - 9));
+ mapping_set_error(inode->i_mapping, error);
}
if (io_end->flag & EXT4_IO_END_UNWRITTEN) {
--
1.9.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ext4: Note the error in ext4_end_bio()
2014-04-02 14:35 [PATCH] ext4: Note the error in ext4_end_bio() Matthew Wilcox
@ 2014-04-02 15:35 ` Theodore Ts'o
2014-04-02 16:42 ` Jan Kara
2014-04-07 14:41 ` Theodore Ts'o
2 siblings, 0 replies; 4+ messages in thread
From: Theodore Ts'o @ 2014-04-02 15:35 UTC (permalink / raw)
To: Matthew Wilcox; +Cc: linux-ext4
On Wed, Apr 02, 2014 at 10:35:07AM -0400, Matthew Wilcox wrote:
>
> ext4_end_bio() currently throws away the error that it receives. Chances
> are this is part of a spate of errors, one of which will end up getting
> the error returned to userspace somehow, but we shouldn't take that risk.
> Also print out the errno to aid in debug.
>
> Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
Thanks, looks good. I'm currently doing test runs for the merge
window, so I'll pull this in a few days. This is a legitimate
stable-worthy bug-fix, so I'll try to push it to Linus in the second
round pull request for bug fix and regression fixes, sometime in rc3
or rc4.
Cheers,
- Ted
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ext4: Note the error in ext4_end_bio()
2014-04-02 14:35 [PATCH] ext4: Note the error in ext4_end_bio() Matthew Wilcox
2014-04-02 15:35 ` Theodore Ts'o
@ 2014-04-02 16:42 ` Jan Kara
2014-04-07 14:41 ` Theodore Ts'o
2 siblings, 0 replies; 4+ messages in thread
From: Jan Kara @ 2014-04-02 16:42 UTC (permalink / raw)
To: Matthew Wilcox; +Cc: linux-ext4
On Wed 02-04-14 10:35:07, Matthew Wilcox wrote:
>
> ext4_end_bio() currently throws away the error that it receives. Chances
> are this is part of a spate of errors, one of which will end up getting
> the error returned to userspace somehow, but we shouldn't take that risk.
> Also print out the errno to aid in debug.
The patch looks good. You can add:
Reviewed-by: Jan Kara <jack@suse.cz>
Honza
>
> Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
> ---
> fs/ext4/page-io.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c
> index ab95508..c18d95b 100644
> --- a/fs/ext4/page-io.c
> +++ b/fs/ext4/page-io.c
> @@ -308,13 +308,14 @@ static void ext4_end_bio(struct bio *bio, int error)
> if (error) {
> struct inode *inode = io_end->inode;
>
> - ext4_warning(inode->i_sb, "I/O error writing to inode %lu "
> + ext4_warning(inode->i_sb, "I/O error %d writing to inode %lu "
> "(offset %llu size %ld starting block %llu)",
> - inode->i_ino,
> + error, inode->i_ino,
> (unsigned long long) io_end->offset,
> (long) io_end->size,
> (unsigned long long)
> bi_sector >> (inode->i_blkbits - 9));
> + mapping_set_error(inode->i_mapping, error);
> }
>
> if (io_end->flag & EXT4_IO_END_UNWRITTEN) {
> --
> 1.9.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ext4: Note the error in ext4_end_bio()
2014-04-02 14:35 [PATCH] ext4: Note the error in ext4_end_bio() Matthew Wilcox
2014-04-02 15:35 ` Theodore Ts'o
2014-04-02 16:42 ` Jan Kara
@ 2014-04-07 14:41 ` Theodore Ts'o
2 siblings, 0 replies; 4+ messages in thread
From: Theodore Ts'o @ 2014-04-07 14:41 UTC (permalink / raw)
To: Matthew Wilcox; +Cc: linux-ext4
On Wed, Apr 02, 2014 at 10:35:07AM -0400, Matthew Wilcox wrote:
>
> ext4_end_bio() currently throws away the error that it receives. Chances
> are this is part of a spate of errors, one of which will end up getting
> the error returned to userspace somehow, but we shouldn't take that risk.
> Also print out the errno to aid in debug.
>
> Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
Thanks, applied.
- Ted
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-04-07 14:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-02 14:35 [PATCH] ext4: Note the error in ext4_end_bio() Matthew Wilcox
2014-04-02 15:35 ` Theodore Ts'o
2014-04-02 16:42 ` Jan Kara
2014-04-07 14:41 ` Theodore Ts'o
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).