- dlm-use-jhash.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     dlm: use jhash

has been removed from the -mm tree.  Its filename is

     dlm-use-jhash.patch

This patch was probably dropped from -mm because
it has now been merged into a subsystem tree or
into Linus's tree, or because it was folded into
its parent patch in the -mm tree.


From: David Teigland <teigland@xxxxxxxxxx>

Use linux/jhash.h instead of our own hash function.

Signed-off-by: David Teigland <teigland@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
Cc: Steven Whitehouse <swhiteho@xxxxxxxxxx>
---

 drivers/dlm/dir.c          |    2 +-
 drivers/dlm/dlm_internal.h |    1 +
 drivers/dlm/lock.c         |    2 +-
 drivers/dlm/util.c         |   34 ----------------------------------
 drivers/dlm/util.h         |    2 --
 5 files changed, 3 insertions(+), 38 deletions(-)

diff -puN drivers/dlm/dir.c~dlm-use-jhash drivers/dlm/dir.c
--- 25/drivers/dlm/dir.c~dlm-use-jhash	Thu Jan 19 16:06:56 2006
+++ 25-akpm/drivers/dlm/dir.c	Thu Jan 19 16:06:56 2006
@@ -120,7 +120,7 @@ static inline uint32_t dir_hash(struct d
 {
 	uint32_t val;
 
-	val = dlm_hash(name, len);
+	val = jhash(name, len, 0);
 	val &= (ls->ls_dirtbl_size - 1);
 
 	return val;
diff -puN drivers/dlm/dlm_internal.h~dlm-use-jhash drivers/dlm/dlm_internal.h
--- 25/drivers/dlm/dlm_internal.h~dlm-use-jhash	Thu Jan 19 16:06:56 2006
+++ 25-akpm/drivers/dlm/dlm_internal.h	Thu Jan 19 16:06:56 2006
@@ -34,6 +34,7 @@
 #include <linux/kobject.h>
 #include <linux/kref.h>
 #include <linux/kernel.h>
+#include <linux/jhash.h>
 #include <asm/semaphore.h>
 #include <asm/uaccess.h>
 
diff -puN drivers/dlm/lock.c~dlm-use-jhash drivers/dlm/lock.c
--- 25/drivers/dlm/lock.c~dlm-use-jhash	Thu Jan 19 16:06:56 2006
+++ 25-akpm/drivers/dlm/lock.c	Thu Jan 19 16:06:56 2006
@@ -369,7 +369,7 @@ static int find_rsb(struct dlm_ls *ls, c
 	if (dlm_no_directory(ls))
 		flags |= R_CREATE;
 
-	hash = dlm_hash(name, namelen);
+	hash = jhash(name, namelen, 0);
 	bucket = hash & (ls->ls_rsbtbl_size - 1);
 
 	error = search_rsb(ls, name, namelen, bucket, flags, &r);
diff -puN drivers/dlm/util.c~dlm-use-jhash drivers/dlm/util.c
--- 25/drivers/dlm/util.c~dlm-use-jhash	Thu Jan 19 16:06:56 2006
+++ 25-akpm/drivers/dlm/util.c	Thu Jan 19 16:06:56 2006
@@ -13,40 +13,6 @@
 #include "dlm_internal.h"
 #include "rcom.h"
 
-/**
- * dlm_hash - hash an array of data
- * @data: the data to be hashed
- * @len: the length of data to be hashed
- *
- * Copied from GFS which copied from...
- *
- * Take some data and convert it to a 32-bit hash.
- * This is the 32-bit FNV-1a hash from:
- * http://www.isthe.com/chongo/tech/comp/fnv/
- */
-
-static inline uint32_t hash_more_internal(const void *data, unsigned int len,
-					  uint32_t hash)
-{
-	unsigned char *p = (unsigned char *)data;
-	unsigned char *e = p + len;
-	uint32_t h = hash;
-
-	while (p < e) {
-		h ^= (uint32_t)(*p++);
-		h *= 0x01000193;
-	}
-
-	return h;
-}
-
-uint32_t dlm_hash(const void *data, int len)
-{
-	uint32_t h = 0x811C9DC5;
-	h = hash_more_internal(data, len, h);
-	return h;
-}
-
 static void header_out(struct dlm_header *hd)
 {
 	hd->h_version		= cpu_to_le32(hd->h_version);
diff -puN drivers/dlm/util.h~dlm-use-jhash drivers/dlm/util.h
--- 25/drivers/dlm/util.h~dlm-use-jhash	Thu Jan 19 16:06:56 2006
+++ 25-akpm/drivers/dlm/util.h	Thu Jan 19 16:06:56 2006
@@ -13,8 +13,6 @@
 #ifndef __UTIL_DOT_H__
 #define __UTIL_DOT_H__
 
-uint32_t dlm_hash(const char *data, int len);
-
 void dlm_message_out(struct dlm_message *ms);
 void dlm_message_in(struct dlm_message *ms);
 void dlm_rcom_out(struct dlm_rcom *rc);
_

Patches currently in -mm which might be from teigland@xxxxxxxxxx are

git-gfs2.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux