All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
To: Maarten Blomme <maartenblomme@gmail.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: Question about mtdblock.c
Date: Fri, 26 Apr 2013 08:45:13 -0300	[thread overview]
Message-ID: <20130426114512.GA10835@localhost> (raw)
In-Reply-To: <CABLyGt_OCcOya7TFYhxWypj6x8s_pp7bjzdyMonHe8ZcgY36Bw@mail.gmail.com>

On Fri, Apr 26, 2013 at 09:52:37AM +0200, Maarten Blomme wrote:
> Hello,
> 
> I have a question about mtdblock.c, is this the right place to ask it?
> 
> My question is about the usage of the return value of
> write_cached_data in mtdblock_flush and mtdblock_release. The return
> value is not used in those functions. What could be the reason for
> that?
> 
> I have a problem in my code where I flush the data, but the flush does
> not fail if the flush did not work (because of a bad NAND flash
> sector). As far as I understand the mtdblock.c code, this could be
> fixed by using the return value of write_cached_data.
> 

Mmm... that seem to be the case. And adding the checks makes your use
case work (i.e. detect the failure)?

In that case you might try to send a patch fixing mtdblock to check
for write_cached_data failure.
-- 
Ezequiel García, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com

      reply	other threads:[~2013-04-26 11:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-26  7:52 Question about mtdblock.c Maarten Blomme
2013-04-26 11:45 ` Ezequiel Garcia [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=20130426114512.GA10835@localhost \
    --to=ezequiel.garcia@free-electrons.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=maartenblomme@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.