'use mmap = no' and 'tdb_hashsize:dbname.tdb'

Andrew Bartlett abartlet at samba.org
Mon Jul 4 05:16:01 MDT 2011


There are two parameters, 'use mmap' and the parametric
'tdb_hashsize:dbname' that are invoked in the Samba3 wrapper for tdb
opens (lib/util/tdb_wrap.c and source3/lib/util_tdb.c). 

I presume these are still required, as they were added in 2007, but I
just wanted to check.  

The smb.conf man page indicates that 'use mmap' is only to work around
buggy platforms:  could it be left as just a build-time option?  My
understanding is that using pread/pwrite has got us into quite a bit of
trouble in the past, particularly if the platform 'emulates it'.  

What situations would require us to avoid mmap at runtime, rather than
at build time? (my other mail discusses part of that problem)

As regards the tdb_hashsize, is this still important with the use of the
jenkins hash for internal DBs?  Does the move to tdb2 have an impact
here?

The issue is that lib/util/tdb_wrap.c is common code, and while I'm
working hard to get a common loadparm, we don't have one yet.  At the
moment an #if _SAMBA_BUILD == 3 protects this code, but this means the
top level build doesn't respect these parameters. 

Removing these parameters would also make it easier to define a
libregistry without a library loop to libsmbconf, as the registry is tdb
based.  These patches won't solve that issue, but it will make it easier
to deal with. 

(Attached patches are for discussion, so it is clear to which I refer).

Thanks,

Andrew Bartlett
-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-s3-param-Remove-lp_use_mmap.patch
Type: text/x-patch
Size: 4544 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20110704/8e3c0dab/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-lib-util-Fix-comment.patch
Type: text/x-patch
Size: 863 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20110704/8e3c0dab/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-lib-util-Remove-tdb_hashsize-dbname.tdb-parameter.patch
Type: text/x-patch
Size: 1802 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20110704/8e3c0dab/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-lib-util-Remove-if-_SAMBA_BUILD_-3-block.patch
Type: text/x-patch
Size: 1008 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20110704/8e3c0dab/attachment-0003.bin>


More information about the samba-technical mailing list