1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
Commit Graph

182 Commits

Author SHA1 Message Date
Andrew Tridgell
289911bb4e r15048: started on the server side implementation of oplocks. The code is not
functional yet, I'm committing so it doesn't diverge too much from
other peoples work. It is disabled by default.
(This used to be commit ba0b8a218d)
2007-10-10 14:04:03 -05:00
Jelmer Vernooij
fd4a8ad8c3 r14993: Make subsystems again
(This used to be commit d55b040bd2)
2007-10-10 14:00:52 -05:00
Stefan Metzmacher
7672505c72 r14966: make more functions _PUBLIC_
metze
(This used to be commit 193f7da254)
2007-10-10 14:00:47 -05:00
Stefan Metzmacher
2e894625e7 r14964: - move sidmap code from ntvfs_common to SAMDB
- make ntvfs_common a library
- create sys_notify library

metze
(This used to be commit a3e1d56cf7)
2007-10-10 14:00:47 -05:00
Andrew Tridgell
26c9cd6211 r14960: don't declare variables mid-function
(This used to be commit 4537de9289)
2007-10-10 14:00:46 -05:00
Andrew Tridgell
cd794e79f9 r14959: allow change notify to be disabled completely using
notify:enable=False
(This used to be commit 2a8f093105)
2007-10-10 14:00:46 -05:00
Andrew Tridgell
127967334f r14956: change the notify search to be much more efficient by using a
per-depth bisection search. This makes the notify_trigger() call
log(N) which makes us scale well for large numbers of outstanding
notifies
(This used to be commit 16fd00925f)
2007-10-10 14:00:45 -05:00
Stefan Metzmacher
317c4b81a5 r14951: - remove unused var 'path'
- fix compiler warning

metze
(This used to be commit 4d7de8b251)
2007-10-10 14:00:22 -05:00
Andrew Tridgell
fa91368fb4 r14945: allow the notify backend to be specified per share
(This used to be commit 467027e773)
2007-10-10 14:00:21 -05:00
Stefan Metzmacher
115acb5dd0 r14939: don't use a void pointer
metze
(This used to be commit 03906b2b13)
2007-10-10 14:00:20 -05:00
Andrew Tridgell
416d7b4210 r14920: allow a notify backend to separately specify if it has handled the
given mask for the current directory and sub-directories. This allows
us to setup the less efficient internal handling for subdirectories,
while using the kernel inotify service for the current directory if
available. It also allows inotify to handle only some of the filter
bits, leaving the other filter bits for the user space handler.
(This used to be commit 7c3d989fa4)
2007-10-10 14:00:17 -05:00
Andrew Tridgell
a9cb173f76 r14918: cleaner handling of systems without inotify
(This used to be commit cf17ff15b1)
2007-10-10 14:00:16 -05:00
Andrew Tridgell
6d98076c15 r14877: added support for the kernel inotify mechanism. This passes basic
tests, but still needs some more work to ensure we correctly cope with
events that may generate both a system inotify event and a internal
notify event. The system inotify events won't handle recursion, and
don't understand things like streams.

This also adds the ntvfs/sysdep/ directory, which is meant for system
dependent code that is not tied to a particular ntvfs backend. The
inotify code is a good example of that.
(This used to be commit eadadbb44a)
2007-10-10 14:00:11 -05:00
Stefan Metzmacher
1af925f394 r14860: create libcli/security/security.h
metze
(This used to be commit 9ec706238c)
2007-10-10 13:59:44 -05:00
Andrew Tridgell
05c53f70f0 r14838: fix the build. Looks like I still haven't quite got the hang of the
new dependency/proto system :-)
(This used to be commit 63ae3f21e3)
2007-10-10 13:59:25 -05:00
Andrew Tridgell
07372df2fa r14835: split out the config rules for the ntvfs/common/ directory
(This used to be commit 33495d19cf)
2007-10-10 13:59:24 -05:00
Stefan Metzmacher
96b5dd789b r14822: if we use the snum used by the lp_* functions instead of the wire TID,
then don't use tid as name...

