Age | Commit message (Collapse) | Author | Files | Lines |
|
After we only collect nonlocal vnns in idx_state.vnns now, at this point
we *know* we have something to send to a remote node. The previous code
avoided the call to notify_push_remote_blob with an if-statement that
has now become unnecessary.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Mar 26 13:16:39 CET 2013 on sn-devel-104
|
|
notify_trigger_index_parser will not anymore add ourselves into the vnn
list that it collects.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
|
|
We have a good chance that we did not collect any remote vnns. This
avoids trying to walk the remote vnns altogether.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
|
|
This straightens the for-loop walking the path components slightly
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
|
|
For the nonclustered case we will only ever have one vnn in notify_index.tdb.
For this case, without this patch we did talloc_realloc when collecting vnns to
be able to do the memcpy instead of explicit copy with a for-loop. This new
code will partition the new vnns we see when parsing a notify_index.tdb record
into ourselves and all foreign vnns, only really collecting the foreign ones in
an array.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
|
|
Start the notification one level below /. Sharing and notifying / for changes
is broken at this moment anyway. When sharing / and someone wants to get
notified for changes under /usr, we store "//usr" as the notify_index key. So
this patch does not break anything that is not broken today, and it avoids a
bogus call to dbwrap_parse_records.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
|
|
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Mar 14 14:46:02 CET 2013 on sn-devel-104
|
|
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
|
|
metze
|
|
This helps clarify the role of this structure and wrapper function.
The purpose here is to provide helper functions to the lib/param
loadparm_context that point back at the s3 lp_ functions. This allows
a struct loadparm_context to be passed to any point in the code, and
always refer to the correct loadparm system. If this has not been
set, the variables loaded in the lib/param code will be returned.
As requested by Michael Adam.
Andrew Bartlett
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Jun 27 17:11:16 CEST 2012 on sn-devel-104
|
|
Signed-off-by: Stefan Metzmacher <metze@samba.org>
|
|
|
|
For the notify cleanup process we have a notify context without a
messaging entry. We will never call notify_add/remove for this, but
the code should protect against this.
|
|
|
|
This will allow db_open_tdb() to be called from common code, which may
already have a loadparm context loaded.
It also slowly moves the lp_ctx up the stack, as required to remove
the library loop between smbconf and the registry.
Andrew Bartlett
|
|
From notify_internal.c:
/*
* The notify database is split up into two databases: One
* relatively static index db and the real notify db with the
* volatile entries.
*/
This change is necessary to make notify scale better in a cluster
|
|
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Fri Mar 23 12:12:51 CET 2012 on sn-devel-104
|
|
|
|
|
|
|
|
|
|
|
|
This slightly simplifies the code
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Fri Mar 16 14:28:44 CET 2012 on sn-devel-104
|
|
|
|
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Mar 15 12:43:41 CET 2012 on sn-devel-104
|
|
It's not necessary to keep the global notify record locked during
the inotify and notify_onelevel.tdb operations.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
|
|
Signed-off-by: Stefan Metzmacher <metze@samba.org>
|
|
Signed-off-by: Stefan Metzmacher <metze@samba.org>
|
|
The server_id is tied to the messaging_context
Signed-off-by: Stefan Metzmacher <metze@samba.org>
|
|
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Thu Mar 15 10:59:46 CET 2012 on sn-devel-104
|
|
It's a bit confusing to mix low-level and high-level libraries. We had
multiple libraries in one directory, and there were have circular
dependencies with other libraries outside that directory (in this case,
samba-hostconfig).
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Mar 10 23:13:01 CET 2012 on sn-devel-104
|
|
This will be used to enforce a lock hierarchy between the databases. We have
seen deadlocks between locking.tdb, brlock.tdb, serverid.tdb and notify*.tdb.
These should be fixed by refusing a dbwrap_fetch_locked that does not follow a
defined lock hierarchy.
|
|
This passes down a struct loadparm_context to allow these
parameters to be checked. This may be s3 or s4 context, allowing the
#if _SAMBA_BUILD_ macro to go away safely.
Andrew Bartlett
|
|
Avoid direct use of the db_record and db_context structs.
|
|
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Fri Jul 29 13:34:22 CEST 2011 on sn-devel-104
|
|
Also start new folder lib/dbwrap/ where dbwrap_open.c is stored and
make the fallbacke implementation functoins non-static and create a
dbwrap_private.h header file that contains their prototypes.
|
|
My previous patches fixed up all direct TDB callers, but there are a
few utility functions and the db_context functions which are still
using the old -1 / 0 return codes.
It's clearer to fix up all the callers of these too, so everywhere is
consistent: non-zero means an error.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Using the standard macro makes it easier to move code into common, as
TALLOC_ZERO_P isn't standard talloc.
|
|
Guenther
|
|
This #if _SAMBA_BUILD == 3 is very unfortunate, as it means that in
the top level build, these options are not available for these
databases. However, having two different tdb_wrap lists is a worse
fate, so this will do for now.
Andrew Bartlett
|
|
|
|
Guenther
|
|
Guenther
|
|
Guenther
|
|
Guenther
|
|
TDB_CLEAR_IF_FIRST tdb's. For tdb's like gencache where we open
without CLEAR_IF_FIRST and then with CLEAR_IF_FIRST if corrupt
this is still safe to use as if opening an existing tdb the new
hash will be ignored - it's only used on creating a new tdb not
opening an old one.
Jeremy.
|
|
|
|
Guenther
|
|
|
|
This shrinks include/includes.h.gch by the size of 7 MB and reduces build time
as follows:
ccache build w/o patch
real 4m21.529s
ccache build with patch
real 3m6.402s
pch build w/o patch
real 4m26.318s
pch build with patch
real 3m6.932s
Guenther
|