From: =?iso-8859-1?q?Albrecht_Dre=DF?= Subject: VFAT: slow fs corruption? [long] Date: Wed, 18 Apr 2007 19:58:40 +0200 Message-ID: <1176919129l.3289l.0l@antares.localdomain> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; protocol="application/pgp-signature"; boundary="=-6IG6XVtCkIOaWrGeeyqk" To: linux-fsdevel@vger.kernel.org Return-path: Received: from smtp3.netcologne.de ([194.8.194.66]:44820 "EHLO smtp3.netcologne.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753863AbXDRSRJ (ORCPT ); Wed, 18 Apr 2007 14:17:09 -0400 Received: from antares.localdomain (xdsl-87-79-223-136.netcologne.de [87.79.223.136]) by smtp3.netcologne.de (Postfix) with ESMTP id 4C3D7691AF for ; Wed, 18 Apr 2007 19:58:52 +0200 (CEST) Received: from antares.localdomain (localhost [127.0.0.1]) by antares.localdomain (Postfix) with ESMTP id 4AC6D28577 for ; Wed, 18 Apr 2007 19:58:51 +0200 (CEST) Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org --=-6IG6XVtCkIOaWrGeeyqk Content-Type: text/plain; charset=iso-8859-1; DelSp=Yes; Format=Flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi all, first, please excuse me if this is a very dump question... I use Linux (inter alia) on an ARM9 system which is attached to a =20 measurement device. The device produces a new data set of ~10 kByte about = =20 every 20 seconds, and the ARM system stores the data on a 1GB SD card =20 attached to it. The kernel is unfortunately rather old - 2.6.11, =20 including several vendor (Digi) supplied drivers. I didn't have time yet =20 to port them all to a recent kernel. My first approach was to use the SD card with a VFAT file system on it, as = =20 such cards usually come pre-formatted with it and as the VFAT cluster size = =20 of 16k matches the erase block size of the card, which should help its =20 built-in wear leveller to do its job. After some time, though, I noticed that several files with measurement =20 data were empty, although the directory indicated that they were not. The = =20 system was not switched off, and I always call sync() after producing a =20 new file. Running dosfsck on the file system, I got several errors like File size is 13978 bytes, cluster chain length is 0 bytes. Truncating file to 0 bytes. or Cluster 0 out of range (4849729 > 247450). Setting to EOF. Orphaned long file name part "5d" My first idea was that the (Digi supplied) MMC driver is somewhat broken. = =20 Just to check that, I re-formatted the SD card with ext2, and ran the test = =20 again - and all files looked fine! Called "e2fsck -f" - no problems with =20 the file system. That seems to indicate that the MMC layer /does/ =20 actually work. Questions: - Is the conclusion correct that the problem seems to be in the VFAT part, = =20 not in the MMC layer? - Are there known issues with VFAT in 2.6.11 which might lead to the =20 observed problems? Were they fixed? - Is it possible to change the block size in ext2 to 16k (to match the SD =20 card's erase block size)? Thanks in advance for any help, Cheers, Albrecht. -- Albrecht Dre=DF - Johanna-Kirchner-Stra=DFe 13 - D-53123 Bonn (German= y) Phone (+49) 228 6199571 - mailto:albrecht.dress@arcor.de GnuPG public key: http://www.mynetcologne.de/~nc-dreszal/pubkey.asc --=-6IG6XVtCkIOaWrGeeyqk Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQBGJlxZn/9unNAn/9ERAhXMAJ9WcVGrjwDINipvusWWomtZCUsdeQCgtIRo GolsFZ21o4NPWKVqqMA4UUY= =5W0i -----END PGP SIGNATURE----- --=-6IG6XVtCkIOaWrGeeyqk--