Question about mtdblock.c
Ezequiel Garcia
ezequiel.garcia at free-electrons.com
Fri Apr 26 07:45:13 EDT 2013
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
More information about the linux-mtd
mailing list