metze
(This used to be commit d41d48caf2)
2007-10-10 13:59:24 -05:00
Andrew Tridgell
6942d1d62c r14805: use tdb_lock_bystring() to prevent race conditions in notify add/remove
(This used to be commit a6be44f78c)
2007-10-10 13:59:21 -05:00
Andrew Tridgell
aec7f3ae72 r14803: copy with the root directory, which has /. on the end of the path
(This used to be commit 16742cd286)
2007-10-10 13:59:21 -05:00
Andrew Tridgell
24bacd1113 r14800: use tdb_get_seqnum() in the change notify code to avoid reloading the
notify record if the tdb has not changed. This makes the
notify_trigger() call much faster, which is important as it is called
on just about every file operation
(This used to be commit d09b8761bf)
2007-10-10 13:59:20 -05:00
Andrew Tridgell
ed3fc62871 r14797: added checking of the filter in notify requests
(This used to be commit 1db0a5a7f4)
2007-10-10 13:59:20 -05:00
Andrew Tridgell
57bde8631f r14755: the change notify code now passes most of the RAW-NOTIFY test. Still
more work to do though
(This used to be commit 4d234b37e5)
2007-10-10 13:59:18 -05:00
Stefan Metzmacher
ad06a8bd65 r14736: - the ntvfs subsystem should not know about smb_server.h
- the process module subsystem should not know about smb_server.h
- the smb_server module should not know about process models

metze
(This used to be commit bac95bb8f4)
2007-10-10 13:59:17 -05:00
Andrew Tridgell
3434cd778c r14616: added notify change support to the posix backend
It doesn't fully work yet, and doesn't yet have all the efficiency
that is planned, but it doesn't break anything and I wanted to get the
code in the tree to minimise the chance of collisions with the work
metze is doing.
(This used to be commit 1624ea88e6)
2007-10-10 13:59:02 -05:00
Jelmer Vernooij
8528016978 r14464: Don't include ndr_BASENAME.h files unless strictly required, instead
try to include just the BASENAME.h files (containing only structs)
(This used to be commit 3dd477ca51)
2007-10-10 13:57:27 -05:00
Jelmer Vernooij
4ac2be9958 r13924: Split more prototypes out of include/proto.h + initial work on header
file dependencies
(This used to be commit 1228358767)
2007-10-10 13:52:24 -05:00
Andrew Tridgell
40a8d58551 r13739: a fairly major overhaul of the opendb code to allow the BASE-DELETE
test to pass. To try to make the code a bit more understandable, I
moved to using an IDL description of the opendb tdb record format.

One of the larger changes was to make directory opens and creates go
via the opendb code, so directory operations now obey all the share
mode restrictions, as well as delete on close semantics. I also
changed the period over which the opendb locks are held, to try to
minimise races due to two open operations happening at the same time.
(This used to be commit cd2602d057)
2007-10-10 13:52:08 -05:00
Stefan Metzmacher
6236e5cabc r13708: fix compiler warnings
metze
(This used to be commit 830c42afda)
2007-10-10 13:52:06 -05:00
Andrew Tridgell
04cf19bd59 r13701: removed some unnecessary casts
(This used to be commit f7d0ac9363)
2007-10-10 13:52:06 -05:00
Jelmer Vernooij
dfc517b053 r13658: More moving around of files:
- 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 ba62880f5b)
2007-10-10 13:52:05 -05:00
Andrew Bartlett
ce927996c9 r13281: Use TALLOC_CTX * not a void *, and use tmp_ctx as the name for consistancy.
(I was chasing ghosts in this code, and decided to do a cleanup while
I was there).

