svn commit: r206129 - head/sys/kern

Andriy Gapon avg at freebsd.org
Mon Apr 5 09:17:19 UTC 2010


on 05/04/2010 11:27 Andriy Gapon said the following:
> Additionally, as noted above (and if I am not mistaken), the problem would
> manifest itself when creating a new db in an existing file and the file has to
> be large enough.

OK, this is a nonsense, I misunderstood the code.
The problem should manifest itself upon creating a new hash db in a (new) file.
E.g. something like:
dbopen("filename", O_RDWR | ..., ..., DB_HASH, ...)

The good news is that the last optional argument (as in can be NULL) to dbopen
provides overrides for certain parameters including block size.
And it seems that in all places where dbopen is used by FreeBSD userland
utilities in the above fashion, that last argument is indeed specified and has a
sufficiently small block size value.

And I've been wondering why I have never seen any problems with this change
locally - I've been using it for quite a while before committing it.

P.S. here is a command that I used for searching:
$ find . -name "*.c" | xargs fgrep -w -A1 dbopen /dev/null | grep -v '^--' |
paste - - | fgrep DB_HASH | fgrep O_RDWR

-- 
Andriy Gapon


More information about the svn-src-all mailing list