public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Matthew Reimer <mreimer@vpop.net>
To: "Jörn Engel" <joern@logfs.org>
Cc: linux-mtd@lists.infradead.org, Matt Reimer <mattjreimer@gmail.com>
Subject: Re: [PATCH] MTD: treat any negative return value from correct() as an error
Date: Sat, 20 Oct 2007 10:59:36 -0700	[thread overview]
Message-ID: <1192903176.6230.8.camel@bilbo.vpop.net> (raw)
In-Reply-To: <20071020174006.GA1520@lazybastard.org>

On Sat, 2007-10-20 at 19:40 +0200, Jörn Engel wrote:
> 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?

I'll do it, if the next couple of days is soon enough. I'd rather keep
you free to work on LogFS. :-)

Matt

      reply	other threads:[~2007-10-20 18:00 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
2007-10-20 17:59       ` Matthew Reimer [this message]

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=1192903176.6230.8.camel@bilbo.vpop.net \
    --to=mreimer@vpop.net \
    --cc=joern@logfs.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=mattjreimer@gmail.com \
    /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