From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org)
	by finch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-embedded+bounces-3415-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1Nws2i-0001qX-Mw
	for garchives@archives.gentoo.org; Wed, 31 Mar 2010 07:08:48 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 4B17AE0F6E
	for <garchives@archives.gentoo.org>; Wed, 31 Mar 2010 07:08:48 +0000 (UTC)
Received: from mail.hosting.lv (mail.hosting.lv [213.21.217.83])
	by pigeon.gentoo.org (Postfix) with ESMTP id 7AA3CE0E26
	for <gentoo-embedded@lists.gentoo.org>; Wed, 31 Mar 2010 06:34:48 +0000 (UTC)
Received: from saustari.wifi.basnet.lv ([87.246.143.137] helo=hal9000.mebius.lv)
	by mail.hosting.lv with esmtpsa (TLSv1:AES256-SHA:256)
	id 1NwrUq-00087q-9D; Wed, 31 Mar 2010 09:33:48 +0300
Message-ID: <4BB2ECC6.20804@gmail.com>
Date: Wed, 31 Mar 2010 09:33:42 +0300
From: Arkadi Shishlov <arkadi.shishlov@gmail.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100301 Fedora/3.0.3-1.fc12 Thunderbird/3.0.3
Precedence: bulk
List-Post: <mailto:gentoo-embedded@lists.gentoo.org>
List-Help: <mailto:gentoo-embedded+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-embedded+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-embedded+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-embedded.gentoo.org>
X-BeenThere: gentoo-embedded@lists.gentoo.org
Reply-to: gentoo-embedded@lists.gentoo.org
MIME-Version: 1.0
To: gentoo-embedded@lists.gentoo.org
Subject: Re: [gentoo-embedded] file system question
References: <20100329184215.539920eb@osage.osagesoftware.com>	<4BB1FC9B.9070804@hiramoto.org> <20100330204434.34c9dfe3@osage.osagesoftware.com>
In-Reply-To: <20100330204434.34c9dfe3@osage.osagesoftware.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Archives-Salt: 0ff4f5a2-ce6a-4172-b1d7-cc9bd6db466f
X-Archives-Hash: 5ef50b6ed66ec0ef20ae4e5c369b9698

On 03/31/10 03:44, David Relson wrote:
> The many suggestions have been very helpful.  This afternoon,
> 'sync' was added to fstab.  No problems have been seen since.
> While not conclusive, the indication is good and we're helpful.
> 
> The device in question is a medical device that continuously takes
> readings, graphs them, and every 30 seconds appends a 34 byte data
> record to each of two files.  It's not exactly disk intensive :->

Even with data amount is low, you're still looking at something like ~3 x16KB
(eraseblock, which could be significantly larger) number of erases cause some
data should be updated in place. I would be writing into one file with writes
aligned to flash pagesize.
If someone hits the power button while flash is working, sync won't help on
ext2. Backup power is present, why not to wire power button so that shutdown can
be signaled and emergency sync() is performed on filesystem...
While ext3 is mature, ext4 has journal checksums.

> FWIW, often the files hit by the "Stale NFS file handle" problem are
> symlinks in /usr/lib.  Since _nobody_ writes that directory it's odd
> that the problem often shows up there.  That's not the only place, but
> seems to be the most common one.

Weird errors may indicate toolchain problems with in errno.h not matching kernel
version.

> The power cord isn't a problem -- there's an onboard battery.  However
> the power button can be pressed at any time.  'Tis something that we'll
> live with.  Adding fsync() calls, in addition to 'sync' mounting, should
> help.

I believe it is same and you need only one method.