Module Name: src Committed By: bouyer Date: Sun Nov 22 14:15:14 UTC 2015
Modified Files: src/lib/libc/db/hash [netbsd-7]: hash.c hash.h hash_bigkey.c hash_page.c Log Message: Pull up following revision(s) (requested by christos in ticket #1046): lib/libc/db/hash/hash_page.c: revision 1.27 lib/libc/db/hash/hash_page.c: revision 1.28 lib/libc/db/hash/hash.h: revision 1.16 lib/libc/db/hash/hash.c: revision 1.36 lib/libc/db/hash/hash.c: revision 1.37 lib/libc/db/hash/hash.c: revision 1.38 lib/libc/db/hash/hash_bigkey.c: revision 1.25 Account for the -1 hack to fit 0x10000 in a short in hash_page.c Introduce a HASH_BSIZE macro to return the blocksize; in the 64K case this returns 0xffff to avoid overflow. This is used where sizes are stored. If MAX_BSIZE == hashp->BSIZE (65536) then it does not fit in a short, and we end up storing 0... This means that every entry needs a page. We store MAX_BSIZE - 1 here, but it would be better to always store (avail - 1) here so that we don't waste a byte and be consistent. PR/50441: Manuel Bouyer: hash seq enumeration skips keys on big data. XXX: pullup-7 To generate a diff of this commit: cvs rdiff -u -r1.33.4.1 -r1.33.4.2 src/lib/libc/db/hash/hash.c cvs rdiff -u -r1.15 -r1.15.40.1 src/lib/libc/db/hash/hash.h cvs rdiff -u -r1.24 -r1.24.10.1 src/lib/libc/db/hash/hash_bigkey.c cvs rdiff -u -r1.26 -r1.26.4.1 src/lib/libc/db/hash/hash_page.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.