public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Nandwrite's behavior in case of write failure
@ 2009-06-05  1:23 Nahor
  2009-06-05 12:31 ` Artem Bityutskiy
  0 siblings, 1 reply; 7+ messages in thread
From: Nahor @ 2009-06-05  1:23 UTC (permalink / raw)
  To: linux-mtd

Hi,

If the call to pwrite fails, nanwrite tries first to erase the block 
then to mark it as bad. If erase fails, nandwrite aborts. If setting the 
bad block flag fails, nandwrite just ignores it and go to the next block.

My questions are:
- Why erase the block?
- Probably linked to the first question, why abort if erase fails? Why 
not just ignore it and rely on the bad block flag?
- Why ignore the bad block flag error? If nandwrite can't set it and 
just goes on, the caller (app ou user) will think that everything is 
good. But when reading the partition later, the user will garbage when 
reaching that page.


Thanks,
	Nahor

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-06-09 13:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-05  1:23 Nandwrite's behavior in case of write failure Nahor
2009-06-05 12:31 ` Artem Bityutskiy
2009-06-06  2:40   ` Nahor
2009-06-07  8:57     ` Artem Bityutskiy
2009-06-08 17:00       ` Nahor
2009-06-08 20:43       ` Jehan Bing
2009-06-09 12:59         ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox