public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Data loss on unclean powercycle with JFFS2/NAND
@ 2008-12-18  0:48 Manu Rao
  2008-12-18  4:43 ` [linux-users-list] " Joseph Cheek
  2008-12-19 17:46 ` Kootsookos, Peter J       UTCFS
  0 siblings, 2 replies; 4+ messages in thread
From: Manu Rao @ 2008-12-18  0:48 UTC (permalink / raw)
  To: linux-mtd, linux-users-list


We have an embedded system with ARM9, running linux 2.6.22 and jffs2 on
Samsung nand.
As part of our bootup process, we modify the /etc/inittab so that the
getty login screen is replaced with our application.

  if sed "/^#*T0/cT0:23:respawn:/sbin/getty -L -n -l /our_app/app ttyS0"
/etc/inittab > /etc/inittab_tmp; then
	mv /etc/inittab_tmp /etc/inittab

We have recently discovered units where the inittab suddenly becomes a
zero-length file. My conjecture was that this had to do with the
write-buffering, and when I add a sync after the move, it helps
somewhat.

The way I understood jffs2, if we have a FileA that is being replaced
with a FileB, we should always have access to either FileA or FileB. But
without any doubt, inittab is getting zeroed out.

How does a move in the Filesystem occur? How can the size become zero?

Any pointers appreciated.

Thanks
Manu Rao
San Jose, CA

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

end of thread, other threads:[~2008-12-19 17:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-18  0:48 Data loss on unclean powercycle with JFFS2/NAND Manu Rao
2008-12-18  4:43 ` [linux-users-list] " Joseph Cheek
2008-12-18 18:25   ` Manu Rao
2008-12-19 17:46 ` Kootsookos, Peter J       UTCFS

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