diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2009-07-30 11:52:08 +0930 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2009-07-31 14:40:28 +0200 |
commit | 3b2f074bda8734a0b30a3e31117c0217d890809c (patch) | |
tree | d31c49e0b44eacdeeca18eb9a18e26e05e2f7b60 /examples/dce-dfs | |
parent | fa91bc67199f0d45a0e570b43aeafd816a5491bf (diff) | |
download | samba-3b2f074bda8734a0b30a3e31117c0217d890809c.tar.gz samba-3b2f074bda8734a0b30a3e31117c0217d890809c.tar.bz2 samba-3b2f074bda8734a0b30a3e31117c0217d890809c.zip |
tdb: Reimplementation of Metze's "lib/tdb: if we know pwrite and pread are thread/fork safe tdb_reopen_all() should be a noop".
This version just wraps the reopen code, so we still re-grab the lock and do
the normal sanity checks.
The reason we do this at all is to avoid global fd limits, see:
http://forums.fedoraforum.org/showthread.php?t=210393
Note also that this whole reopen concept is fundamentally racy: if the parent
goes away before the child calls tdb_reopen_all, the database can be left
without an active lock and another TDB_CLEAR_IF_FIRST opener will clear it.
A fork_with_tdbs() wrapper could use a pipe to solve this, but it's hardly
elegant (what if there are other independent things which have similar needs?).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'examples/dce-dfs')
0 files changed, 0 insertions, 0 deletions