From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.fh-wedel.de ([213.39.232.198] helo=moskovskaya.fh-wedel.de) by canuck.infradead.org with esmtps (Exim 4.42 #1 (Red Hat Linux)) id 1Cezow-0003Eb-2I for linux-mtd@lists.infradead.org; Thu, 16 Dec 2004 12:53:47 -0500 Date: Thu, 16 Dec 2004 18:53:31 +0100 From: =?iso-8859-1?Q?J=F6rn?= Engel To: Joakim Tjernlund Message-ID: <20041216175331.GA6788@wohnheim.fh-wedel.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Cc: Linux MTD mailing list Subject: Re: JFFS3 & performance List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Thu, 16 December 2004 15:45:00 +0100, Joakim Tjernlund wrote: > > On Thu, 16 Dec 2004, Joakim Tjernlund wrote: > > > > 2) Consider another checksum algorithm. Crc32 is very expensive > > > and JFFS2 suffered severely in the early days. Now that crc32 is > > > very optimized that problem is less visible, but crc32 is still > > > expensive. Maybe an Adler32 checksum is good enough or a crc16? > > IMHO, NAND/ECC NOR are additionally protected by ECCs so that sounds > > reasonable. NORs are reliable, so that is reasonable too, IMHO. > > Exactly. I'd vote against adler32 and in favor of crc16 or crc24. Crc24 would be slightly safer, but still much faster than crc33 (crc32 is a misnamer, actually). Code should be something like this for crc24: u32 crc24(void *m, size_t len) { u32 ret=0; char *s=m; size_t i; for (i=0; i