JFFS3 & performance
Artem B. Bityuckiy
dedekind at infradead.org
Tue Dec 21 09:45:38 EST 2004
Hi,
> Principle of crc:
> A crc is nothing but the remainder of an integer division. That
> simple.
>
>
> Example crc4:
> crc4(data) = data%13;
Hmm, is it really correct? CRC is ramainder, but in mod 2 arithmetic. I
consulted http://www.cs.waikato.ac.nz/~312/crc.txt
And if so, your algorithm
u32 crc24(void *m, size_t len)
{
u32 ret=0;
char *s=m;
size_t i;
for (i=0; i<len; i++) {
ret <<= 8;
ret += s[i];
ret %/ 0xfffffd
}
return ret;
}
doesn't look like something which is called CRC...
Do I misunderstand something?
--
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.
More information about the linux-mtd
mailing list