login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
March
»
27
Re: [PATCH 6/7] omfs: add checksumming routines
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [author]
[view in full thread]
From:
Sergey Vlasov <vsu@...>
To: Bob Copeland <me@...>
Cc: <linux-kernel@...>, <linux-fsdevel@...>
Subject:
Re: [PATCH 6/7] omfs: add checksumming routines
Date: Thursday, March 27, 2008 - 9:41 am
On Wed, 26 Mar 2008 20:45:59 -0400 Bob Copeland wrote:
quoted text
> OMFS checksums the metadata of all filesystem objects. This change adds > the necessary functions to do so. > > Signed-off-by: Bob Copeland <me@bobcopeland.com> > --- > fs/omfs/checksum.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ > 1 files changed, 48 insertions(+), 0 deletions(-) > create mode 100644 fs/omfs/checksum.c > > diff --git a/fs/omfs/checksum.c b/fs/omfs/checksum.c > new file mode 100644 > index 0000000..d6f1023 > --- /dev/null > +++ b/fs/omfs/checksum.c > @@ -0,0 +1,48 @@ > +#include <linux/fs.h> > +#include <linux/buffer_head.h> > +#include "omfs.h" > + > +#define POLY 0x1021 > + > +/* > + * crc-ccitt with MSB first (i.e., backwards), so we can't use the > + * kernel table as-is. > + */ > +static u16 omfs_crc(u16 crc, unsigned char *buf, int count) > +{ > + int i, j; > + for (i = 0; i < count; i++) { > + crc ^= buf[i] << 8; > + for (j = 0; j < 8; j++) > + crc = (crc << 1) ^ ((crc & 0x8000) ? POLY : 0); > + } > + return crc; > +}
Is this the same as crc_itu_t() from lib/crc-itu-t.c (also duplicated in fs/udf/crc.c)?
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [author]
Messages in current thread:
[PATCH 6/7] omfs: add checksumming routines
, Bob Copeland
, (Wed Mar 26, 8:45 pm)
Re: [PATCH 6/7] omfs: add checksumming routines
, Sergey Vlasov
, (Thu Mar 27, 9:41 am)
Re: [PATCH 6/7] omfs: add checksumming routines
, Bob Copeland
, (Sat Mar 29, 11:30 pm)
Re: [PATCH 6/7] omfs: add checksumming routines
, Bob Copeland
, (Thu Mar 27, 10:34 am)
Re: [PATCH 6/7] omfs: add checksumming routines
, Harvey Harrison
, (Wed Mar 26, 9:22 pm)
Re: [PATCH 6/7] omfs: add checksumming routines
, Bob Copeland
, (Thu Mar 27, 8:24 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
david
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Greg KH
[GIT PATCH] driver core patches against 2.6.24
Andrew Morton
Re: -mm merge plans for 2.6.23 (pcmcia)
Andi Kleen
[PATCH x86] [7/16] Convert lockdep to use arch_early_alloc() if available for its ...
git
:
linux-netdev
:
Gerrit Renker
[PATCH 15/37] dccp: Set per-connection CCIDs via socket options
David Miller
[GIT]: Networking
David Miller
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Frans Pop
svc: failed to register lockdv1 RPC service (errno 97).
netbsd-tech-kern
:
Havard Eidnes
namei caching of newly created files?
Marc Balmer
Support for multi-position electro-mechanical keylocks
Paul Goyette
Implement mode_select for atapi tape drives
Matthew Mondor
M:N and blocking ops without SA, AIO
Colocation donated by:
Who's online
There are currently
4 users
and
740 guests
online.
Online users
ez_wpthemes
cruiseshipsxuav
lookforpeopleu
cheapairpurivr
Syndicate