Subject: Re: PR# install/28656 (Re: new cf-card wont boot)
To: None <tech-kern@netbsd.org>
From: Wolfgang S. Rupprecht <wolfgang+gnus20041221T184617@dailyplanet.dontspam.wsrcc.com>
List: tech-kern
Date: 12/21/2004 19:07:13
dyoung@pobox.com (David Young) writes:
> My project uses Soekris (i386) boards with CF cards.  I don't know if this
> is related, but if I mount a normally read-only FFS filesystem read-write,
> create a non-empty file on the filesystem, remount read-only, and reboot,
> the file is truncated to zero length after reboot.  Sometimes, if I
> write a second file before remounting read-only, then the first file
> is not truncated, but the second is.  I cannot reproduce this bug with
> perfect reliability.

I've noticed what might be a related problem in a digital camera that
uses CF.  Some CF's act as if they have a small volatile cache and if
you pull the power too soon after a massive write, things get
scrambled.  This was observed on a 12x Lexar 256M CF flash in a Nikon
Coolpix 995 camera.  I turned the power switch off while the deletion
is taking place.  The firmware will correctly wait ~20 seconds for the
CF to signal it finished before actually killing the power.  When you
turn the power on, some of the deleted files are still there.  This
isn't the case if you wait a few extra seconds after the firmware says
it is done before turning the power off.

I don't know if remounting the flash "ro" causes a reset that
interferes with something the CF is doing, but it might be worth
checking.

-wolfgang