Improved BUFHASH algorithm.

This commit is contained in:
David Greenman 1995-08-24 12:57:17 +00:00
parent 229296b0cf
commit cbf2350552
2 changed files with 4 additions and 4 deletions

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)buf.h 8.7 (Berkeley) 1/21/94
* $Id: buf.h,v 1.19 1995/05/30 08:14:07 rgrimes Exp $
* $Id: buf.h,v 1.20 1995/07/29 11:42:43 bde Exp $
*/
#ifndef _SYS_BUF_H_
@ -165,7 +165,7 @@ struct cluster_save {
* buffer hash table calculation, originally by David Greenman
*/
#define BUFHASH(vnp, bn) \
(&bufhashtbl[(((int)(vnp) / sizeof(struct vnode))+(int)(bn)) % BUFHSZ])
(&bufhashtbl[(((unsigned long)(vnp) >> 7)+(int)(bn)) % BUFHSZ])
/*
* Definitions for the buffer free lists.

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)buf.h 8.7 (Berkeley) 1/21/94
* $Id: buf.h,v 1.19 1995/05/30 08:14:07 rgrimes Exp $
* $Id: buf.h,v 1.20 1995/07/29 11:42:43 bde Exp $
*/
#ifndef _SYS_BUF_H_
@ -165,7 +165,7 @@ struct cluster_save {
* buffer hash table calculation, originally by David Greenman
*/
#define BUFHASH(vnp, bn) \
(&bufhashtbl[(((int)(vnp) / sizeof(struct vnode))+(int)(bn)) % BUFHSZ])
(&bufhashtbl[(((unsigned long)(vnp) >> 7)+(int)(bn)) % BUFHSZ])
/*
* Definitions for the buffer free lists.