lkml.org 
[lkml]   [2008]   [Mar]   [26]   [last100]   RSS Feed
Views: [more markup]   [less markup]   [headers]   [forward]  
 
Messages in this thread
/
SubjectRe: [PATCH 6/7] omfs: add checksumming routines
FromHarvey Harrison <>
DateWed, 26 Mar 2008 18:22:01 -0700
On Wed, 2008-03-26 at 20:45 -0400, Bob Copeland wrote:
> 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.
> + */

Why not just add a be-bitwise table, similar to the crc32_le and
crc32_be implementation.


Harvey

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2008-03-27 01:25    [W:0.340 / U:0.190 seconds]
©2003-2008 Jasper Spaans