Age | Commit message (Collapse) | Author | Files | Lines |
|
This is Stefan Metzmacher <metze@samba.org>'s patch with minor changes:
1) Use the TDB_MAGIC constant so both hashes aren't of strings.
2) Check the hash in tdb_check (paranoia, really).
3) Additional check in the (unlikely!) case where both examples hash to 0.
4) Cosmetic changes to var names and complaint message.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
We must not endian-convert the magic string, just the rest.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Commit bc1c82ea137 "Fix tdb_check() to work with read-only tdb databases."
claimed to do this, but tdb_lockall_read() fails on read-only databases.
Also make sure we can still do tdb_check() inside a transaction (weird,
but we previously allowed it so don't break the API).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
We can end up with dead areas when we die during transaction commit;
tdb_check() fails on such a (valid) database.
This is particularly noticable now we no longer truncate on recovery;
if the recovery area was at the end of the file we used to remove it
that way.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
This means we request the "Single UNIX Specification, Version 3" with C99
compatibility as the Python 2.5 release on the system. This prevents
redefinitions with different values.
> [ 451/1918] Compiling scripting/python/pyglue.c
> cc: Warning: /usr/local/include/python2.5/pyconfig.h, line 951: The redefinition of the macro "_XOPEN_SOURCE" conflicts with a current definition because the replacement lists differ. The redefinition is now in effect. (macroredef)
> #define _XOPEN_SOURCE 600
> ----------------------^
> cc: Warning: default/source4/include/config.h, line 54: The redefinition of the macro "_XOPEN_SOURCE" conflicts with a current definition because the replacement lists differ. The redefinition is now in effect. (macroredef)
> #define _XOPEN_SOURCE 500
> ----------------------^
|
|
Obviously we really need both definitions ("socklen_t" has been found by
"_XOPEN_SOURCE"=500). But now FIONREAD wasn't accessible.
|
|
|
|
Hopefully now we detect the built-in "socklen_t"
https://bugs.internet2.edu/jira/browse/SSPCPP-114
http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V50_HTML/MAN/MAN5/0001____.HTM
|
|
|
|
Guenther
|
|
|
|
|
|
|
|
|
|
This developer function is useful for debugging unusual error
conditions
|
|
NULL is converted to Py_None
|
|
|
|
|
|
|
|
|
|
fallback to the realtime clock
|
|
|
|
have it
|
|
|
|
|
|
|
|
This should fix a lot of warnings on IRIX.
If callers know what they're doing they can use discard_const_p()
on their own.
metze
|
|
This reverts commit 3d4fb698660381e650d7caeb5b7cff12847c0fb8.
This was wrong... The problem was in the caller, sa_len is a macro on irix
metze
|
|
metze
|
|
py_talloc_steal() was implemented as a macro which evaluated it's 2nd
argument twice. It was often called via a macro with a 2nd argument
that was a function call, for example an allocation in
py_talloc_new(). This meant it allocated memory twice, and leaked one
of them.
This re-implements py_talloc_steal() as a function, so that it only
does the allocation once.
|
|
|
|
Thanks to Michael Brown for pointing this out.
|
|
Thanks to Jelmer for pointing this out
|
|
used in the tdb manpages.
|
|
If the test setup fails, we still need to format the test result for the
UI. At leas in the subunit case, the format doesn't specify what to do
here, so we fail every test manually with the setup failure message.
|
|
|
|
|
|
pointers
(talloc.c)
...
> static inline int _talloc_free_internal(void *ptr, const char *location)
> {
> struct talloc_chunk *tc;
>
> if (unlikely(ptr == NULL)) {
> return -1;
> }
>
> tc = talloc_chunk_from_ptr(ptr);
...
Obviously this never had been documented before.
|
|
We saw tdb_lockall() take 71 seconds under heavy load; this is because Linux
(at least) doesn't prevent new small locks being obtained while we're waiting
for a big log.
The workaround is to do divide and conquer using non-blocking chainlocks: if
we get down to a single chain we block. Using a simple test program where
children did "hold lock for 100ms, sleep for 1 second" the time to do
tdb_lockall() dropped signifiantly. There are ln(hashsize) locks taken in
the contended case, but that's slow anyway.
More analysis is given in my blog at http://rusty.ozlabs.org/?p=120
This may also help transactions, though in that case it's the initial
read lock which uses this gradual locking routine; the update-to-write-lock
code is separate and still tries to update in one go.
Even though ABI doesn't change, minor version bumped so behavior change
can be easily detected.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
This is required for Solaris, which needs to link in librt to make use of
fdatasync().
|
|
tdb_lockall() uses F_WRLCK internally, which doesn't work on a fd opened with O_RDONLY. Use tdb_lockall_read() instead.
Jeremy.
|
|
Thanks to Brad Hards for this patch
|
|
Although the build was ok on my workstation it appears that on build
server it was not because the include path was not correct.
|
|
This is something that was not picked up during the migration to waf
|
|
this converts all callers that use the Samba4 loadparm lp_ calling
convention to use the lpcfg_ prefix.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
|
|
|
|
Guenther
|
|
|
|
|
|
|