From c1ce99c2dfec664e93e87eb5e3b1e773f07e8e28 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Sun, 19 Apr 2009 13:02:41 +0100 Subject: [PATCH] --- yaml --- r: 147775 b: refs/heads/master c: 163e783e6a8b1e8bcb4c9084d438091386b589df h: refs/heads/master i: 147773: 49a374d9e08f8a6e435ce3a34d73c1e0b20e3938 147771: b520f32ee46d726529d45331612e42c4a5cecc35 147767: f241b756f310a329b8aeb75427199d0442a20456 147759: 38654aa32ccef1ae32e7e6e01f05f838985d6d35 147743: 2b32fe2fb22b24b05f2226ac54af024f4890f341 147711: fb128f46dc04be4f1555bf0614ce5f1f07d3a7c1 v: v3 --- [refs] | 2 +- trunk/fs/btrfs/crc32c.h | 29 ----------------------------- trunk/fs/btrfs/disk-io.c | 4 ++-- trunk/fs/btrfs/extent-tree.c | 7 +++---- trunk/fs/btrfs/hash.h | 4 ++-- 5 files changed, 8 insertions(+), 38 deletions(-) delete mode 100644 trunk/fs/btrfs/crc32c.h diff --git a/[refs] b/[refs] index 02d21345193a..19b75688ff72 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6cbff00f4632c8060b06bfc9585805217f11e12e +refs/heads/master: 163e783e6a8b1e8bcb4c9084d438091386b589df diff --git a/trunk/fs/btrfs/crc32c.h b/trunk/fs/btrfs/crc32c.h deleted file mode 100644 index 6e1b3de36700..000000000000 --- a/trunk/fs/btrfs/crc32c.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2008 Oracle. All rights reserved. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License v2 as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 021110-1307, USA. - */ - -#ifndef __BTRFS_CRC32C__ -#define __BTRFS_CRC32C__ -#include - -/* - * this file used to do more for selecting the HW version of crc32c, - * perhaps it will one day again soon. - */ -#define btrfs_crc32c(seed, data, length) crc32c(seed, data, length) -#endif - diff --git a/trunk/fs/btrfs/disk-io.c b/trunk/fs/btrfs/disk-io.c index f4dfbb7ab496..6c54c210dfd0 100644 --- a/trunk/fs/btrfs/disk-io.c +++ b/trunk/fs/btrfs/disk-io.c @@ -26,8 +26,8 @@ #include #include #include +#include #include "compat.h" -#include "crc32c.h" #include "ctree.h" #include "disk-io.h" #include "transaction.h" @@ -171,7 +171,7 @@ static struct extent_map *btree_get_extent(struct inode *inode, u32 btrfs_csum_data(struct btrfs_root *root, char *data, u32 seed, size_t len) { - return btrfs_crc32c(seed, data, len); + return crc32c(seed, data, len); } void btrfs_csum_final(u32 crc, char *result) diff --git a/trunk/fs/btrfs/extent-tree.c b/trunk/fs/btrfs/extent-tree.c index 3355d7ea8308..33a65f2c8a37 100644 --- a/trunk/fs/btrfs/extent-tree.c +++ b/trunk/fs/btrfs/extent-tree.c @@ -23,7 +23,6 @@ #include #include "compat.h" #include "hash.h" -#include "crc32c.h" #include "ctree.h" #include "disk-io.h" #include "print-tree.h" @@ -625,11 +624,11 @@ static u64 hash_extent_data_ref(u64 root_objectid, u64 owner, u64 offset) __le64 lenum; lenum = cpu_to_le64(root_objectid); - high_crc = btrfs_crc32c(high_crc, &lenum, sizeof(lenum)); + high_crc = crc32c(high_crc, &lenum, sizeof(lenum)); lenum = cpu_to_le64(owner); - low_crc = btrfs_crc32c(low_crc, &lenum, sizeof(lenum)); + low_crc = crc32c(low_crc, &lenum, sizeof(lenum)); lenum = cpu_to_le64(offset); - low_crc = btrfs_crc32c(low_crc, &lenum, sizeof(lenum)); + low_crc = crc32c(low_crc, &lenum, sizeof(lenum)); return ((u64)high_crc << 31) ^ (u64)low_crc; } diff --git a/trunk/fs/btrfs/hash.h b/trunk/fs/btrfs/hash.h index 2a020b276768..db2ff9773b99 100644 --- a/trunk/fs/btrfs/hash.h +++ b/trunk/fs/btrfs/hash.h @@ -19,9 +19,9 @@ #ifndef __HASH__ #define __HASH__ -#include "crc32c.h" +#include static inline u64 btrfs_name_hash(const char *name, int len) { - return btrfs_crc32c((u32)~1, name, len); + return crc32c((u32)~1, name, len); } #endif