public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2 ./WHATS_NEW lib/misc/crc.c
@ 2011-02-08 12:41 zkabelac
0 siblings, 0 replies; only message in thread
From: zkabelac @ 2011-02-08 12:41 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac@sourceware.org 2011-02-08 12:41:08
Modified files:
. : WHATS_NEW
lib/misc : crc.c
Log message:
Fix CRC32 calculation on big endian CPU
Fix regresion from 2.02.75 speedup - so currently crc32 is a little bit
more complicated on big-endian CPU as the uint32_t needs to be shifted
on here.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1908&r2=1.1909
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/misc/crc.c.diff?cvsroot=lvm2&r1=1.9&r2=1.10
--- LVM2/WHATS_NEW 2011/02/04 22:46:18 1.1908
+++ LVM2/WHATS_NEW 2011/02/08 12:41:08 1.1909
@@ -1,5 +1,6 @@
Version 2.02.84 -
===================================
+ Fix CRC32 calculation on big endian CPU (2.02.75).
Version 2.02.83 - 4th February 2011
===================================
--- LVM2/lib/misc/crc.c 2010/10/25 13:36:09 1.9
+++ LVM2/lib/misc/crc.c 2011/02/08 12:41:08 1.10
@@ -16,6 +16,7 @@
#include "lib.h"
#include "crc.h"
+#include "xlate.h"
/* Calculate an endian-independent CRC of supplied buffer */
#ifndef DEBUG_CRC32
@@ -65,7 +66,7 @@
/* Process 4 bytes per iteration */
while (start < end) {
- crc = crc ^ *start++;
+ crc = crc ^ xlate32(*start++);
crc = crctab[crc & 0xff] ^ crc >> 8;
crc = crctab[crc & 0xff] ^ crc >> 8;
crc = crctab[crc & 0xff] ^ crc >> 8;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-02-08 12:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-08 12:41 LVM2 ./WHATS_NEW lib/misc/crc.c zkabelac
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).