[Ocfs2-commits] manish commits r951 - trunk/src/inc

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Wed May 26 22:26:33 CDT 2004


Author: manish
Date: 2004-05-26 21:26:31 -0500 (Wed, 26 May 2004)
New Revision: 951

Modified:
   trunk/src/inc/ocfs.h
Log:
remove some unused stuff


Modified: trunk/src/inc/ocfs.h
===================================================================
--- trunk/src/inc/ocfs.h	2004-05-27 01:56:30 UTC (rev 950)
+++ trunk/src/inc/ocfs.h	2004-05-27 02:26:31 UTC (rev 951)
@@ -176,12 +176,6 @@
 	READONLY	      // a RW or RO cachelock, requesting RO
 };
 
-enum {
-	NOT_VOTING = 0, 
-	DOING_HEARTBEAT, 
-	SKIPPED_HEARTBEAT
-};
-
 #define  OCFS_MAX_DLM_PKT_SIZE			256
 #define  OCFS_DLM_MAX_MSG_SIZE			256
 #define  OCFS_DLM_MSG_MAGIC			0x79677083
@@ -815,68 +809,6 @@
 	} while (0)
 #endif
 
-#define hashsize(n)             ((__u32)1<<(n))
-#define hashmask(n)             (hashsize(n)-1)
-
-/*
- * --------------------------------------------------------------------
- * mix -- mix 3 32-bit values reversibly.
- * For every delta with one or two bits set, and the deltas of all three
- * high bits or all three low bits, whether the original value of a,b,c
- * is almost all zero or is uniformly distributed.
- * If mix() is run forward or backward, at least 32 bits in a,b,c
- * have at least 1/4 probability of changing.
- * If mix() is run forward, every bit of c will change between 1/3 and
- * 2/3 of the time.  (Well, 22/100 and 78/100 for some 2-bit deltas.)
- * mix() takes 36 machine instructions, but only 18 cycles on a superscalar
- * machine (like a Pentium or a Sparc).  No faster mixer seems to work,
- * that's the result of my brute-force search.  There were about 2^^68
- * hashes to choose from.  I only tested about a billion of those.
- * --------------------------------------------------------------------
- * */
-#define mix(a,b,c)              \
-{                               \
-  a -= b; a -= c; a ^= (c>>13); \
-  b -= c; b -= a; b ^= (a<<8);  \
-  c -= a; c -= b; c ^= (b>>13); \
-  a -= b; a -= c; a ^= (c>>12); \
-  b -= c; b -= a; b ^= (a<<16); \
-  c -= a; c -= b; c ^= (b>>5);  \
-  a -= b; a -= c; a ^= (c>>3);  \
-  b -= c; b -= a; b ^= (a<<10); \
-  c -= a; c -= b; c ^= (b>>15); \
-}
-
-/*
- * --------------------------------------------------------------------
- * hash() -- hash a variable-length key into a 32-bit value
- *   k       : the key (the unaligned variable-length array of bytes)
- *   len     : the length of the key, counting by bytes
- *   initval : can be any 4-byte value
- *
- * Returns a 32-bit value.  Every bit of the key affects every bit of
- * the return value.  Every 1-bit and 2-bit delta achieves avalanche.
- * About 6*len+35 instructions.
- *
- * The best hash table sizes are powers of 2.  There is no need to do
- * mod a prime (mod is sooo slow!).  If you need less than 32 bits,
- * use a bitmask.  For example, if you need only 10 bits, do
- * h = (h & hashmask(10));
- * In which case, the hash table should have hashsize(10) elements.
- *
- * If you are hashing n strings (__u8 **)k, do it like this:
- * for (i=0, h=0; i<n; ++i) h = hash( k[i], len[i], h);
- *
- * By Bob Jenkins, 1996.  bob_jenkins at burtleburtle.net.  You may use this
- * code any way you wish, private, educational, or commercial.  It's free.
- *
- * See http://burtleburtle.net/bob/hash/evahash.html
- * Use for hash table lookup, or anything where one collision in 2^^32 is
- * acceptable.  Do NOT use for cryptographic purposes.
- * --------------------------------------------------------------------
- * */
-__u32 hash (__u8 * k, __u32 length, __u32 initval);
-
 #define  OCFS_NAME              "OCFS"
 
 /* ioctl commands */



More information about the Ocfs2-commits mailing list