svn rev #21786: trunk/src/plugins/kdb/db2/libdb2/hash/
raeburn@MIT.EDU
raeburn at MIT.EDU
Fri Jan 23 13:04:12 EST 2009
http://mv.ezproxy.com.ezproxyberklee.flo.org/fisheye/changelog/krb5/?cs=21786
Commit By: raeburn
Log Message:
ticket: 6342
subject: hash db2 code breaks if st_blksize > 64k
The hash db code assumes in places that the block size is no larger
than 64K. There's a range check in the case where you don't have a
file but provide initialization info. The btree code will cap the
block size used at 64K.
Apparently Sun's ZFS can report back a block size of 128K, causing the
db2 tests to fail.
Add such a cap to the hash db creation code.
Note that our default configuration is to use the btree code when
creating a new database, so it's unlikely that this will cause
real-world problems unless someone went out of their way to specify
use of the hash format.
Changed Files:
U trunk/src/plugins/kdb/db2/libdb2/hash/hash.c
Modified: trunk/src/plugins/kdb/db2/libdb2/hash/hash.c
===================================================================
--- trunk/src/plugins/kdb/db2/libdb2/hash/hash.c 2009-01-23 17:53:52 UTC (rev 21785)
+++ trunk/src/plugins/kdb/db2/libdb2/hash/hash.c 2009-01-23 18:04:08 UTC (rev 21786)
@@ -328,6 +328,8 @@
if (stat(file, &statbuf))
return (NULL);
hashp->hdr.bsize = statbuf.st_blksize;
+ if (hashp->hdr.bsize > MAX_BSIZE)
+ hashp->hdr.bsize = MAX_BSIZE;
hashp->hdr.bshift = __log2(hashp->hdr.bsize);
}
if (info) {
More information about the cvs-krb5
mailing list