git.samba.org
/
obnox
/
samba
/
samba-obnox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
435dad0
)
ctdbd: call tdb_reopen_all() in freeze child.
author
Rusty Russell
<rusty@rustcorp.com.au>
Mon, 21 Mar 2011 02:37:17 +0000
(13:07 +1030)
committer
Ronnie Sahlberg
<sahlberg@lenovo-laptop.(none)>
Mon, 21 Mar 2011 02:57:53 +0000
(13:57 +1100)
In theory, the ctdbd parent shouldn't be holding any locks, but it's a good
idea to always call tdb_reopen_all() after a fork().
(This used to be ctdb commit
3d9828861c771a060923f3181fa8224e0122bffc
)
ctdb/server/ctdb_freeze.c
patch
|
blob
|
history
diff --git
a/ctdb/server/ctdb_freeze.c
b/ctdb/server/ctdb_freeze.c
index 0f70fd35023df539dceab412195cd741fed02a9c..9eb2493088033d90047801b1c50f999d34e597e2 100644
(file)
--- a/
ctdb/server/ctdb_freeze.c
+++ b/
ctdb/server/ctdb_freeze.c
@@
-204,6
+204,11
@@
static struct ctdb_freeze_handle *ctdb_freeze_lock(struct ctdb_context *ctdb, ui
close(fd[0]);
debug_extra = talloc_asprintf(NULL, "freeze_lock-%u:", priority);
+ if (tdb_reopen_all(true) != 0) {
+ DEBUG(DEBUG_ERR,(__location__ " Failed to reopen databases\n"));
+ _exit(0);
+ }
+
ret = ctdb_lock_all_databases(ctdb, priority);
if (ret != 0) {
_exit(0);