[SCM] Samba Shared Repository - branch master updated

2012-11-26 Thread Michael Adam
The branch, master has been updated
   via  8336061 s4:torture/rpc/handles: try to make all assoc_group tests 
less flakey
  from  e4218e4 configure(waf):  Fail configure --with-ads if ads support 
is not available

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 8336061096c259f5c3c93f869ff51bf4daab3fdc
Author: Stefan Metzmacher me...@samba.org
Date:   Sat Nov 24 11:28:57 2012 +0100

s4:torture/rpc/handles: try to make all assoc_group tests less flakey

Just incrementing the assoc_group_id makes it too likely to hit
a number that is already in use.

Signed-off-by: Stefan Metzmacher me...@samba.org
Reviewed-by: Michael Adam ob...@samba.org

Autobuild-User(master): Michael Adam ob...@samba.org
Autobuild-Date(master): Mon Nov 26 13:53:22 CET 2012 on sn-devel-104

---

Summary of changes:
 source4/torture/rpc/handles.c |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/rpc/handles.c b/source4/torture/rpc/handles.c
index 3fdce56..5c08a5f 100644
--- a/source4/torture/rpc/handles.c
+++ b/source4/torture/rpc/handles.c
@@ -471,6 +471,11 @@ static bool test_handles_mixed_shared(struct 
torture_context *torture)
torture_assert_ntstatus_equal(torture, status, NT_STATUS_UNSUCCESSFUL,
  opening lsa pipe4);
 
