summaryrefslogtreecommitdiff
path: root/source4/ntvfs/common/brlock.c
AgeCommit message (Collapse)AuthorFilesLines
2011-09-19s4:ntvfs/common/brlock.c - remove unnecessary include "tdb_compat.h"Matthias Dieter Wallnöfer1-1/+0
Attempt to fix bug #8468 (https://bugzilla.samba.org/show_bug.cgi?id=8468). Reviewed-by: Jelmer Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Mon Sep 19 18:03:24 CEST 2011 on sn-devel-104
2011-06-20tdb_compat.h: divert every tdb build and includes to tdb_compatRusty Russell1-1/+1
We change all the headers and wscript files to use tdb_compat; this means we have one place to decide whether to use TDB1 or TDB2. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-05-08s4-ntvfs: Rename brl_*() -> brlock_*() to avoid conflict with brlock_init in s3Andrew Bartlett1-9/+9
2011-05-03s4-messaging Rename messaging -> imessagingAndrew Bartlett1-3/+3
This avoid symbol and structure conflicts between Samba3 and Samba4, and chooses a less generic name. Andrew Bartlett
2011-02-28Use <tdb.h> to include tdb, so the system include file gets used when ↵Jelmer Vernooij1-1/+1
building against system tdb.
2011-02-15s4: Don't grant level II oplock to a file with byte-range locks.Pavel Shilovsky1-0/+10
Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Tue Feb 15 11:09:17 CET 2011 on sn-devel-104
2008-12-23Use 32-bit smbpid in interface as required by SMB2, in line withJelmer Vernooij1-2/+2
1bdd08227e7d046305705050f21f0f1b6dd6994a.
2008-09-16Fix last few includes to use new tdb location.Jelmer Vernooij1-1/+1
2008-06-02smbpid needs to be 32 bit now to cope with SMB2Andrew Tridgell1-1/+1
(This used to be commit a2854fd6eaf097b5a9a562e0b8f1a599485fec42)
2007-12-21r26355: Eliminate global_loadparm in more places.Jelmer Vernooij1-1/+2
(This used to be commit 5d589a0d94bd76a9b4c9fc748854e8098ea43c4d)
2007-12-21r26003: Split up DB_WRAP, as first step in an attempt to sanitize dependencies.Jelmer Vernooij1-1/+0
(This used to be commit 56dfcb4f2f8e74c9d8b2fe3a0df043781188a555)
2007-10-10r24284: change brlock_tdb.c to use the dbwrap API. This actually makes theAndrew Tridgell1-5/+1
backend abstraction for brlock pointless, but I have left it in place for now. It would be useful for other clustering systems that can't map to dbwrap, and would also be useful if we wanted to keep the remote function call capabilities in ctdb instead of the less efficient fetch_locked() call in dbwrap (This used to be commit 912c014b7c131ab051ff6eb2db4e68cb6fbbeb14)
2007-10-10r23792: convert Samba4 to GPLv3Andrew Tridgell1-3/+2
There are still a few tidyups of old FSF addresses to come (in both s3 and s4). More commits soon. (This used to be commit fcf38a38ac691abd0fa51b89dc951a08e89fdafa)
2007-10-10r20897: fix compiler warningsStefan Metzmacher1-1/+1
metze (This used to be commit 5ac562e1e0e8de03c8bcd083a1822b31667c5e21)
2007-10-10r20894: the new brlock.c is needed (seems a svn rename + new file didn't makeAndrew Tridgell1-0/+132
it in one commit) (This used to be commit 3315e877ab6504569e2869b52d989fc821982a3b)
2007-10-10r20891: enable multiple brlock backends. The tdb backend is the default. TheAndrew Tridgell1-689/+0
prototype ctdb backend is in cluster/ctdb/brlock_ctdb.c (This used to be commit 84d0e5316299931dc26f2a7b86962d2fffcc4b71)
2007-10-10r20653: If this is the wrong way to fix the build, I apologize. But these ↵Volker Lendecke1-0/+1
includes are necessary in my environment to get through make. Volker (This used to be commit 47e80da39f27a7e7aa6f85d6333f2d1772292ec9)
2007-10-10r20646: first preparations for cluster enablement. This changes "Andrew Tridgell1-7/+7
uint32_t server_id to struct server_id server_id; which allows a server ID to have an node number. The node number will be zero in non-clustered case. This is the most basic hook needed for clustering, and ctdb. (This used to be commit 2365abaa991d57d68c6ebe9be608e01c907102eb)
2007-10-10r15734: This is a major change to the NTVFS subsystem:Stefan Metzmacher1-11/+11
- to use a struct ntvfs_handle instead of a uint16_t fnum. (to make it independend from the frontend protocol) - the allocation of handles now is provided by the frontend (smbsrv_*) via callbacks and not by each backend module - this also makes sure that file handles are only passed to the ntvfs subsystem when the tcon and session matches, so modules can rely on this and need to check this. - this allows multiple modules in the ntvfs module chain to allocate file handles. This can be used for virtual files like "\\$Extend\\$Quota:$Q:$INDEX_ALLOCATION"... - also this will make SMB2 with 128 bit file handles possible metze (This used to be commit 287fc1c22d670f6e568014b420f7f4cb31dc7958)
2007-10-10r15614: the byte range locking error handling caches the last failed lockStefan Metzmacher1-43/+89
per file handle and not per tree connect metze (This used to be commit 5d825261c0b8341f0a7f0f6d96d83807352566f4)
2007-10-10r15613: the snum doesn't identify the tcon, but the brl_context pointer doesStefan Metzmacher1-10/+9
metze (This used to be commit 5e256f4b78441269de2e53c9582f3237e4220f6c)
2007-10-10r15612: look at the lock_type and not at the notify_ptr being NULL or notStefan Metzmacher1-2/+3
metze (This used to be commit 7fa6d736913af2d1d2215ca1a04ed8763ccb3d45)
2007-10-10r14822: if we use the snum used by the lp_* functions instead of the wire TID,Stefan Metzmacher1-10/+10
then don't use tid as name... metze (This used to be commit d41d48caf209fec9f5f04d38d75277b1cfeed22f)
2007-10-10r13701: removed some unnecessary castsAndrew Tridgell1-5/+5
(This used to be commit f7d0ac936380102e087d4b7c336d7feb68b62314)
2007-10-10r13658: More moving around of files:Jelmer Vernooij1-3/+4
- Collect the generic utility functions into a lib/util/ (a la GLib is for the GNOME folks) - Remove even more files from include/ (This used to be commit ba62880f5b05c2a505dc7f54676b231197a7e707)
2007-10-10r12694: Move some headers to the directory of the subsystem they belong to.Jelmer Vernooij1-1/+1
(This used to be commit c722f665c90103f3ed57621c460e32ad33e7a8a3)
2007-10-10r7294: implemented the irpc messaging system. This is the core of theAndrew Tridgell1-0/+1
management system I proposed on samba-technical a couple of days ago. Essentially it is a very lightweight way for any code in Samba to make IDL based rpc calls to anywhere else in the code, without the client or server having to go to the trouble of setting up a full rpc service. It can be used with any of our existing IDL, but I expect it will mostly be used for a new set of Samba specific management calls. The LOCAL-IRPC torture test demonstrates how it can be used by calling the echo_AddOne() call over this transport. (This used to be commit 3d589a09954eb8b318f567e1150b0c27412fb942)
2007-10-10r5307: removed db_wrap.h from includes.hAndrew Tridgell1-0/+1
(This used to be commit 826baec7b348814a7bbdcdbec8c8526514f25da1)
2007-10-10r5298: - got rid of pstring.h from includes.h. This at least makes it a bitAndrew Tridgell1-0/+1
less likely that anyone will use pstring for new code - got rid of winbind_client.h from includes.h. This one triggered a huge change, as winbind_client.h was including system/filesys.h and defining the old uint32 and uint16 types, as well as its own pstring and fstring. (This used to be commit 9db6c79e902ec538108d6b7d3324039aabe1704f)
2007-10-10r5296: - only include the tdb headers where they are neededAndrew Tridgell1-0/+1
- removed the u32 hack in events.c as I think this was only needed as tdb.h defines u32. Metze, can you check that this hack is indeed no longer needed on your suse system? (This used to be commit 6f79432fe656164d4770dbce114a30dda5e7bf9a)
2007-10-10r5137: fix typesStefan Metzmacher1-1/+1
metze (This used to be commit add1c579375d08040f722946da31ee3862f9e7ac)
2007-10-10r5102: This is a major simplification of the logic for controlling top levelAndrew Tridgell1-3/+3
servers in smbd. The old code still contained a fairly bit of legacy from the time when smbd was only handling SMB connection. The new code gets rid of all of the smb_server specific code in smbd/, and creates a much simpler infrastructures for new server code. Major changes include: - simplified the process model code a lot. - got rid of the top level server and service structures completely. The top level context is now the event_context. This got rid of service.h and server.h completely (they were the most confusing parts of the old code) - added service_stream.[ch] for the helper functions that are specific to stream type services (services that handle streams, and use a logically separate process per connection) - got rid of the builtin idle_handler code in the service logic, as none of the servers were using it, and it can easily be handled by a server in future by adding its own timed_event to the event context. - fixed some major memory leaks in the rpc server code. - added registration of servers, rather than hard coding our list of possible servers. This allows for servers as modules in the future. - temporarily disabled the winbind code until I add the helper functions for that type of server - added error checking on service startup. If a configured server fails to startup then smbd doesn't startup. - cleaned up the command line handling in smbd, removing unused options (This used to be commit cf6a46c3cbde7b1eb1b86bd3882b953a2de3a42e)
2007-10-10r5037: got rid of all of the TALLOC_DEPRECATED stuff. My apologies for theAndrew Tridgell1-1/+1
large commit. I thought this was worthwhile to get done for consistency. (This used to be commit ec32b22ed5ec224f6324f5e069d15e92e38e15c0)
2007-10-10r4054: got rid of Realloc(), replacing it with the type safe macro realloc_p()Andrew Tridgell1-7/+6
(This used to be commit b0f6e21481745d1b2ced28d9ed6f09f6ffd99562)
2007-10-10r3969: fix compiler warningsStefan Metzmacher1-5/+5
metze (This used to be commit 7d24b98f3ff55049a7c0d430c15e0a060b4aa2d3)
2007-10-10r3528: added support for the SMBntcancel() operation, which cancels anyAndrew Tridgell1-7/+8
outstanding async operation (triggering an immediate timeout). pvfs now passes the RAW-MUX test (This used to be commit 3423e2f41461d054067ef168b9b986f62cc8f77c)
2007-10-10r3507: - added deferred replies on sharing violation in pvfs open. TheAndrew Tridgell1-5/+2
deferred reply is short-circuited immediately when the file is closed by another user, allowing it to be opened by the waiting user. - added a sane set of timeval manipulation routines - converted all the events code and code that uses it to use struct timeval instead of time_t, which allows for microsecond resolution instead of 1 second resolution. This was needed for doing the pvfs deferred open code, and is why the patch is so big. (This used to be commit 0d51511d408d91eb5f68a35e980e0875299b1831)
2007-10-10r3463: separated out some more headers (asn_1.h, messages.h, dlinklist.h and ↵Andrew Tridgell1-0/+1
ioctl.h) (This used to be commit b97e395c814762024336c1cf4d7c25be8da5813a)
2007-10-10r3360: improved the deletion of tmp files. smbd now puts all tmp files in ↵Andrew Tridgell1-3/+2
var/locks/smbd.tmp/ and deletes that dir on startup. (This used to be commit 7e942e7f1bd2c293a0e6648df43a96f8b8a2a295)
2007-10-10r3357: removed the need to use TDB_CLEAR_IF_FIRST in Samba4.Andrew Tridgell1-1/+1
We found a few months ago that TDB_CLEAR_IF_FIRST is extremely inefficient for large numbers of connections, due to a fundamental limitation in the way posix byte range locking is implemented. Rather than the nasty workaround we had for Samba3, we now have a single "cleanup tmp files" function that runs when smbd starts. That deletes the tmp tdbs, so TDB_CLEAR_IF_FIRST is not needed at all. (This used to be commit ffa285bc783c775a2d53a58fb691ca339e6c76ae)
2007-10-10r3312: in the brlock code, we prevent lock stampedes by attempting to notAndrew Tridgell1-1/+3
wakeup all pending locks at once. This change means that we only trigger this anti-stampede code for write locks, as for pending read locks the correct behaviour is to stampede (as they will all succeed) (This used to be commit 8021d1d74207db1204139309592b9d2f80f2bd0e)
2007-10-10r3271: use "struct messaging_context *" instead of "void *" in messaging APIAndrew Tridgell1-2/+2
(This used to be commit cc93813e4a09c538ad485dc2b3cb4c9be34f3d18)
2007-10-10r3126: in the brlock code I had used a void* for the brl context as I didn'tAndrew Tridgell1-14/+9
want to expose the brl context structure outside the brlock.c code. Instead, I now use "struct brl_context *" and rely on C being happy to pass around pointers to unknown structures as long as they are not dereferenced. I will be interested to see how the build farm likes this. (This used to be commit cb155c8ad837285c5a7f5b104968239df0b65fd2)
2007-10-10r3031: added support for lock cancelation, which effectively just triggers ↵Andrew Tridgell1-5/+14
an early lock timeout added support for more of the bizarre special lock offset semantics of w2k3 (This used to be commit d5bfc910b1200fb283e26572dc57fcf93652fd32)
2007-10-10r3029: implemented byte range lock timeouts.Andrew Tridgell1-28/+244
This adds a pvfs_wait_message() routine which uses the new messaging system, event timers and talloc destructors to give a nice generic async event handling system with a easy to use interface. The extensions to pvfs_lock.c are based on calls to pvfs_wait_message() routines. We now pass all of our smbtorture locking tests, although while writing this code I have thought of some additonal tests that should be added, particularly for lock cancel operations. I'll work on that soon. This commit also extends the smbtorture lock tests to test the rather weird 0xEEFFFFFF locking semantics that I have discovered in win2003. Win2003 treats the 0xEEFFFFFF boundary as special, and will give different error codes on either side of it. Locks on both sides are allowed, the only difference is which error code is given when a lock is denied. Anyone like to hazard a guess as to why? It has me stumped. (This used to be commit 4395c0557ab175d6a8dd99df03c266325949ffa5)
2007-10-10r3012: added initial support for byte range locking in the posix vfs. This isAndrew Tridgell1-0/+418
enough for us to pass locktest, but does not yet support lock timeouts and some of the other esoteric features. (This used to be commit 58a92abd88f190bc60894a68e0528e95ae33fe39)