Andrew Bartlett
(This used to be commit c05f6be09a)
2007-10-10 13:51:42 -05:00
Andrew Tridgell
99c559cd58 r13276: start to work towards the BASE-DELETE test passing. This change
ensures that we give the right error code to opens that are denied due
to the file having delete pending set
(This used to be commit c5b709fae6)
2007-10-10 13:51:41 -05:00
Jelmer Vernooij
78c50015bb r12694: Move some headers to the directory of the subsystem they belong to.
(This used to be commit c722f665c9)
2007-10-10 13:49:39 -05:00
Jelmer Vernooij
d4de4c2d21 r12608: Remove some unused #include lines.
(This used to be commit 70e7449318)
2007-10-10 13:49:03 -05:00
Jelmer Vernooij
2cd5ca7d25 r12542: Move some more prototypes out to seperate headers
(This used to be commit 0aca5fd513)
2007-10-10 13:47:55 -05:00
Andrew Bartlett
1377cca5f4 r10810: This adds the hooks required to communicate the current user from the
authenticated session down into LDB.  This associates a session info
structure with the open LDB, allowing a future ldb_ntacl module to
allow/deny operations on that basis.

Along the way, I cleaned up a few things, and added new helper functions
to assist.  In particular the LSA pipe uses simpler queries for some of
the setup.

In ldap_server, I have removed the 'ldasrv:hacked' module, which hasn't
been worked on (other than making it continue to compile) since January,
and I think the features of this module are being put into ldb anyway.

I have also changed the partitions in ldap_server to be initialised
after the connection, with the private pointer used to associate the ldb
with the incoming session.

Andrew Bartlett
(This used to be commit fd7203789a)
2007-10-10 13:39:32 -05:00
Andrew Bartlett
00d69bdf23 r10148: Use samdb_base_dn() to find the local domain.
Andrew Bartlett
(This used to be commit 4969f86ac2)
2007-10-10 13:38:03 -05:00
Andrew Tridgell
bdee131f30 r7860: switch our ldb storage format to use a NDR encoded objectSid. This is
quite a large change as we had lots of code that assumed that
objectSid was a string in S- format.

metze and simo tried to convince me to use NDR format months ago, but
I didn't listen, so its fair that I have the pain of fixing all the
code now :-)

This builds on the ldb_register_samba_handlers() and ldif handlers
code I did earlier this week. There are still three parts of this
conversion I have not finished:

 - the ltdb index records need to use the string form of the objectSid
   (to keep the DNs sane). Until that it done I have disabled indexing on
   objectSid, which is a big performance hit, but allows us to pass
   all our tests while I rejig the indexing system to use a externally
   supplied conversion function

 - I haven't yet put in place the code that allows client to use the
   "S-xxx-yyy" form for objectSid in ldap search expressions. w2k3
   supports this, presumably by looking for the "S-" prefix to
   determine what type of objectSid form is being used by the client. I
   have been working on ways to handle this, but am not happy with
   them yet so they aren't part of this patch

 - I need to change pidl to generate push functions that take a
   "const void *" instead of a "void*" for the data pointer. That will
   fix the couple of new warnings this code generates.

Luckily it many places the conversion to NDR formatted records
actually simplified the code, as it means we no longer need as many
calls to dom_sid_parse_talloc(). In some places it got more complex,
but not many.
(This used to be commit d40bc2fa8d)
2007-10-10 13:18:44 -05:00
Volker Lendecke
9105bf4054 r7621: Trivial reformatting while trying to understand share modes. Still survives
smbtorture *DENY* .

Volker
(This used to be commit da78ed1a4d)
2007-10-10 13:18:14 -05:00
Andrew Tridgell
bf1ffa283c r7294: implemented the irpc messaging system. This is the core of the
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 3d589a0995)
2007-10-10 13:17:37 -05:00
Andrew Bartlett
79f6bcd5ae r5988: Fix the -P option (use machine account credentials) to use the Samba4
secrets system, and not the old system from Samba3.

This allowed the code from auth_domain to be shared - we now only
lookup the secrets.ldb in lib/credentials.c.

