summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xctdb/config.guess6
-rwxr-xr-xctdb/config.sub6
-rw-r--r--ctdb/doc/ctdb.17
-rw-r--r--ctdb/doc/ctdb.1.html83
-rw-r--r--ctdb/doc/ctdb.1.xml3
-rw-r--r--ctdb/doc/ctdbd.17
-rw-r--r--ctdb/doc/ctdbd.1.html5
-rw-r--r--ctdb/doc/ctdbd.1.xml3
-rw-r--r--ctdb/doc/onnode.17
-rw-r--r--ctdb/doc/onnode.1.html11
-rw-r--r--ctdb/doc/onnode.1.xml3
-rw-r--r--ctdb/ib/ibw_ctdb.c3
-rw-r--r--ctdb/ib/ibw_ctdb.h3
-rw-r--r--ctdb/ib/ibw_ctdb_init.c3
-rw-r--r--ctdb/ib/ibwrapper.c3
-rw-r--r--ctdb/ib/ibwrapper.h3
-rw-r--r--ctdb/ib/ibwrapper_internal.h3
-rw-r--r--ctdb/ib/ibwrapper_test.c3
-rw-r--r--ctdb/lib/replace/tests/testsuite.c3
-rwxr-xr-xctdb/lib/talloc/config.guess4
-rw-r--r--ctdb/lib/talloc/config.h.in33
-rwxr-xr-xctdb/lib/talloc/config.sub4
-rw-r--r--ctdb/lib/talloc/configure.ac2
-rw-r--r--ctdb/lib/talloc/talloc.3.xml24
-rw-r--r--ctdb/lib/talloc/talloc.c3
-rw-r--r--ctdb/lib/talloc/talloc.h3
-rw-r--r--ctdb/lib/talloc/talloc_guide.txt19
-rw-r--r--ctdb/lib/talloc/testsuite.c45
28 files changed, 180 insertions, 122 deletions
diff --git a/ctdb/config.guess b/ctdb/config.guess
index 30af5be0049..386626b2ba7 100755
--- a/ctdb/config.guess
+++ b/ctdb/config.guess
@@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-timestamp='2005-08-03'
+timestamp='2007-07-10'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -16,9 +16,7 @@ timestamp='2005-08-03'
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
diff --git a/ctdb/config.sub b/ctdb/config.sub
index f0fcaf63611..665fc1bda4a 100755
--- a/ctdb/config.sub
+++ b/ctdb/config.sub
@@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-timestamp='2005-07-08'
+timestamp='2007-07-10'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -20,9 +20,7 @@ timestamp='2005-07-08'
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
diff --git a/ctdb/doc/ctdb.1 b/ctdb/doc/ctdb.1
index 48319c05a3a..e8f764bd86b 100644
--- a/ctdb/doc/ctdb.1
+++ b/ctdb/doc/ctdb.1
@@ -1,11 +1,11 @@
.\" Title: ctdb
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.72.0 <http://docbook.sf.net/>
-.\" Date: 07/05/2007
+.\" Date: 07/10/2007
.\" Manual:
.\" Source:
.\"
-.TH "CTDB" "1" "07/05/2007" "" ""
+.TH "CTDB" "1" "07/10/2007" "" ""
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
@@ -398,7 +398,6 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+along with this program; if not, see http://www.gnu.org/licenses/.
.fi
.RE
diff --git a/ctdb/doc/ctdb.1.html b/ctdb/doc/ctdb.1.html
index ce33780b61c..165dc297810 100644
--- a/ctdb/doc/ctdb.1.html
+++ b/ctdb/doc/ctdb.1.html
@@ -1,6 +1,6 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ctdb</title><meta name="generator" content="DocBook XSL Stylesheets V1.71.0"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="ctdb.1"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ctdb &#8212; clustered tdb database management utility</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ctdb [ OPTIONS ] COMMAND ...</code> </p></div><div class="cmdsynopsis"><p><code class="command">ctdb</code> [-n &lt;node&gt;] [-Y] [-t &lt;timeout&gt;] [-? --help] [--usage] [-d --debug=&lt;INTEGER&gt;] [--socket=&lt;filename&gt;]</p></div></div><div class="refsect1" lang="en"><a name="id2480829"></a><h2>DESCRIPTION</h2><p>
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ctdb</title><meta name="generator" content="DocBook XSL Stylesheets V1.72.0"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="ctdb.1"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ctdb &#8212; clustered tdb database management utility</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ctdb [ OPTIONS ] COMMAND ...</code> </p></div><div class="cmdsynopsis"><p><code class="command">ctdb</code> [-n &lt;node&gt;] [-Y] [-t &lt;timeout&gt;] [-? --help] [--usage] [-d --debug=&lt;INTEGER&gt;] [--socket=&lt;filename&gt;]</p></div></div><div class="refsect1" lang="en"><a name="id2488867"></a><h2>DESCRIPTION</h2><p>
ctdb is a utility to view and manage a ctdb cluster.
- </p></div><div class="refsect1" lang="en"><a name="id2480839"></a><h2>OPTIONS</h2><div class="variablelist"><dl><dt><span class="term">-n &lt;node&gt;</span></dt><dd><p>
+ </p></div><div class="refsect1" lang="en"><a name="id2488877"></a><h2>OPTIONS</h2><div class="variablelist"><dl><dt><span class="term">-n &lt;node&gt;</span></dt><dd><p>
This specifies on which node to execute the command. Default is
to run the command on the deamon running on the local host.
</p></dd><dt><span class="term">-Y</span></dt><dd><p>
@@ -20,11 +20,11 @@
You only need to specify this parameter if you run multiple ctdb
daemons on the same physical host and thus can not use the default
name for the domain socket.
- </p></dd></dl></div></div><div class="refsect1" lang="en"><a name="id2481127"></a><h2>Administrative Commands</h2><p>
+ </p></dd></dl></div></div><div class="refsect1" lang="en"><a name="id2488991"></a><h2>Administrative Commands</h2><p>
These are commands used to monitor and administrate a CTDB cluster.
- </p><div class="refsect2" lang="en"><a name="id2481136"></a><h3>status</h3><p>
+ </p><div class="refsect2" lang="en"><a name="id2489000"></a><h3>status</h3><p>
This command shows the current status of the ctdb node.
- </p><div class="refsect3" lang="en"><a name="id2481145"></a><h4>node status</h4><p>
+ </p><div class="refsect3" lang="en"><a name="id2489009"></a><h4>node status</h4><p>
Node status reflects the current status of the node. There are four possible states:
</p><p>
OK - This node is fully functional.
@@ -36,20 +36,20 @@
UNHEALTHY - A service provided by this node is malfunctioning and should be investigated. The CTDB daemon itself is operational and participates in the cluster. Its public IP address has been taken over by a different node and no services are currnetly being hosted. All unhealthy nodes should be investigated and require an administrative action to rectify.
</p><p>
BANNED - This node failed too many recovery attempts and has been banned from participating in the cluster for a period of RecoveryBanPeriod seconds. Any public IP address has been taken over by other nodes. This node does not provide any services. All banned nodes should be investigated and require an administrative action to rectify. This node does not perticipate in the CTDB cluster but can still be communicated with. I.e. ctdb commands can be sent to it.
- </p></div><div class="refsect3" lang="en"><a name="id2481197"></a><h4>generation</h4><p>
+ </p></div><div class="refsect3" lang="en"><a name="id2489061"></a><h4>generation</h4><p>
The generation id is a number that indicates the current generation
of a cluster instance. Each time a cluster goes through a
reconfiguration or a recovery its generation id will be changed.
- </p></div><div class="refsect3" lang="en"><a name="id2481210"></a><h4>VNNMAP</h4><p>
+ </p></div><div class="refsect3" lang="en"><a name="id2490207"></a><h4>VNNMAP</h4><p>
The list of Virtual Node Numbers. This is a list of all nodes that actively participates in the cluster and that share the workload of hosting the Clustered TDB database records.
Only nodes that are parcipitating in the vnnmap can become lmaster or dmaster for a database record.
- </p></div><div class="refsect3" lang="en"><a name="id2481224"></a><h4>Recovery mode</h4><p>
+ </p></div><div class="refsect3" lang="en"><a name="id2490221"></a><h4>Recovery mode</h4><p>
This is the current recovery mode of the cluster. There are two possible modes:
</p><p>
NORMAL - The cluster is fully operational.
</p><p>
RECOVERY - The cluster databases have all been frozen, pausing all services while the cluster awaits a recovery process to complete. A recovery process should finish within seconds. If a cluster is stuck in the RECOVERY state this would indicate a cluster malfunction which needs to be investigated.
- </p></div><div class="refsect3" lang="en"><a name="id2481248"></a><h4>Recovery master</h4><p>
+ </p></div><div class="refsect3" lang="en"><a name="id2490244"></a><h4>Recovery master</h4><p>
This is the cluster node that is currently designated as the recovery master. This node is responsible of monitoring the consistency of the cluster and to perform the actual recovery process when reqired.
</p></div><p>
Example: ctdb status
@@ -67,7 +67,7 @@ hash:2 lmaster:2
hash:3 lmaster:3
Recovery mode:NORMAL (0)
Recovery master:0
- </pre></div><div class="refsect2" lang="en"><a name="id2481279"></a><h3>ping</h3><p>
+ </pre></div><div class="refsect2" lang="en"><a name="id2490275"></a><h3>ping</h3><p>
This command will "ping" all CTDB daemons in the cluster to verify that they are processing commands correctly.
</p><p>
Example: ctdb ping
@@ -78,7 +78,7 @@ response from 0 time=0.000054 sec (3 clients)
response from 1 time=0.000144 sec (2 clients)
response from 2 time=0.000105 sec (2 clients)
response from 3 time=0.000114 sec (2 clients)
- </pre></div><div class="refsect2" lang="en"><a name="id2481305"></a><h3>ip</h3><p>
+ </pre></div><div class="refsect2" lang="en"><a name="id2490302"></a><h3>ip</h3><p>
This command will display the list of public addresses that are provided by the cluster and which physical node is currently serving this ip.
</p><p>
Example: ctdb ip
@@ -90,7 +90,7 @@ Number of nodes:4
12.1.1.2 1
12.1.1.3 2
12.1.1.4 3
- </pre></div><div class="refsect2" lang="en"><a name="id2481330"></a><h3>getvar &lt;name&gt;</h3><p>
+ </pre></div><div class="refsect2" lang="en"><a name="id2490327"></a><h3>getvar &lt;name&gt;</h3><p>
Get the runtime value of a tuneable variable.
</p><p>
Example: ctdb getvar MaxRedirectCount
@@ -98,11 +98,11 @@ Number of nodes:4
Example output:
</p><pre class="screen">
MaxRedirectCount = 3
- </pre></div><div class="refsect2" lang="en"><a name="id2528412"></a><h3>setvar &lt;name&gt; &lt;value&gt;</h3><p>
+ </pre></div><div class="refsect2" lang="en"><a name="id2490350"></a><h3>setvar &lt;name&gt; &lt;value&gt;</h3><p>
Set the runtime value of a tuneable variable.
</p><p>
Example: ctdb setvar MaxRedirectCount 5
- </p></div><div class="refsect2" lang="en"><a name="id2528427"></a><h3>listvars</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2490365"></a><h3>listvars</h3><p>
List all tuneable variables.
</p><p>
Example: ctdb listvars
@@ -124,7 +124,7 @@ MonitorInterval = 15
EventScriptTimeout = 20
RecoveryGracePeriod = 60
RecoveryBanPeriod = 300
- </pre></div><div class="refsect2" lang="en"><a name="id2528455"></a><h3>statistics</h3><p>
+ </pre></div><div class="refsect2" lang="en"><a name="id2490393"></a><h3>statistics</h3><p>
Collect statistics from the CTDB daemon about how many calls it has served.
</p><p>
Example: ctdb statistics
@@ -166,43 +166,43 @@ CTDB version 1
max_hop_count 0
max_call_latency 4.948321 sec
max_lockwait_latency 0.000000 sec
- </pre></div><div class="refsect2" lang="en"><a name="id2528498"></a><h3>statisticsreset</h3><p>
+ </pre></div><div class="refsect2" lang="en"><a name="id2490436"></a><h3>statisticsreset</h3><p>
This command is used to clear all statistics counters in a node.
</p><p>
Example: ctdb statisticsreset
- </p></div><div class="refsect2" lang="en"><a name="id2528513"></a><h3>getdebug</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2490450"></a><h3>getdebug</h3><p>
Get the current debug level for the node. the debug level controls what information is written to the log file.
- </p></div><div class="refsect2" lang="en"><a name="id2528524"></a><h3>setdebug &lt;debuglevel&gt;</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2490461"></a><h3>setdebug &lt;debuglevel&gt;</h3><p>
Set the debug level of a node. This is a number between 0 and 9 and controls what information will be written to the logfile.
- </p></div><div class="refsect2" lang="en"><a name="id2528535"></a><h3>getpid</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2536585"></a><h3>getpid</h3><p>
This command will return the process id of the ctdb daemon.
- </p></div><div class="refsect2" lang="en"><a name="id2528545"></a><h3>disable</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2536595"></a><h3>disable</h3><p>
This command is used to administratively disable a node in the cluster.
A disabled node will still participate in the cluster and host
clustered TDB records but its public ip address has been taken over by
a different node and it no longer hosts any services.
- </p></div><div class="refsect2" lang="en"><a name="id2528564"></a><h3>enable</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2536613"></a><h3>enable</h3><p>
Re-enable a node that has been administratively disabled.
- </p></div><div class="refsect2" lang="en"><a name="id2528574"></a><h3>ban &lt;bantime|0&gt;</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2536623"></a><h3>ban &lt;bantime|0&gt;</h3><p>
Administratively ban a node for bantime seconds. A bantime of 0 means that the node should be permanently banned.
</p><p>
A banned node does not participate in the cluster and does not host any records for the clustered TDB. Its ip address has been taken over by an other node and no services are hosted.
</p><p>
Nodes are automatically banned if they are the cause of too many
cluster recoveries.
- </p></div><div class="refsect2" lang="en"><a name="id2528598"></a><h3>unban</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2536646"></a><h3>unban</h3><p>
This command is used to unban a node that has either been
administratively banned using the ban command or has been automatically
banned by the recovery daemon.
- </p></div><div class="refsect2" lang="en"><a name="id2528610"></a><h3>shutdown</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2536658"></a><h3>shutdown</h3><p>
This command will shutdown a specific CTDB daemon.
- </p></div><div class="refsect2" lang="en"><a name="id2528620"></a><h3>recover</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2536668"></a><h3>recover</h3><p>
This command will trigger the recovery daemon to do a cluster
recovery.
- </p></div><div class="refsect2" lang="en"><a name="id2528631"></a><h3>killtcp &lt;srcip:port&gt; &lt;dstip:port&gt;</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2536679"></a><h3>killtcp &lt;srcip:port&gt; &lt;dstip:port&gt;</h3><p>
This command will kill the specified TCP connection by issuing a
TCP RST to the srcip:port endpoint.
- </p></div><div class="refsect2" lang="en"><a name="id2528642"></a><h3>tickle &lt;srcip:port&gt; &lt;dstip:port&gt;</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2536690"></a><h3>tickle &lt;srcip:port&gt; &lt;dstip:port&gt;</h3><p>
This command will will send a TCP tickle to the source host for the
specified TCP connection.
A TCP tickle is a TCP ACK packet with an invalid sequence and
@@ -214,12 +214,12 @@ CTDB version 1
TCP connection has been disrupted and that the client will need
to reestablish. This greatly speeds up the time it takes for a client
to detect and reestablish after an IP failover in the ctdb cluster.
- </p></div></div><div class="refsect1" lang="en"><a name="id2528668"></a><h2>Debugging Commands</h2><p>
+ </p></div></div><div class="refsect1" lang="en"><a name="id2536716"></a><h2>Debugging Commands</h2><p>
These commands are primarily used for CTDB development and testing and
should not be used for normal administration.
- </p><div class="refsect2" lang="en"><a name="id2528678"></a><h3>process-exists &lt;pid&gt;</h3><p>
+ </p><div class="refsect2" lang="en"><a name="id2536726"></a><h3>process-exists &lt;pid&gt;</h3><p>
This command checks if a specific process exists on the CTDB host. This is mainly used by Samba to check if remote instances of samba are still running or not.
- </p></div><div class="refsect2" lang="en"><a name="id2528691"></a><h3>getdbmap</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2536738"></a><h3>getdbmap</h3><p>
This command lists all clustered TDB databases that the CTDB daemon has attahced to.
</p><p>
Example: ctdb getdbmap
@@ -231,21 +231,21 @@ dbid:0x42fe72c5 name:locking.tdb path:/var/ctdb/locking.tdb.0
dbid:0x1421fb78 name:brlock.tdb path:/var/ctdb/brlock.tdb.0
dbid:0x17055d90 name:connections.tdb path:/var/ctdb/connections.tdb.0
dbid:0xc0bdde6a name:sessionid.tdb path:/var/ctdb/sessionid.tdb.0
- </pre></div><div class="refsect2" lang="en"><a name="id2528718"></a><h3>catdb &lt;dbname&gt;</h3><p>
+ </pre></div><div class="refsect2" lang="en"><a name="id2536766"></a><h3>catdb &lt;dbname&gt;</h3><p>
This command will dump a clustered TDB database to the screen. This is a debugging command.
- </p></div><div class="refsect2" lang="en"><a name="id2528729"></a><h3>getmonmode</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2536777"></a><h3>getmonmode</h3><p>
This command returns the monutoring mode of a node. The monitoring mode is either ACTIVE or DISABLED. Normally a node will continously monitor that all other nodes that are expected are in fact connected and that they respond to commands.
</p><p>
ACTIVE - This is the normal mode. The node is actively monitoring all other nodes, both that the transport is connected and also that the node responds to commands. If a node becomes unavailable, it will be marked as DISCONNECTED and a recovery is initiated to restore the cluster.
</p><p>
DISABLED - This node is not monitoring that other nodes are available. In this mode a node failure will not be detected and no recovery will be performed. This mode is useful when for debugging purposes one wants to attach GDB to a ctdb process but wants to prevent the rest of the cluster from marking this node as DISCONNECTED and do a recovery.
- </p></div><div class="refsect2" lang="en"><a name="id2528760"></a><h3>setmonmode &lt;0|1&gt;</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2536808"></a><h3>setmonmode &lt;0|1&gt;</h3><p>
This command can be used to explicitely disable/enable monitoring mode on a node. The main purpose is if one wants to attach GDB to a running ctdb daemon but wants to prevent the other nodes from marking it as DISCONNECTED and issuing a recovery. To do this, set monitoring mode to 0 on all nodes before attaching with GDB. Remember to set monitoring mode back to 1 afterwards.
- </p></div><div class="refsect2" lang="en"><a name="id2528776"></a><h3>attach &lt;dbname&gt;</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2536823"></a><h3>attach &lt;dbname&gt;</h3><p>
This is a debugging command. This command will make the CTDB daemon create a new CTDB database and attach to it.
- </p></div><div class="refsect2" lang="en"><a name="id2528787"></a><h3>dumpmemory</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2536835"></a><h3>dumpmemory</h3><p>
This is a debugging command. This command will make the ctdb daemon to write a fill memory allocation map to the log file.
- </p></div><div class="refsect2" lang="en"><a name="id2528798"></a><h3>freeze</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2536846"></a><h3>freeze</h3><p>
This command will lock all the local TDB databases causing clients
that are accessing these TDBs such as samba3 to block until the
databases are thawed.
@@ -253,18 +253,18 @@ dbid:0xc0bdde6a name:sessionid.tdb path:/var/ctdb/sessionid.tdb.0
This is primarily used by the recovery daemon to stop all samba
daemons from accessing any databases while the database is recovered
and rebuilt.
- </p></div><div class="refsect2" lang="en"><a name="id2528816"></a><h3>thaw</h3><p>
+ </p></div><div class="refsect2" lang="en"><a name="id2536864"></a><h3>thaw</h3><p>
Thaw a previously frozen node.
- </p></div></div><div class="refsect1" lang="en"><a name="id2528827"></a><h2>SEE ALSO</h2><p>
+ </p></div></div><div class="refsect1" lang="en"><a name="id2536875"></a><h2>SEE ALSO</h2><p>
ctdbd(1), onnode(1)
<a href="http://ctdb.samba.org/" target="_top">http://ctdb.samba.org/</a>
- </p></div><div class="refsect1" lang="en"><a name="id2528840"></a><h2>COPYRIGHT/LICENSE</h2><div class="literallayout"><p><br>
+ </p></div><div class="refsect1" lang="en"><a name="id2536888"></a><h2>COPYRIGHT/LICENSE</h2><div class="literallayout"><p><br>
Copyright (C) Andrew Tridgell 2007<br>
Copyright (C) Ronnie sahlberg 2007<br>
<br>
This program is free software; you can redistribute it and/or modify<br>
it under the terms of the GNU General Public License as published by<br>
-the Free Software Foundation; either version 2 of the License, or (at<br>
+the Free Software Foundation; either version 3 of the License, or (at<br>
your option) any later version.<br>
<br>
This program is distributed in the hope that it will be useful, but<br>
@@ -273,6 +273,5 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU<br>
General Public License for more details.<br>
<br>
You should have received a copy of the GNU General Public License<br>
-along with this program; if not, write to the Free Software<br>
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.<br>
+along with this program; if not, see http://www.gnu.org/licenses/.<br>
</p></div></div></div></body></html>
diff --git a/ctdb/doc/ctdb.1.xml b/ctdb/doc/ctdb.1.xml
index 61e21e39337..6ed50afb673 100644
--- a/ctdb/doc/ctdb.1.xml
+++ b/ctdb/doc/ctdb.1.xml
@@ -547,8 +547,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+along with this program; if not, see http://www.gnu.org/licenses/.
</literallayout>
</refsect1>
</refentry>
diff --git a/ctdb/doc/ctdbd.1 b/ctdb/doc/ctdbd.1
index 28b47302511..682d813028e 100644
--- a/ctdb/doc/ctdbd.1
+++ b/ctdb/doc/ctdbd.1
@@ -1,11 +1,11 @@
.\" Title: ctdbd
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.72.0 <http://docbook.sf.net/>
-.\" Date: 06/12/2007
+.\" Date: 07/10/2007
.\" Manual:
.\" Source:
.\"
-.TH "CTDBD" "1" "06/12/2007" "" ""
+.TH "CTDBD" "1" "07/10/2007" "" ""
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
@@ -208,7 +208,6 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+along with this program; if not, see http://www.gnu.org/licenses/.
.fi
.RE
diff --git a/ctdb/doc/ctdbd.1.html b/ctdb/doc/ctdbd.1.html
index e6a63d2aba0..49d2fdc468c 100644
--- a/ctdb/doc/ctdbd.1.html
+++ b/ctdb/doc/ctdbd.1.html
@@ -169,7 +169,7 @@ Copyright (C) Ronnie sahlberg 2007<br>
<br>
This program is free software; you can redistribute it and/or modify<br>
it under the terms of the GNU General Public License as published by<br>
-the Free Software Foundation; either version 2 of the License, or (at<br>
+the Free Software Foundation; either version 3 of the License, or (at<br>
your option) any later version.<br>
<br>
This program is distributed in the hope that it will be useful, but<br>
@@ -178,6 +178,5 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU<br>
General Public License for more details.<br>
<br>
You should have received a copy of the GNU General Public License<br>
-along with this program; if not, write to the Free Software<br>
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.<br>
+along with this program; if not, see http://www.gnu.org/licenses/.<br>
</p></div></div></div></body></html>
diff --git a/ctdb/doc/ctdbd.1.xml b/ctdb/doc/ctdbd.1.xml
index 3fdd6fd29f6..cbff8d8b5bb 100644
--- a/ctdb/doc/ctdbd.1.xml
+++ b/ctdb/doc/ctdbd.1.xml
@@ -373,8 +373,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+along with this program; if not, see http://www.gnu.org/licenses/.
</literallayout>
</refsect1>
</refentry>
diff --git a/ctdb/doc/onnode.1 b/ctdb/doc/onnode.1
index f0beca612ac..926df4d1455 100644
--- a/ctdb/doc/onnode.1
+++ b/ctdb/doc/onnode.1
@@ -1,11 +1,11 @@
.\" Title: onnode
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.72.0 <http://docbook.sf.net/>
-.\" Date: 06/12/2007
+.\" Date: 07/10/2007
.\" Manual:
.\" Source:
.\"
-.TH "ONNODE" "1" "06/12/2007" "" ""
+.TH "ONNODE" "1" "07/10/2007" "" ""
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
@@ -74,7 +74,6 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+along with this program; if not, see http://www.gnu.org/licenses/.
.fi
.RE
diff --git a/ctdb/doc/onnode.1.html b/ctdb/doc/onnode.1.html
index 27ee5812d59..57ddfec37b5 100644
--- a/ctdb/doc/onnode.1.html
+++ b/ctdb/doc/onnode.1.html
@@ -1,4 +1,4 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>onnode</title><meta name="generator" content="DocBook XSL Stylesheets V1.72.0"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="onnode.1"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>onnode &#8212; run commands on ctdb nodes</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">onnode NODE COMMAND ...</code> </p></div></div><div class="refsect1" lang="en"><a name="id2490458"></a><h2>DESCRIPTION</h2><p>
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>onnode</title><meta name="generator" content="DocBook XSL Stylesheets V1.72.0"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="onnode.1"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>onnode &#8212; run commands on ctdb nodes</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">onnode NODE COMMAND ...</code> </p></div></div><div class="refsect1" lang="en"><a name="id2490457"></a><h2>DESCRIPTION</h2><p>
onnode is a utility to run commands on a specific node of a CTDB
cluster, or on all nodes.
</p><p>
@@ -11,7 +11,7 @@
</p><p>
If the COMMAND starts with a /, then the command is run via the
'at' service. Otherwise the command is run in the foreground.
- </p></div><div class="refsect1" lang="en"><a name="id2487794"></a><h2>EXAMPLES</h2><p>
+ </p></div><div class="refsect1" lang="en"><a name="id2487793"></a><h2>EXAMPLES</h2><p>
The following command would show the process ID of ctdb on all nodes
</p><pre class="screen">
onnode all pidof ctdbd
@@ -24,7 +24,7 @@ onnode all "hostname; tail -5 /var/log/log.ctdb"
The following command would restart the ctdb service on all nodes.
</p><pre class="screen">
onnode all service ctdb restart
- </pre></div><div class="refsect1" lang="en"><a name="id2488692"></a><h2>SEE ALSO</h2><p>
+ </pre></div><div class="refsect1" lang="en"><a name="id2488691"></a><h2>SEE ALSO</h2><p>
ctdbd(1), ctdb(1), <a href="http://ctdb.samba.org/" target="_top">http://ctdb.samba.org/</a>
</p></div><div class="refsect1" lang="en"><a name="id2488704"></a><h2>COPYRIGHT/LICENSE</h2><div class="literallayout"><p><br>
Copyright (C) Andrew Tridgell 2007<br>
@@ -32,7 +32,7 @@ Copyright (C) Ronnie sahlberg 2007<br>
<br>
This program is free software; you can redistribute it and/or modify<br>
it under the terms of the GNU General Public License as published by<br>
-the Free Software Foundation; either version 2 of the License, or (at<br>
+the Free Software Foundation; either version 3 of the License, or (at<br>
your option) any later version.<br>
<br>
This program is distributed in the hope that it will be useful, but<br>
@@ -41,6 +41,5 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU<br>
General Public License for more details.<br>
<br>
You should have received a copy of the GNU General Public License<br>
-along with this program; if not, write to the Free Software<br>
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.<br>
+along with this program; if not, see http://www.gnu.org/licenses/.<br>
</p></div></div></div></body></html>
diff --git a/ctdb/doc/onnode.1.xml b/ctdb/doc/onnode.1.xml
index f3ab71c9321..e044e5fc426 100644
--- a/ctdb/doc/onnode.1.xml
+++ b/ctdb/doc/onnode.1.xml
@@ -85,8 +85,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+along with this program; if not, see http://www.gnu.org/licenses/.
</literallayout>
</refsect1>
</refentry>
diff --git a/ctdb/ib/ibw_ctdb.c b/ctdb/ib/ibw_ctdb.c
index a09c9a6810c..5822ffb1865 100644
--- a/ctdb/ib/ibw_ctdb.c
+++ b/ctdb/ib/ibw_ctdb.c
@@ -17,8 +17,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include "includes.h"
diff --git a/ctdb/ib/ibw_ctdb.h b/ctdb/ib/ibw_ctdb.h
index ca3824c8e11..98ea102eac8 100644
--- a/ctdb/ib/ibw_ctdb.h
+++ b/ctdb/ib/ibw_ctdb.h
@@ -17,8 +17,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
struct ctdb_ibw_msg {
diff --git a/ctdb/ib/ibw_ctdb_init.c b/ctdb/ib/ibw_ctdb_init.c
index 3dadc58d22b..8dbb9c241cc 100644
--- a/ctdb/ib/ibw_ctdb_init.c
+++ b/ctdb/ib/ibw_ctdb_init.c
@@ -17,8 +17,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include "includes.h"
diff --git a/ctdb/ib/ibwrapper.c b/ctdb/ib/ibwrapper.c
index 79ad1abb189..31acbc4a2d1 100644
--- a/ctdb/ib/ibwrapper.c
+++ b/ctdb/ib/ibwrapper.c
@@ -17,8 +17,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include <stdlib.h>
diff --git a/ctdb/ib/ibwrapper.h b/ctdb/ib/ibwrapper.h
index 06c7f6581bc..0b880b3aab7 100644
--- a/ctdb/ib/ibwrapper.h
+++ b/ctdb/ib/ibwrapper.h
@@ -17,8 +17,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
/* Server communication state */
diff --git a/ctdb/ib/ibwrapper_internal.h b/ctdb/ib/ibwrapper_internal.h
index 9feaddc1a77..20aef7fd86b 100644
--- a/ctdb/ib/ibwrapper_internal.h
+++ b/ctdb/ib/ibwrapper_internal.h
@@ -17,8 +17,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
struct ibw_opts {
diff --git a/ctdb/ib/ibwrapper_test.c b/ctdb/ib/ibwrapper_test.c
index eed42d472d1..07c78e7709e 100644
--- a/ctdb/ib/ibwrapper_test.c
+++ b/ctdb/ib/ibwrapper_test.c
@@ -17,8 +17,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include <stdlib.h>
diff --git a/ctdb/lib/replace/tests/testsuite.c b/ctdb/lib/replace/tests/testsuite.c
index 2da9fe81aa2..2ec08fae8e3 100644
--- a/ctdb/lib/replace/tests/testsuite.c
+++ b/ctdb/lib/replace/tests/testsuite.c
@@ -20,8 +20,7 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include "replace.h"
diff --git a/ctdb/lib/talloc/config.guess b/ctdb/lib/talloc/config.guess
index 30af5be0049..354dbe175ab 100755
--- a/ctdb/lib/talloc/config.guess
+++ b/ctdb/lib/talloc/config.guess
@@ -16,9 +16,7 @@ timestamp='2005-08-03'
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
diff --git a/ctdb/lib/talloc/config.h.in b/ctdb/lib/talloc/config.h.in
index 407af7c8d49..8bbf16e7093 100644
--- a/ctdb/lib/talloc/config.h.in
+++ b/ctdb/lib/talloc/config.h.in
@@ -6,6 +6,12 @@
/* Whether strnlen is broken */
#undef BROKEN_STRNLEN
+/* Whether dlopen takes unsinged int flags */
+#undef DLOPEN_TAKES_UNSIGNED_FLAGS
+
+/* Define to 1 if you have the <acl/libacl.h> header file. */
+#undef HAVE_ACL_LIBACL_H
+
/* Define to 1 if you have the <arpa/inet.h> header file. */
#undef HAVE_ARPA_INET_H
@@ -74,9 +80,6 @@
/* Define to 1 if you have the `dlsym' function. */
#undef HAVE_DLSYM
-/* Define to 1 if you have the `endnetgrent' function. */
-#undef HAVE_ENDNETGRENT
-
/* Whether errno() is available */
#undef HAVE_ERRNO_DECL
@@ -98,9 +101,6 @@
/* Define to 1 if you have the `getdirentries' function. */
#undef HAVE_GETDIRENTRIES
-/* Define to 1 if you have the `getnetgrent' function. */
-#undef HAVE_GETNETGRENT
-
/* Define to 1 if you have the `getpgrp' function. */
#undef HAVE_GETPGRP
@@ -113,9 +113,6 @@
/* Define to 1 if you have the `initgroups' function. */
#undef HAVE_INITGROUPS
-/* Define to 1 if you have the `innetgr' function. */
-#undef HAVE_INNETGR
-
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
@@ -155,6 +152,9 @@
/* Whether mmap works */
#undef HAVE_MMAP
+/* Define to 1 if you have the <mntent.h> header file. */
+#undef HAVE_MNTENT_H
+
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
#undef HAVE_NDIR_H
@@ -218,6 +218,9 @@
/* Define to 1 if you have the `setenv' function. */
#undef HAVE_SETENV
+/* Whether setenv() is available */
+#undef HAVE_SETENV_DECL
+
/* Define to 1 if you have the `seteuid' function. */
#undef HAVE_SETEUID
@@ -227,9 +230,6 @@
/* Define to 1 if you have the `setlinebuf' function. */
#undef HAVE_SETLINEBUF
-/* Define to 1 if you have the `setnetgrent' function. */
-#undef HAVE_SETNETGRENT
-
/* Define to 1 if you have the `setresgid' function. */
#undef HAVE_SETRESGID
@@ -373,6 +373,9 @@
/* Define to 1 if you have the <sys/mode.h> header file. */
#undef HAVE_SYS_MODE_H
+/* Define to 1 if you have the <sys/mount.h> header file. */
+#undef HAVE_SYS_MOUNT_H
+
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
*/
#undef HAVE_SYS_NDIR_H
@@ -437,6 +440,9 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
+/* Define to 1 if you have the `unsetenv' function. */
+#undef HAVE_UNSETENV
+
/* Define to 1 if you have the `usleep' function. */
#undef HAVE_USLEEP
@@ -524,6 +530,9 @@
/* replace readdir using getdirentries() */
#undef REPLACE_READDIR_GETDIRENTRIES
+/* Whether strptime should be replaced */
+#undef REPLACE_STRPTIME
+
/* Define as the return type of signal handlers (`int' or `void'). */
#undef RETSIGTYPE
diff --git a/ctdb/lib/talloc/config.sub b/ctdb/lib/talloc/config.sub
index f0fcaf63611..23cd6fd75c8 100755
--- a/ctdb/lib/talloc/config.sub
+++ b/ctdb/lib/talloc/config.sub
@@ -20,9 +20,7 @@ timestamp='2005-07-08'
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
diff --git a/ctdb/lib/talloc/configure.ac b/ctdb/lib/talloc/configure.ac
index 5f465fe93ab..e1e84b25c3c 100644
--- a/ctdb/lib/talloc/configure.ac
+++ b/ctdb/lib/talloc/configure.ac
@@ -1,5 +1,5 @@
AC_PREREQ(2.50)
-AC_INIT(talloc, 1.0)
+AC_INIT(talloc, 1.0.1)
AC_CONFIG_SRCDIR([talloc.c])
AC_SUBST(datarootdir)
AC_CONFIG_HEADER(config.h)
diff --git a/ctdb/lib/talloc/talloc.3.xml b/ctdb/lib/talloc/talloc.3.xml
index 41b748b4ba6..67de15bfc8b 100644
--- a/ctdb/lib/talloc/talloc.3.xml
+++ b/ctdb/lib/talloc/talloc.3.xml
@@ -583,11 +583,27 @@ if (ptr) memcpy(ptr, p, strlen(p)+1);</programlisting>
</para>
<programlisting>talloc_set_name_const(ptr, ptr)</programlisting>
</refsect2>
+ <refsect2><title>char *talloc_append_string(const void *<emphasis role="italic">t</emphasis>, char *<emphasis role="italic">orig</emphasis>, const char *<emphasis role="italic">append</emphasis>);</title>
+ <para>
+ The talloc_append_string() function appends the given formatted
+ string to the given string.
+ </para>
+ <para>
+ This function sets the name of the new pointer to the new
+ string. This is equivalent to:
+ </para>
+ <programlisting>talloc_set_name_const(ptr, ptr)</programlisting>
+ </refsect2>
<refsect2><title>char *talloc_vasprintf(const void *<emphasis role="italic">t</emphasis>, const char *<emphasis role="italic">fmt</emphasis>, va_list <emphasis role="italic">ap</emphasis>);</title>
<para>
The talloc_vasprintf() function is the talloc equivalent of the C
library function vasprintf(3).
</para>
+ <para>
+ This function sets the name of the new pointer to the new
+ string. This is equivalent to:
+ </para>
+ <programlisting>talloc_set_name_const(ptr, ptr)</programlisting>
</refsect2>
<refsect2><title>char *talloc_asprintf(const void *<emphasis role="italic">t</emphasis>, const char *<emphasis role="italic">fmt</emphasis>, ...);</title>
<para>
@@ -605,6 +621,11 @@ if (ptr) memcpy(ptr, p, strlen(p)+1);</programlisting>
The talloc_asprintf_append() function appends the given formatted
string to the given string.
</para>
+ <para>
+ This function sets the name of the new pointer to the new
+ string. This is equivalent to:
+ </para>
+ <programlisting>talloc_set_name_const(ptr, ptr)</programlisting>
</refsect2>
<refsect2><title>(type *)talloc_array(const void *ctx, type, uint_t count);</title>
<para>
@@ -711,8 +732,7 @@ if (ptr) memcpy(ptr, p, strlen(p)+1);</programlisting>
</para>
<para>
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ along with this program; if not, see http://www.gnu.org/licenses/.
</para>
</refsect1>
</refentry>
diff --git a/ctdb/lib/talloc/talloc.c b/ctdb/lib/talloc/talloc.c
index d1f17b6c4b2..b805c9725cd 100644
--- a/ctdb/lib/talloc/talloc.c
+++ b/ctdb/lib/talloc/talloc.c
@@ -23,8 +23,7 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
/*
diff --git a/ctdb/lib/talloc/talloc.h b/ctdb/lib/talloc/talloc.h
index 67788258224..15130d0d982 100644
--- a/ctdb/lib/talloc/talloc.h
+++ b/ctdb/lib/talloc/talloc.h
@@ -22,8 +22,7 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include <stdlib.h>
diff --git a/ctdb/lib/talloc/talloc_guide.txt b/ctdb/lib/talloc/talloc_guide.txt
index 6481b586112..c4634ae19a9 100644
--- a/ctdb/lib/talloc/talloc_guide.txt
+++ b/ctdb/lib/talloc/talloc_guide.txt
@@ -533,6 +533,15 @@ This functions sets the name of the new pointer to the passed
string. This is equivalent to:
talloc_set_name_const(ptr, ptr)
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+char *talloc_append_string(const void *t, char *orig, const char *append);
+
+The talloc_append_string() function appends the given formatted
+string to the given string.
+
+This function sets the name of the new pointer to the new
+string. This is equivalent to:
+ talloc_set_name_const(ptr, ptr)
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
char *talloc_vasprintf(const void *t, const char *fmt, va_list ap);
@@ -540,6 +549,10 @@ char *talloc_vasprintf(const void *t, const char *fmt, va_list ap);
The talloc_vasprintf() function is the talloc equivalent of the C
library function vasprintf()
+This functions sets the name of the new pointer to the new
+string. This is equivalent to:
+ talloc_set_name_const(ptr, ptr)
+
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
char *talloc_asprintf(const void *t, const char *fmt, ...);
@@ -547,7 +560,7 @@ char *talloc_asprintf(const void *t, const char *fmt, ...);
The talloc_asprintf() function is the talloc equivalent of the C
library function asprintf()
-This functions sets the name of the new pointer to the passed
+This functions sets the name of the new pointer to the new
string. This is equivalent to:
talloc_set_name_const(ptr, ptr)
@@ -558,6 +571,10 @@ char *talloc_asprintf_append(char *s, const char *fmt, ...);
The talloc_asprintf_append() function appends the given formatted
string to the given string.
+This functions sets the name of the new pointer to the new
+string. This is equivalent to:
+ talloc_set_name_const(ptr, ptr)
+
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
(type *)talloc_array(const void *ctx, type, uint_t count);
diff --git a/ctdb/lib/talloc/testsuite.c b/ctdb/lib/talloc/testsuite.c
index 8661d959f72..2e3ae65082f 100644
--- a/ctdb/lib/talloc/testsuite.c
+++ b/ctdb/lib/talloc/testsuite.c
@@ -20,8 +20,7 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include "replace.h"
@@ -993,7 +992,7 @@ static bool test_talloc_ptrtype(void)
s4 = talloc_array_ptrtype(top, s4, 10);location4 = __location__;
if (talloc_get_size(s4) != (sizeof(struct struct1 **) * 10)) {
- printf("failure: TALLOC PTRTYPE [\n"
+ printf("failure: ptrtype [\n"
"talloc_array_ptrtype() allocated the wrong size "
"%lu (should be %lu)\n]\n",
(unsigned long)talloc_get_size(s4),
@@ -1010,6 +1009,45 @@ static bool test_talloc_ptrtype(void)
return true;
}
+static int _test_talloc_free_in_destructor(void **ptr)
+{
+ talloc_free(*ptr);
+ return 0;
+}
+
+static bool test_talloc_free_in_destructor(void)
+{
+ void *level0;
+ void *level1;
+ void *level2;
+ void *level3;
+ void *level4;
+ void **level5;
+
+ printf("test: free_in_destructor [\nTALLOC FREE IN DESTRUCTOR\n]\n");
+
+ level0 = talloc_new(NULL);
+ level1 = talloc_new(level0);
+ level2 = talloc_new(level1);
+ level3 = talloc_new(level2);
+ level4 = talloc_new(level3);
+ level5 = talloc(level4, void *);
+
+ *level5 = level3;
+ (void)talloc_reference(level0, level3);
+ (void)talloc_reference(level3, level3);
+ (void)talloc_reference(level5, level3);
+
+ talloc_set_destructor(level5, _test_talloc_free_in_destructor);
+
+ talloc_free(level1);
+
+ talloc_free(level0);
+
+ printf("success: free_in_destructor\n");
+ return true;
+}
+
static bool test_autofree(void)
{
#if _SAMBA_BUILD_ < 4
@@ -1055,6 +1093,7 @@ bool torture_local_talloc(struct torture_context *tctx)
ret &= test_loop();
ret &= test_free_parent_deny_child();
ret &= test_talloc_ptrtype();
+ ret &= test_talloc_free_in_destructor();
if (ret) {
ret &= test_speed();