+   /*
+* We use ~assoc_group_id instead of p1-assoc_group_id, because
+* this way we are less likely to use an id which is already in use.
+*/
+   assoc_group_id = ~assoc_group_id;
torture_comment(torture, connect samr pipe5 with 
assoc_group_id[0x%08X]- should fail\n, ++assoc_group_id);
status = torture_rpc_connection_transport(torture, p5, ndr_table_samr,
  transport,


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v4-0-test updated

2012-11-26 Thread Karolin Seeger
The branch, v4-0-test has been updated
   via  92c3c86 WHATSNEW: Update changes since rc5.
   via  ac0623c s3-rpc_client: lookup nametype 0x20 in 
rpc_pipe_open_tcp_port(). (bug #9426)
   via  4760b8f waf: Disable ntdb by default.
   via  76106a3 s4:samba-tool/testparm: report a CommandError if loading of 
the config file fails
   via  48ec9ca build: Do not install testing binaries
   via  256eedd packaging: Remove long-gone --disable-merged-build from 
RHEL-CTDB packaging
   via  428c170 build: Remove --enable-smbtorture, require bin/smbtorture 
(from waf) for make test
   via  0519b9b build: Be consistent with the name of smbtorture binaries
   via  68e6eda torture: remove source3 locktest and masktest
   via  2a2480f build: Use ntlm_auth from source3 as the only ntlm_auth 
installed on the system
   via  3e042a9 lib/replace: Do not use STRERROR_R_PROTO_COMPATIBLE as only 
roken.h sets this
  from  2b130b4 WHATSNEW: Update changes since rc5.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test


- Log -
commit 92c3c8690c150119d8f3ff2e26979b9d9038f939
Author: Karolin Seeger ksee...@samba.org
Date:   Mon Nov 26 12:50:06 2012 +0100

WHATSNEW: Update changes since rc5.

Karolin

Autobuild-User(v4-0-test): Karolin Seeger ksee...@samba.org
Autobuild-Date(v4-0-test): Mon Nov 26 14:30:07 CET 2012 on sn-devel-104

commit ac0623cab847a4df9c5cd35442e9be8924d9e261
Author: Günther Deschner g...@samba.org
Date:   Fri Nov 23 13:19:53 2012 +0100

s3-rpc_client: lookup nametype 0x20 in rpc_pipe_open_tcp_port(). (bug #9426)

The server name type (0x20) is much more likely to be available in the name 
cache, as
this type gets stored by winbind itself - the primary user of the 
ncacn_ip_tcp
code currently.

Guenther

Signed-off-by: Günther Deschner g...@samba.org
Reviewed-by: Stefan Metzmacher me...@samba.org

Autobuild-User(master): Stefan Metzmacher me...@samba.org
Autobuild-Date(master): Fri Nov 23 16:30:57 CET 2012 on sn-devel-104
(cherry picked from commit 2032f2746d70bbebd1af26a7a046eb1cc61ac175)

commit 4760b8f7b256922d81bd84250dae70d7da740450
Author: Karolin Seeger ksee...@samba.org
Date:   Fri Nov 23 12:33:37 2012 +0100

waf: Disable ntdb by default.

Disable ntdb by default for 4.0 as it is not used yet.

Karolin

Signed-off-by: Karolin Seeger ksee...@samba.org

Fix bug #9425 - Do not build ntdb by default.

commit 76106a30452c964066e3c522a9f1fefbc2dd14f7
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Nov 9 09:01:29 2012 +0100

s4:samba-tool/testparm: report a CommandError if loading of the config file 
fails

Signed-off-by: Stefan Metzmacher me...@samba.org

Reviewed-by: Andrew Bartlett abart...@samba.org
(cherry picked from commit 11f5d54cbb10fd5c5f0e1718427609709c3476f4)

Fix bug #9373 - Output of 'samba-tool' does not look very nice.

commit 48ec9ca6f2e9b06955976b35f8a0028f094589c9
Author: Andrew Bartlett abart...@samba.org
Date:   Wed Nov 21 20:20:46 2012 +1100

build: Do not install testing binaries

These binaries are for developer or selftest use, and are not
supported for installation onto the system.  The autoconf build does
not install these binaries, and so neither should the waf build.

Andrew Bartlett

Reviewed-by: Andreas Schneider a...@samba.org

Autobuild-User(master): Andreas Schneider a...@cryptomilk.org
Autobuild-Date(master): Thu Nov 22 12:00:36 CET 2012 on sn-devel-104
(cherry-pick from f22e15d9d5a3d4744982265363c357ef277ba31e)

The last 7 patches address bug #9421 - Build fixes for samba4.

commit 256eeddbd00bcfd68deda4a3ea75f435489ffd01
Author: Andrew Bartlett abart...@samba.org
Date:   Wed Nov 21 19:52:50 2012 +1100

packaging: Remove long-gone --disable-merged-build from RHEL-CTDB packaging

Reviewed-by: Andreas Schneider a...@samba.org
(cherry-picked from 895cc9a9157d51f768d35f888795e8af7efed781)

commit 428c17039214f6f4f2fe6ed7a5515f1662f63fe8
Author: Andrew Bartlett abart...@samba.org
Date:   Wed Nov 21 17:52:35 2012 +1100

build: Remove --enable-smbtorture, require bin/smbtorture (from waf) for 
make test

This simply moves this to being a side-effect of --enable-selftest.

The flag was renamed from --enable-smbtorture4 in a recent patch.

Make test now relies on smbtorture4, and so this code to make the dependency
optional for the tests is not required any more.

Andrew Bartlett

Reviewed-by: Andreas Schneider a...@samba.org
(cherry-picked from 7626b5d9045c2b490b38dee7dd45ba7763740f83)

commit 0519b9b4fa5b4a6c08113552848d6888ac64d202
Author: Andrew Bartlett abart...@samba.org
Date:   Wed Nov 21 16:32:38 2012 +1100

build: Be consistent with the name of smbtorture binaries


[SCM] Samba Shared Repository - branch master updated

2012-11-26 Thread Stefan Metzmacher
The branch, master has been updated
   via  b11ba24 s3-rpc_client: try to use socket_addr if available in 
rpc_pipe_open_tcp() (bug #9426)
  from  8336061 s4:torture/rpc/handles: try to make all assoc_group tests 
less flakey

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit b11ba248837ae9bf1df1c5ae1ca1768d57e582bb
Author: Günther Deschner g...@samba.org
Date:   Fri Nov 23 18:15:30 2012 +0100

s3-rpc_client: try to use socket_addr if available in rpc_pipe_open_tcp() 
(bug #9426)

Guenther

Signed-off-by: Günther Deschner g...@samba.org
Reviewed-by: Stefan Metzmacher me...@samba.org

Autobuild-User(master): Stefan Metzmacher me...@samba.org
Autobuild-Date(master): Mon Nov 26 17:36:20 CET 2012 on sn-devel-104

---

Summary of changes:
 source3/rpc_client/cli_pipe.c  |   23 ---
 source3/rpc_client/cli_pipe.h  |1 +
 source3/torture/rpc_open_tcp.c |3 ++-
 3 files changed, 19 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index f8c7b24..61e6cce 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -2420,6 +2420,7 @@ NTSTATUS rpccli_schannel_bind_data(TALLOC_CTX *mem_ctx, 
const char *domain,
  * Create an rpc pipe client struct, connecting to a tcp port.
  */
 static NTSTATUS rpc_pipe_open_tcp_port(TALLOC_CTX *mem_ctx, const char *host,
+  const struct sockaddr_storage *ss_addr,
   uint16_t port,
   const struct ndr_syntax_id 
*abstract_syntax,
   struct rpc_pipe_client **presult)
@@ -2448,9 +2449,13 @@ static NTSTATUS rpc_pipe_open_tcp_port(TALLOC_CTX 
*mem_ctx, const char *host,
result-max_xmit_frag = RPC_MAX_PDU_FRAG_LEN;
result-max_recv_frag = RPC_MAX_PDU_FRAG_LEN;
 
-   if (!resolve_name(host, addr, NBT_NAME_SERVER, false)) {
-   status = NT_STATUS_NOT_FOUND;
-   goto fail;
+   if (ss_addr == NULL) {
+   if (!resolve_name(host, addr, NBT_NAME_SERVER, false)) {
+   status = NT_STATUS_NOT_FOUND;
+   goto fail;
+   }
+   } else {
+   addr = *ss_addr;
}
 
status = open_socket_out(addr, port, 60*1000, fd);
@@ -2487,6 +2492,7 @@ static NTSTATUS rpc_pipe_open_tcp_port(TALLOC_CTX 
*mem_ctx, const char *host,
  * target host.
  */
 static NTSTATUS rpc_pipe_get_tcp_port(const char *host,
+ const struct sockaddr_storage *addr,
  const struct ndr_syntax_id 
*abstract_syntax,
  uint16_t *pport)
 {
@@ -2517,7 +2523,7 @@ static NTSTATUS rpc_pipe_get_tcp_port(const char *host,
}
 
/* open the connection to the endpoint mapper */
-   status = rpc_pipe_open_tcp_port(tmp_ctx, host, 135,
+   status = rpc_pipe_open_tcp_port(tmp_ctx, host, addr, 135,
ndr_table_epmapper.syntax_id,
epm_pipe);
 
@@ -2631,18 +2637,19 @@ done:
  * host.
  */
 NTSTATUS rpc_pipe_open_tcp(TALLOC_CTX *mem_ctx, const char *host,
+  const struct sockaddr_storage *addr,
   const struct ndr_syntax_id *abstract_syntax,
   struct rpc_pipe_client **presult)
 {
NTSTATUS status;
uint16_t port = 0;
 
-   status = rpc_pipe_get_tcp_port(host, abstract_syntax, port);
+   status = rpc_pipe_get_tcp_port(host, addr, abstract_syntax, port);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
 
-   return rpc_pipe_open_tcp_port(mem_ctx, host, port,
+   return rpc_pipe_open_tcp_port(mem_ctx, host, addr, port,
abstract_syntax, presult);
 }
 
@@ -2816,7 +2823,9 @@ static NTSTATUS cli_rpc_pipe_open(struct cli_state *cli,
 {
switch (transport) {
case NCACN_IP_TCP:
-   return rpc_pipe_open_tcp(NULL, 
smbXcli_conn_remote_name(cli-conn),
+   return rpc_pipe_open_tcp(NULL,
+smbXcli_conn_remote_name(cli-conn),
+
smbXcli_conn_remote_sockaddr(cli-conn),
 interface, presult);
case NCACN_NP:
return rpc_pipe_open_np(cli, interface, presult);
diff --git a/source3/rpc_client/cli_pipe.h b/source3/rpc_client/cli_pipe.h
index 3984cf0..343bd0a 100644
--- a/source3/rpc_client/cli_pipe.h
+++ b/source3/rpc_client/cli_pipe.h
@@ -66,6 +66,7 @@ NTSTATUS rpccli_schannel_bind_data(TALLOC_CTX *mem_ctx,
 
 NTSTATUS 

[SCM] Samba Shared Repository - branch master updated

2012-11-26 Thread Michael Adam
The branch, master has been updated
   via  994eec4 s3: Fix Coverity ID 741407 -- resource leak
  from  b11ba24 s3-rpc_client: try to use socket_addr if available in 
rpc_pipe_open_tcp() (bug #9426)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 994eec4d5861c0027b4f863baf095d95ce22c695
Author: Volker Lendecke v...@samba.org
Date:   Sun Nov 25 10:19:23 2012 +0100

s3: Fix Coverity ID 741407 -- resource leak

Reviewed-by: Michael Adam ob...@samba.org

Autobuild-User(master): Michael Adam ob...@samba.org
Autobuild-Date(master): Mon Nov 26 19:20:05 CET 2012 on sn-devel-104

---

Summary of changes:
 source3/lib/util_sock.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c
index 7fcb9c4..2063a58 100644
--- a/source3/lib/util_sock.c
+++ b/source3/lib/util_sock.c
@@ -853,6 +853,7 @@ int open_udp_socket(const char *host, int port)
salen = sizeof(struct sockaddr_in);
} else {
DEBUG(1, (unknown socket family %d, ss.ss_family));
+   close(res);
return -1;
}
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2012-11-26 Thread Jeremy Allison
The branch, master has been updated
   via  ed68f75 s3: Do not free a string where we should not
   via  db68915 s3: Do not free a string where we should not
  from  994eec4 s3: Fix Coverity ID 741407 -- resource leak

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit ed68f75b676a6b1d08f9668d29ff6d09f558fbe6
Author: Volker Lendecke v...@samba.org
Date:   Sun Nov 25 14:19:32 2012 +

s3: Do not free a string where we should not

Reviewed by: Jeremy Allison j...@samba.org

Autobuild-User(master): Jeremy Allison j...@samba.org
Autobuild-Date(master): Mon Nov 26 22:03:05 CET 2012 on sn-devel-104

commit db68915a4eaaedede9dac77c6c748718ce156139
Author: Volker Lendecke v...@samba.org
Date:   Sun Nov 25 14:19:32 2012 +

s3: Do not free a string where we should not

Reviewed by: Jeremy Allison j...@samba.org

---

Summary of changes:
 source3/winbindd/winbindd_cache.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/winbindd_cache.c 
b/source3/winbindd/winbindd_cache.c
index 517a302..e3406a5 100644
--- a/source3/winbindd/winbindd_cache.c
+++ b/source3/winbindd/winbindd_cache.c
@@ -1114,7 +1114,7 @@ NTSTATUS resolve_username_to_alias( TALLOC_CTX *mem_ctx,
if ( (upper_name = SMB_STRDUP(name)) == NULL )
return NT_STATUS_NO_MEMORY;
if (!strupper_m(upper_name)) {
-   SAFE_FREE(name);
+   SAFE_FREE(upper_name);
return NT_STATUS_INVALID_PARAMETER;
}
 
@@ -1192,7 +1192,7 @@ NTSTATUS resolve_alias_to_username( TALLOC_CTX *mem_ctx,
if ( (upper_name = SMB_STRDUP(alias)) == NULL )
return NT_STATUS_NO_MEMORY;
if (!strupper_m(upper_name)) {
-   SAFE_FREE(alias);
+   SAFE_FREE(upper_name);
return NT_STATUS_INVALID_PARAMETER;
}
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2012-11-26 Thread Jeremy Allison
The branch, master has been updated
   via  5f2edd1 s3: Fix bug 9428 -- inotify detection broken
  from  ed68f75 s3: Do not free a string where we should not

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 5f2edd13efd447df0500952a0946188432453eb7
Author: Volker Lendecke v...@samba.org
Date:   Sat Nov 24 11:39:02 2012 +0100

s3: Fix bug 9428 -- inotify detection broken

Reviewed by: Jeremy Allison j...@samba.org

Autobuild-User(master): Jeremy Allison j...@samba.org
Autobuild-Date(master): Tue Nov 27 01:20:24 CET 2012 on sn-devel-104

---

Summary of changes:
 source3/configure.in |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/configure.in b/source3/configure.in
index b74b4c2..bd3bffe 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -2509,7 +2509,7 @@ fi
 
 AC_CHECK_HEADER(sys/inotify.h)
 
-if test xac_cv_header_sys_inotify_h = xyes; then
+if test x$ac_cv_header_sys_inotify_h = xyes; then
 AC_DEFINE(HAVE_INOTIFY,1,[For inotify support])
 fi
 


-- 
Samba Shared Repository


[SCM] CTDB repository - branch 1.2.40 updated - ctdb-1.2.54-7-g8b2d844

2012-11-26 Thread Amitay Isaacs
The branch, 1.2.40 has been updated
   via  8b2d84482bacd3b31db013496ce82c2e7b730e86 (commit)
   via  e78e37205308e1507a2cf86a655a95893a7cd413 (commit)
   via  cfb85046e6ed87bf01c3abe8cc908a6d2be741e1 (commit)
   via  5c44156d1aea799f1d6655dd0237e01c49027b82 (commit)
   via  bde1c733fc8c4009202bf185452914f17631c1e7 (commit)
   via  6479566a0a104b903f499979db594541ffc00a1f (commit)
   via  5205d545e8d8c72d73b9d5fd148df6de30392fc8 (commit)
  from  b7467294465b6225982c90315df20a8699ccf812 (commit)

http://gitweb.samba.org/?p=ctdb.git;a=shortlog;h=1.2.40


- Log -
commit 8b2d84482bacd3b31db013496ce82c2e7b730e86
Author: Amitay Isaacs ami...@gmail.com
Date:   Tue Nov 27 15:50:54 2012 +1100

New version 1.2.55

Signed-off-by: Amitay Isaacs ami...@gmail.com

commit e78e37205308e1507a2cf86a655a95893a7cd413
Author: Amitay Isaacs ami...@gmail.com
Date:   Thu Nov 22 14:37:45 2012 +1100

Revert when creating/adding a public ip, set the initial interface to be 
the first interface specified

This reverts commit 4308935ba48ac7a29e7523315acf580019715f0f.

When IP is added to a node on a new interface for the first time,
vnn-iface gets set to the first interface defined for that IP.  This
actually causes problem in ctdb_vnn_assign_iface().  Since vnn-iface
is set it takes an early exit without updating vnn-pnn.  This results
in IP being hosted on the node, but CTDB still thinks it's unassigned.

Signed-off-by: Amitay Isaacs ami...@gmail.com

commit cfb85046e6ed87bf01c3abe8cc908a6d2be741e1
Author: Martin Schwenke mar...@meltin.net
Date:   Fri Nov 16 20:21:15 2012 +1100

Eventscripts: 10.interface should list configured interfaces

The current code lists available interfaces.  If IPs are configured in
some other way than the public addresses file (e.g. ctdb addip) and their
interfaces default to being marked down then, since down interfaces are
not available, these interfaces can never be marked up.

The configured interfaces should be listed instead.

Signed-off-by: Martin Schwenke mar...@meltin.net

Cherry-pick-from: d8f010355b715e49709836e057a5d0f110919897

Conflicts:
config/events.d/10.interface

commit 5c44156d1aea799f1d6655dd0237e01c49027b82
Author: Martin Schwenke mar...@meltin.net
Date:   Fri Nov 16 19:43:14 2012 +1100

ctdbd: Make the link status of new interfaces more flexible

Neither up nor down is a good default value for the link status of a
new interface.  Up means that IPs can be assigned to interfaces before
the true state is known and they can move away quickly if the interface
is actually down.  Down means that IPs can't be assigned to an interface
for a variable amount of time - until a monitor cycle occurs - and this
can result in imbalanced IPs.

This is a neat compromise.  Before the startup event completes, IPs
can't be assigned to interfaces because all interfaces begin in a down
state.  As soon as the startup event completes, IPs can be allocated
to any interface that has been marked up by the eventscript.  Later,
during normal operation, newly added IPs can be assigned to new
interfaces immediately.  The IPs will still move away if an interface
is noticed to be down in the next monitor cycle, but that is the
exception rather than the rule.

Signed-off-by: Martin Schwenke mar...@meltin.net

Cherry-pick-from: 9275a69a414482f1053ae14528d5972575b9214e

commit bde1c733fc8c4009202bf185452914f17631c1e7
Author: Amitay Isaacs ami...@gmail.com
Date:   Tue Nov 6 17:06:54 2012 +1100

tools/ctdb: Do not use function return value as pnn

This fixes the wrong code where same variable 'ret' is used to track the pnn
and the return value of a function call.

Signed-off-by: Amitay Isaacs ami...@gmail.com

Cherry-pick-from: 718233c445cd6627ab3962b6565c2655f1f8efd0

commit 6479566a0a104b903f499979db594541ffc00a1f
Author: Amitay Isaacs ami...@gmail.com
Date:   Tue Oct 23 16:23:12 2012 +1100

recoverd: Track the nodes that fail takeover run and set culprit count

If any of the nodes fail takeover run (either due to timeout or failure
to complete within takeover_timeout interval) from main loop, recovery
master will give up trying takeover run with following message:

  Unable to setup public takeover addresses. Try again later

And as a side-effect the monitoring is disabled on all the nodes. Before
ctdb_takeover_run() is called from main loop, monitoring get disabled via
startrecovery event. Since ctdb_takeover_run() fails, it never runs
recovered event and monitoring does not get re-enabled.

In main_loop, ctdb_takeover_run() is called with a takeover_fail_callback.
This callback will get called if any of the nodes fail in handling
  

[SCM] CTDB repository - annotated tag ctdb-1.2.55 created - ctdb-1.2.55

2012-11-26 Thread Amitay Isaacs
The annotated tag, ctdb-1.2.55 has been created
at  76b3981cd47807b493ff3f10cc681846b57ea32e (tag)
   tagging  8b2d84482bacd3b31db013496ce82c2e7b730e86 (commit)
  replaces  ctdb-1.2.54
 tagged by  Amitay Isaacs
on  Tue Nov 27 15:51:18 2012 +1100

- Log -
new version 1.2.55

Amitay Isaacs (5):
  daemon: Do not ignore timed out monitor events
  recoverd: Track the nodes that fail takeover run and set culprit count
  tools/ctdb: Do not use function return value as pnn
  Revert when creating/adding a public ip, set the initial interface to be 
the first interface specified
  New version 1.2.55

Martin Schwenke (2):
  ctdbd: Make the link status of new interfaces more flexible
  Eventscripts: 10.interface should list configured interfaces

---


-- 
CTDB repository


[SCM] CTDB repository - branch master updated - ctdb-2.0-13-g9a02f61

2012-11-26 Thread Amitay Isaacs
The branch, master has been updated
   via  9a02f61547ddf74629aca21639d8fb61c1df7cbb (commit)
  from  d05faf294e58e22ae3fbc76162258f1ae8178129 (commit)

http://gitweb.samba.org/?p=ctdb.git;a=shortlog;h=master


- Log -
commit 9a02f61547ddf74629aca21639d8fb61c1df7cbb
Author: Volker Lendecke v...@samba.org
Date:   Thu Nov 22 15:27:51 2012 +0100

vacuum: Avoid some tallocs in ctdb recovery

In a heavily loaded and volatile database a lot of SCHEDULE_FOR_DELETION
requests can come in between fast vacuuming runs. This can lead to
significant ctdb cpu load due to the cost of doing talloc_free. This
reduces the number of objects a bit by coalescing the two objects
of delete_record_data into one. It will also avoid having to allocate
another talloc header for a SCHEDULE_FOR_DELETION key. Not the full fix
for this problem, but it might contribute a bit.

---

Summary of changes:
 server/ctdb_vacuum.c |   14 --
 1 files changed, 8 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/server/ctdb_vacuum.c b/server/ctdb_vacuum.c
index 7f6a8f5..4a000b0 100644
--- a/server/ctdb_vacuum.c
+++ b/server/ctdb_vacuum.c
@@ -91,6 +91,7 @@ struct delete_record_data {
struct ctdb_db_context *ctdb_db;
struct ctdb_ltdb_header hdr;
TDB_DATA key;
+   uint8_t keydata[1];
 };
 
 struct delete_records_list {
@@ -108,21 +109,22 @@ static int insert_delete_record_data_into_tree(struct 
ctdb_context *ctdb,
 {
struct delete_record_data *dd;
uint32_t hash;
+   size_t len;
 
-   dd = talloc_zero(tree, struct delete_record_data);
+   len = offsetof(struct delete_record_data, keydata) + key.dsize;
+
+   dd = (struct delete_record_data *)talloc_size(tree, len);
if (dd == NULL) {
DEBUG(DEBUG_ERR,(__location__  Out of memory\n));
return -1;
}
+   talloc_set_name_const(dd, struct delete_record_data);
 
dd-ctdb  = ctdb;
dd-ctdb_db   = ctdb_db;
dd-key.dsize = key.dsize;
-   dd-key.dptr  = talloc_memdup(dd, key.dptr, key.dsize);
-   if (dd-key.dptr == NULL) {
-   DEBUG(DEBUG_ERR,(__location__  Out of memory\n));
-   return -1;
-   }
+   dd-key.dptr  = dd-keydata;
+   memcpy(dd-keydata, key.dptr, key.dsize);
 
dd-hdr = *hdr;
 


-- 
CTDB repository


[SCM] CTDB repository - branch master updated - ctdb-2.0-14-g905cd12

2012-11-26 Thread Amitay Isaacs
The branch, master has been updated
   via  905cd1293aa97dc7839a59b4f68eca02981f0891 (commit)
  from  9a02f61547ddf74629aca21639d8fb61c1df7cbb (commit)

http://gitweb.samba.org/?p=ctdb.git;a=shortlog;h=master


- Log -
commit 905cd1293aa97dc7839a59b4f68eca02981f0891
Author: Martin Schwenke mar...@meltin.net
Date:   Fri Nov 23 12:51:47 2012 +1100

Git should ignore generated include/version.h file

Signed-off-by: Martin Schwenke mar...@meltin.net

---

Summary of changes:
 .gitignore |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/.gitignore b/.gitignore
index 77ffc3b..6a71e4d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,3 +28,4 @@ tests/takeover/ctdb_takeover.pyc
 tests/eventscripts/var
 tests/eventscripts/etc/iproute2
 tests/eventscripts/etc-ctdb/policy_routing
+include/version.h


-- 
CTDB repository