In order to link the resultant binary, samdb_search() has been moved
from deep inside rpc_server into lib/gendb.c, along with the existing
gendb_search_v().  The vast majority of this patch is the simple
rename that followed,

(Depending on the whole SAMDB for just this function seemed pointless,
and brought in futher dependencies, such as smbencrypt.c).

Andrew Bartlett
(This used to be commit e13c671619)
2007-10-10 13:11:12 -05:00
Andrew Tridgell
a0e6f6c05b r5309: removed ads.h from includes.h
(This used to be commit 196c45b834)
2007-10-10 13:09:40 -05:00
Andrew Tridgell
a5bd1ccada r5307: removed db_wrap.h from includes.h
(This used to be commit 826baec7b3)
2007-10-10 13:09:40 -05:00
Andrew Tridgell
e82aad1ce3 r5298: - got rid of pstring.h from includes.h. This at least makes it a bit
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 9db6c79e90)
2007-10-10 13:09:38 -05:00
Andrew Tridgell
fedf0b0d91 r5296: - only include the tdb headers where they are needed
- 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 6f79432fe6)
2007-10-10 13:09:38 -05:00
Stefan Metzmacher
d8d3a5ffe3 r5137: fix types
metze
(This used to be commit add1c57937)
2007-10-10 13:09:26 -05:00
Andrew Tridgell
55d4d36993 r5102: This is a major simplification of the logic for controlling top level
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 cf6a46c3cb)
2007-10-10 13:09:22 -05:00
Andrew Tridgell
759da3b915 r5037: got rid of all of the TALLOC_DEPRECATED stuff. My apologies for the
large commit. I thought this was worthwhile to get done for
consistency.
(This used to be commit ec32b22ed5)
2007-10-10 13:09:15 -05:00
Andrew Tridgell
cc55aef7c1 r4547: - added talloc_new(ctx) macro that is a neater form of the common talloc(ctx, 0) call.
- cleaned up some talloc usage in various files

I'd like to get to the point that we have no calls to talloc(), at
which point we will rename talloc_p() to talloc(), to encourage
everyone to use the typesafe functions.
(This used to be commit e6c81d7c9f)
2007-10-10 13:08:20 -05:00
Andrew Tridgell
e5ce904ddb r4054: got rid of Realloc(), replacing it with the type safe macro realloc_p()
(This used to be commit b0f6e21481)
2007-10-10 13:06:19 -05:00
Andrew Tridgell
58c326809a r4052: fixed a bunch of code to use the type safe _p allocation macros
(This used to be commit 80d15fa340)
2007-10-10 13:06:18 -05:00
Andrew Tridgell
fdc9f417d8 r4011: get rid of rpc_secdes.h and replace it with a single sane set of
definitions for security access masks, in security.idl

The previous definitions were inconsistently named, and contained many
duplicate and misleading entries. I kept finding myself tripping up
while using them.
(This used to be commit 01c0fa722f)
2007-10-10 13:06:13 -05:00
Andrew Tridgell
b393de7f05 r3992: provide hooks for lsa to lookup sids allocated using the linear id->sid mapping
(This used to be commit e611405109)
2007-10-10 13:06:11 -05:00
Andrew Tridgell
8b4c1f448c r3989: added a linear algorithmic mapping for uid->sid and gid->sid within
our local domain. Note that this linear mapping does not suffer from
the "foreign sid" problems of the linear mappings we have previously
rejected for the sid->uid problem.

the mapping allows for 1 billion automatically allocated users or
groups for the local domain.
(This used to be commit 8f57343975)
2007-10-10 13:06:11 -05:00
Andrew Tridgell
6895228b5c r3982: split out the sid -> uid/gid mapping routines into a ntvfs_sidmap
subsystem. This is in preparation for adding better default ACL
generation in pvfs, which will require uid/gid -> sid mapping.
(This used to be commit b31108e492)
2007-10-10 13:06:11 -05:00
Stefan Metzmacher
daea5e8c8c r3969: fix compiler warnings
metze
(This used to be commit 7d24b98f3f)
2007-10-10 13:06:09 -05:00
Andrew Tridgell
ae7caf08c1 r3798: added support for alternate data streams in xattrs into pvfs.
The trickiest part about this was getting the sharing and locking
rules right, as alternate streams are separate locking spaces from the
main file for the purposes of byte range locking, and separate for
most share violation rules.

