MFC r206178: ibc/db/hash: cap auto-tuned block size
This commit is contained in:
parent
8eb59aff80
commit
d1bec90bbe
@ -293,6 +293,8 @@ init_hash(HTAB *hashp, const char *file, const HASHINFO *info)
|
||||
if (stat(file, &statbuf))
|
||||
return (NULL);
|
||||
hashp->BSIZE = statbuf.st_blksize;
|
||||
if (hashp->BSIZE > MAX_BSIZE)
|
||||
hashp->BSIZE = MAX_BSIZE;
|
||||
hashp->BSHIFT = __log2(hashp->BSIZE);
|
||||
}
|
||||
|
||||
|
@ -118,7 +118,7 @@ typedef struct htab { /* Memory resident data structure */
|
||||
/*
|
||||
* Constants
|
||||
*/
|
||||
#define MAX_BSIZE 65536 /* 2^16 */
|
||||
#define MAX_BSIZE 32768 /* 2^15 but should be 65536 */
|
||||
#define MIN_BUFFERS 6
|
||||
#define MINHDRSIZE 512
|
||||
#define DEF_BUFSIZE 65536 /* 64 K */
|
||||
|
Loading…
x
Reference in New Issue
Block a user