All of lore.kernel.org
 help / color / mirror / Atom feed
* how does 'mv' command work in jffs2/NAND
@ 2008-12-17  0:01 Manu Rao
  0 siblings, 0 replies; only message in thread
From: Manu Rao @ 2008-12-17  0:01 UTC (permalink / raw)
  To: linux-mtd


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 has a length of
zero. My conjecture was that this had to do with the write-buffering,
and when I add a sync after the move, I don't see the problem anymore.

My boss, whose a hardware guy, insists that if we have a FileA that is
being replaced with a FileB, we should always have access to either
FileA or FileB, and that agrees with how I thought JFFS2 worked. 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
PS: Please ignore previous posting without subject.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-12-17  0:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-17  0:01 how does 'mv' command work in jffs2/NAND Manu Rao

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.