I suspect there are still problems with delete on close with alternate
data streams. I'll look at that next.
(This used to be commit b6452c4a20)
2007-10-10 13:05:54 -05:00
Andrew Tridgell
19fc6e8f51 r3615: split out struct pvfs_file_handle from struct pvfs_file. This is in
preparation for adding code to pass the BASE-DENY1 and BASE-DENYDOS
tests, which require a shared filesystem handle for some specific
combinations of two DENY_DOS opens on the same connection.
(This used to be commit 6e4fdf01d1)
2007-10-10 13:05:40 -05:00
Andrew Tridgell
0c5f2ba38e r3597: implement a suggestion from abartlet. By taking a refernce to the
database in the opendb lck, we ensure that the database is not closed
before the lock is gone. That ensures the lock destructor doesn't work
on a closed database.
(This used to be commit 218e01441a)
2007-10-10 13:05:37 -05:00
Andrew Tridgell
80eef3ea66 r3539: much nicer async open delay code.
The previous code didn't handle the case where the file got renamed or
deleted while waiting for the sharing violation delay. To handle this
we need to make the 2nd open a full open call, including the name
resolve call etc. Luckily this simplifies the logic.

I also expanded the RAW-MUX test to include the case where we do
open/open/open/close/close, with the 3rd open async, and that open
gets retried after both the first close and the 2nd close, with the
first retry failing and the 2nd retry working. The tests the "async
reply after a async reply" logic in pvfs_open().
(This used to be commit eded2ad9c9)
2007-10-10 13:05:29 -05:00
Andrew Tridgell
c870ae8b89 r3528: added support for the SMBntcancel() operation, which cancels any
outstanding async operation (triggering an immediate timeout).

pvfs now passes the RAW-MUX test
(This used to be commit 3423e2f414)
2007-10-10 13:05:28 -05:00
Andrew Tridgell
dde0705807 r3507: - added deferred replies on sharing violation in pvfs open. The
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 0d51511d40)
2007-10-10 13:05:23 -05:00
Andrew Tridgell
3643fb1109 r3463: separated out some more headers (asn_1.h, messages.h, dlinklist.h and ioctl.h)
(This used to be commit b97e395c81)
2007-10-10 13:05:17 -05:00
Andrew Tridgell
d93636c29e r3387: fixed pvfs to pass the NTDENY tests. The tricky bit was
SA_RIGHT_FILE_EXECUTE, which depends on a flags2 bit
(This used to be commit c36851d230)
2007-10-10 13:05:04 -05:00
Andrew Tridgell
9752471973 r3363: added basic support for SA_RIGHT_FILE_EXECUTE, needed for opening .dll files
(This used to be commit ba1bfd51e1)
2007-10-10 13:05:01 -05:00
Andrew Tridgell
09d0b152b7 r3360: improved the deletion of tmp files. smbd now puts all tmp files in var/locks/smbd.tmp/
and deletes that dir on startup.
(This used to be commit 7e942e7f1b)
2007-10-10 13:05:01 -05:00
Andrew Tridgell
dbf0395924 r3357: removed the need to use TDB_CLEAR_IF_FIRST in Samba4.
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 ffa285bc78)
2007-10-10 13:05:00 -05:00
Andrew Tridgell
c8c3a56b8b r3312: in the brlock code, we prevent lock stampedes by attempting to not
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 8021d1d742)
2007-10-10 13:04:53 -05:00
Andrew Tridgell
05ad898f68 r3271: use "struct messaging_context *" instead of "void *" in messaging API
(This used to be commit cc93813e4a)
2007-10-10 13:04:48 -05:00
Andrew Tridgell
5c95896499 r3189: improved the share_conflict() logic (both in terms of readability and
correctness). pvfs now passes the BASE-RENAME test.
(This used to be commit 4cf3f65a5c)
2007-10-10 13:04:38 -05:00
Andrew Tridgell
c1c696460b r3174: added pvfs_is_open() to allow us to check for open files on unlink. We
now pass BASE-UNLINK.
(This used to be commit f23a2f8538)
2007-10-10 13:04:36 -05:00
Andrew Tridgell
d581727138 r3153: pvfs now passes the first 9 of the BASE-DELETE tests
(This used to be commit f8041feaeb)
2007-10-10 13:02:26 -05:00
Andrew Tridgell
3d5f3e39e5 r3147: added basic share modes support for pvfs (or more precisely, ntcreatex
share_access support).  This is enough for us to pass the BASE-DENY2
test, but is a long way from fully correct share modes.
(This used to be commit b5a6dd3cbf)
2007-10-10 13:02:25 -05:00
Andrew Tridgell
020b386560 r3135: split the "create new" logic out from the "open existing" logic in
pvfs_open, and handle the various race conditions that are inherent in
cifs on unix, so we do the best we can when the race happens.

