* Question about mtdblock.c
@ 2013-04-26 7:52 Maarten Blomme
2013-04-26 11:45 ` Ezequiel Garcia
0 siblings, 1 reply; 2+ messages in thread
From: Maarten Blomme @ 2013-04-26 7:52 UTC (permalink / raw)
To: linux-mtd
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.
Thanks for listening!
best regards,
Maarten Blomme
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Question about mtdblock.c
2013-04-26 7:52 Question about mtdblock.c Maarten Blomme
@ 2013-04-26 11:45 ` Ezequiel Garcia
0 siblings, 0 replies; 2+ messages in thread
From: Ezequiel Garcia @ 2013-04-26 11:45 UTC (permalink / raw)
To: Maarten Blomme; +Cc: linux-mtd
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-04-26 11:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-26 7:52 Question about mtdblock.c Maarten Blomme
2013-04-26 11:45 ` Ezequiel Garcia
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox