Subject: Re: file truncated to zero length after reboot
To: Charles M. Hannum <abuse@spamalicious.com>
From: Lubomir Sedlacik <salo@Xtrmntr.org>
List: tech-kern
Date: 12/22/2004 12:09:24
--XRwESHC7KXlqFpSs
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Dec 22, 2004 at 03:58:10AM +0000, Charles M. Hannum wrote:
> On Wednesday 22 December 2004 00:33, David Young wrote:
> > On Wed, Dec 22, 2004 at 12:20:38AM +0000, Charles M. Hannum wrote:
> > > On Wednesday 22 December 2004 00:08, David Young wrote:
> > > > 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.
> > >
> > > No, this is totally unrelated.
> >
> > Do know what causes it?
>=20
> Remounting from r-w to r-o has always been a little scary, but around
> the time softdep went in, it became quite unreliable without doing a
> sync(8) first.  I'm not sure whether it's only with softdep or not,
> but I've seen this *exact* symptom on a hard disk before.

see also the "FFS update doesn't sync metadata?" thread on tech-kern
from Dec 05: http://news.gw.com/netbsd.tech.kern/30528


regards,

--=20
-- Lubomir Sedlacik <salo@{NetBSD,Xtrmntr,silcnet}.org>   --

--XRwESHC7KXlqFpSs
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)

iD8DBQFByVXkiwjDDlS8cmMRAuGwAJ9lxMC7WyjF26L4gpI5YjubL34wzACfUrMP
lmLJ/fdds2g9AOJeVU8JWSk=
=LD2I
-----END PGP SIGNATURE-----

--XRwESHC7KXlqFpSs--