the ntcreatex code is really starting to take shape now
(This used to be commit 395c3815b4)
2007-10-10 13:02:25 -05:00
Volker Lendecke
e51ae38d7b r3129: typo
(This used to be commit f9dfd5ff1f)
2007-10-10 13:02:24 -05:00
Andrew Tridgell
1cd1b172d5 r3127: added the initial code for the open files database. Doesn't do
anything yet, but will soon be the core of the shares modes code.
(This used to be commit ad1edabf95)
2007-10-10 13:02:24 -05:00
Andrew Tridgell
1ec644619d r3126: in the brlock code I had used a void* for the brl context as I didn't
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 cb155c8ad8)
2007-10-10 13:02:24 -05:00
Andrew Tridgell
b2b8282b8c r3057: - moved the idtree.c code into lib/
- converted the tid handling to use a idtree instead of bitmaps
(This used to be commit 4220914179)
2007-10-10 13:01:54 -05:00
Andrew Tridgell
cf1b85348a r3056: added a id -> pointer data structure (a type of radix tree). This is
an extremely efficient way of mapping from an integer handle (such as
an open file handle) to a pointer (such as the structure containing
the open file information). The code is taken from lib/idr.c in the
2.6 Linux kernel, and is very fast and space efficient. By using
talloc it even has auto cleanup.

This commit converts the handling of open file handles and open
directory search handles to use the idtree routines. In combination
with talloc destructors, this simplifies the structure handling in the
pvfs backend a lot. For example, we no longer need to keep a linked
list of open directory searches at all, and we no longer need to do
linear scans of the list of open files on most operations.

The end result is that the pvfs code is now extremely scalable. You
can have 10s of thousands of open files and open searches and the code
still runs very fast.

I have also added a small optimisation into the file close path, to
avoid looking in the byte range locking database if we know that there
are no locks outstanding.
(This used to be commit 16835a0ef9)
2007-10-10 13:01:54 -05:00
Andrew Tridgell
43a80e1d83 r3031: added support for lock cancelation, which effectively just triggers an early lock timeout
added support for more of the bizarre special lock offset semantics of w2k3
(This used to be commit d5bfc910b1)
2007-10-10 13:00:00 -05:00
Andrew Tridgell
d0cc571e30 r3029: implemented byte range lock timeouts.
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 4395c0557a)
2007-10-10 13:00:00 -05:00
Andrew Tridgell
fef617c31b r3012: added initial support for byte range locking in the posix vfs. This is
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 58a92abd88)
2007-10-10 12:59:57 -05:00