From: "Jörn Engel" <joern@logfs.org>
To: Matt Reimer <mattjreimer@gmail.com>
Cc: "Jörn Engel" <joern@logfs.org>, "Matt Reimer" <mreimer@vpop.net>,
linux-mtd@lists.infradead.org
Subject: Re: [PATCH] MTD: treat any negative return value from correct() as an error
Date: Sat, 20 Oct 2007 19:40:06 +0200 [thread overview]
Message-ID: <20071020174006.GA1520@lazybastard.org> (raw)
In-Reply-To: <f383264b0710200937j25dd2c62pba1f39767c9ff9d8@mail.gmail.com>
On Sat, 20 October 2007 09:37:16 -0700, Matt Reimer wrote:
>
> My mistake: I did most of this analysis in the 2.6.21 code, where
> cafe_ecc.c:cafe_correct_ecc() did return -EIO, not diskonchip.
>
> But as for the rest of the description, I'm just reading the code
> that's there. An error return from ecc.correct bumps stats.failed,
> which in nand_do_read_ops does become -EBADMSG:
>
> if (mtd->ecc_stats.failed - stats.failed)
> return -EBADMSG;
>
> return mtd->ecc_stats.corrected - stats.corrected ? -EUCLEAN : 0;
>
> So I was just following what I found there, assuming it was standard practice.
Fair enough. Description aside, your patch, my two, plus your patch to
return -1 on uncorrectable ecc errors instead of 0 should be turned into
a patch series. Better yet, change your patch to return -EBADMSG.
Do you volunteer or should I do it?
Jörn
--
Data expands to fill the space available for storage.
-- Parkinson's Law
next prev parent reply other threads:[~2007-10-20 17:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-17 21:33 [PATCH] MTD: treat any negative return value from correct() as an error mattjreimer
2007-10-20 10:42 ` Jörn Engel
2007-10-20 11:11 ` [PATCH] BUG() when passing illegal parameters to decode_rs8() or decode_rs16() Jörn Engel
2007-10-20 11:13 ` [PATCH] Replace -1 with -EBADMSG in nand error correction code Jörn Engel
2007-10-21 8:08 ` Thomas Gleixner
2007-10-21 8:42 ` Jörn Engel
2007-10-21 8:04 ` [PATCH] BUG() when passing illegal parameters to decode_rs8() or decode_rs16() Thomas Gleixner
2007-10-21 8:06 ` Thomas Gleixner
2007-10-21 8:48 ` Jörn Engel
2007-10-20 16:37 ` [PATCH] MTD: treat any negative return value from correct() as an error Matt Reimer
2007-10-20 17:40 ` Jörn Engel [this message]
2007-10-20 17:59 ` Matthew Reimer
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=20071020174006.GA1520@lazybastard.org \
--to=joern@logfs.org \
--cc=linux-mtd@lists.infradead.org \
--cc=mattjreimer@gmail.com \
--cc=mreimer@vpop.net \
/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