summaryrefslogtreecommitdiff
path: root/source3/locking
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r8219: Merge the new open code from HEAD to 3.0. Haven't yet run the tortureJeremy Allison2-68/+90
tests on this as it's very late NY time (just wanted to get this work into the tree). I'll test this over the weekend.... Jerry - in looking at the difference between the two trees there seem to be some printing/ntprinting.c and registry changes we might want to examine to try keep in sync. Jeremy. (This used to be commit c7fe18761e2c753afbffd3a78abff46472a9b8eb)
2007-10-10r7975: One more tidyup to ensure we're using "struct posix_lock".Jeremy Allison1-1/+2
Jeremy. (This used to be commit 960a5d37d1cfa25e4f7491b175dab68ac9f37c43)
2007-10-10r7972: Tidy up the posix locking in memory db code whilst I'm waiting for jhtJeremy Allison1-20/+21
to get back to me with a backtrace. Jeremy. (This used to be commit f2bcfdddc769a2939b03a1a6742fec86712c9097)
2007-10-10r6594: Fix silly typo causing tdb to be freed twice.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 4f431dfc6b57e1609672c4daa53ab5d62613f6d1)
2007-10-10r6543: Fix EDEADLCK problem with deferred open calls. Problem found byJeremy Allison1-13/+33
"Hu, David J" <david.hu@hp.com> Jeremy. (This used to be commit ec86ac4b28e99df41d3dd77586ea259500e5dfcd)
2007-10-10r6502: add LOCKING debug class - pull PRINTINGDB class definition from trunkHerb Lewis3-0/+9
so our numbers don't get out of sync (This used to be commit 58e307664e02ebf0415f19ed625d2f166d9cb1cc)
2007-10-10r5634: Fix 64-bit overflow problems found by BlueArc torture tester.Jeremy Allison1-9/+0
We still have a few strange bugs with 64-bit locking values. I will get traces. Jeremy. (This used to be commit ff4c201d93e1f59ce61e9341f7f94ce92389ed7b)
2007-10-10r5625: Reformat (tidy).Jeremy Allison1-4/+4
(This used to be commit b94db3a75806f1b09a8a0366029812ba2195727c)
2007-10-10r4143: Make strict locking an enum. Auto means use oplock optimization.Jeremy Allison1-9/+16
Jeremy. (This used to be commit 0dd4adeae2042d0ea64398a78b3f48eb0150c133)
2007-10-10r4121: Optimisation from Nadav Danieli <nadavd@exanet.com>. If we're oplocked,Jeremy Allison1-1/+9
short circuit some is_locked() tests. Jeremy. (This used to be commit f4feed8f90be98eaea59bebcc142fd398ffe2a59)
2007-10-10r4108: As check_self is *always* False in every invokation, remove theJeremy Allison2-16/+8
logic for it. We still pass Samba4 RAW-LOCK test. Jeremy. (This used to be commit 596f23051363f8cc8896119b3eca0663a61a38c3)
2007-10-10r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison3-11/+10
allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy. (This used to be commit 620f2e608f70ba92f032720c031283d295c5c06a)
2007-10-10r3120: Fix bug #1955 reported by Love <lha@stacken.kth.se>. Inconsistent ↵Jeremy Allison1-3/+3
error return. Jeremy. (This used to be commit c6b144654ae544c86f7caa35483e25f0cfe5e904)
2007-10-10r3050: Steal from Samba4 :-). Make us pass most of the new lock tests ↵Jeremy Allison1-17/+56
(except for the cancel lock which I have to add). Jeremy. (This used to be commit cf7f89999e0c6becd4617c812400d1e71b9c0a30)
2007-10-10r3008: when checking for the existance of a lock we are only doing a singleAndrew Tridgell1-3/+0
tdb call, so there is no need to get the chainlock. This reduces the number of tdb locking calls made on file IO (This used to be commit 78e904c27b31d7123b521c446247d6ff558c84cc)
2007-10-10r2413: Arggg. Stupid, stupid, stupid me ! I added a paranoia testJeremy Allison1-13/+0
case when I was developing the deferred open case and made it too tight. It will fire (incorrectly) and panic when a client does a second open for a file with a different mid (multiplex-id) request. Doh ! This is a perfectly valid thing for a client to do (have two pending opens with different mids outstanding on the same file) and currently when the first pending open expires with a share violation the paranoia code will panic smbd. It's a rare condition, but obvious now I've looked at the code. Fix for bug #1743. Jeremy. (This used to be commit e1bf108ae965ae730c67524164fa36497ea905b5)
2007-10-10r1085: Now it's had some proper user testing, merge in the deferred open ↵Jeremy Allison1-5/+387
fix. I'm still doing more testing, but it fixes a behaviour that we've been wrong on ever since the start of Samba. Jeremy. (This used to be commit 894cc6d16296b934c112786eec896846156aee5d)
2007-10-10r1011: fix bad merge (from a few months ago) and ensure that we always use ↵Gerald Carter2-4/+4
tdb_open_log() instead of tdb_open_ex() (This used to be commit e65564ab4aa1240e84b8d272510aa770cad0ed0e)
2007-10-10r984: Ensure memmove & memcpy aren't called with len == 0.Jeremy Allison1-4/+8
Jeremy. (This used to be commit 40c77dddc65e18b879d922379d562ffb8be80ab5)
2004-02-12merge from old APP_HEADGerald Carter2-4/+4
* remove corrupt tdb and shutdown (only for printing tdbs, connections, sessionid & locking) * decrement smbd counter in connections.tdb in smb_panic() * various Makefile hack to get things to link 'max smbd processes' looks like it might be broken. The counter KEY is not being set. Will look into that tomorrow. (This used to be commit 6e22c5da929b6d9a4e32dc704c83112b2ad8fcfd)
2003-10-09Changes to allow Samba3 to pass the Samba4 RAW-READ tests.Jeremy Allison2-6/+14
Jeremy. (This used to be commit e7565dbba696adbb0fd8cca6b86a1a7e5a655f2e)
2003-09-08Tidy up some formatting. Get ready for allowing bad password lockout. (basedJeremy Allison1-14/+18
on a patch posted from Richard Renard <rrenard@idealx.com>. Jeremy. (This used to be commit abf54b58e95a949cb883d4485853dc560489c03f)
2003-08-01Final fix for the bug tridge found. Only push locks onto a blocking lockJeremy Allison1-1/+5
queue if the posix lock failed with EACCES or EAGAIN (this means another lock conflicts). Else return an error and don't queue the request. Jeremy. (This used to be commit 43fbc18fdc184bf29c15186c16bc99fb208de963)
2003-07-22Fixup a bunch of printf-style functions and debugs to use unsigned long whenTim Potter1-2/+2
displaying pid_t, uid_t and gid_t values. This removes a whole lot of warnings on some of the 64-bit build farm machines as well as help us out when 64-bit uid/gid/pid values come along. (This used to be commit f93528ba007c8800a850678f35f499fb7360fb9a)
2003-05-22More fixes for debug log to catch logic error.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 84a7714eba801fefa7ad56493f20813de3943bc5)
2003-05-14Prefix VFS API macros with SMB_ for consistency and to avoid problems with ↵Alexander Bokovoy1-5/+5
VFS_ macros at system side. We currently have one clash with AIX and its VFS_LOCK. Compiled and tested -- no new functionality or code, just plain rename of macros for yet-unreleased VFS API version. Needs to be done before a24 is out (This used to be commit c2689ed118b490e49497a76ed6a2251262018769)
2003-05-11Fix VFS layer:Alexander Bokovoy1-6/+5
1. Finally work with cascaded modules with private data storage per module 2. Convert VFS API to macro calls to simplify cascading 3. Add quota support to VFS layer (prepare to NT quota support) Patch by Stefan (metze) Metzemacher, with review of Jelmer and me Tested in past few weeks. Documentation to new VFS API for third-party developers to follow (This used to be commit 91984ef5caa2d13c5d52e1f535bd3bbbae1ec978)
2003-04-04Fix for very subtle POSIX lock interaction race condition found byJeremy Allison2-9/+40
Herb. We need to unlock POSIX locks before notifying pending lock processes. Jeremy. (This used to be commit 6999eef51c3e597b3b2cd9cc26138acdfbb6a23a)
2003-02-27Fix to allow blocking lock notification to be done rapidly (no waitJeremy Allison2-8/+78
for smb -> smb lock release). Adds new PENDING_LOCK type to lockdb (does not interfere with existing locks). Jeremy. (This used to be commit 766928bbba1e597c9c2b12458dd8d37e6080593e)
2003-02-24Merge off-by-one fix from HEAD (caused crash with --enable-developer)Andrew Bartlett1-1/+1
(This used to be commit d71425413075af25f91f715950c06ab698cf5fb7)
2003-02-22When checking is_locked() new WRITE locks conflict with existing READ locks evenJeremy Allison1-3/+10
if the context is the same. See LOCKTEST7 in smbtorture. Jeremy. (This used to be commit 1698092ba5a169de369ad1182a6f270de174c3f5)
2003-02-12Fixes for HPUX only having limited POSIX lock range from Michael Steffens ↵Jeremy Allison1-12/+7
<michael.steffens@hp.com> Jeremy. (This used to be commit e9b4fb8b9aedda9afc01af976264298002be3096)
2003-02-10Cleanups: (merge from HEAD)Andrew Bartlett1-1/+3
- use safe_strcpy() instead of pstrcpy() for malloc()ed strings - CUPS: a failure in an attempt to automaticly add a printer is not level 0 stuff. - Fix up a possible Realloc() failure segfault Andrew Bartlett (This used to be commit c1cfc296c2efdb2b5972202146e80f0e3b6a3da4)
2003-01-03Fix problem with "hide unreadable". stat file opens are baaack :-).Jeremy Allison1-2/+1
Jeremy. (This used to be commit 62038a0abf193d4dc4f37c31ac77216a10f6f326)
2002-12-20Forward port the change to talloc_init() to make all talloc contextsJeremy Allison1-2/+2
named. Ensure we can query them. Jeremy. (This used to be commit 09a218a9f6fb0bd922940467bf8500eb4f1bcf84)
2002-11-23Lots of fixes for error paths where tdb_fetch() data need freeing.Jeremy Allison2-12/+17
Found via a post from Arcady Chernyak <Arcady.Chernyak@efi.com>. Jeremy. (This used to be commit 5d5762d1787db4392d2dff16024097c638b2d494)
2002-09-25sync'ing up for 3.0alpha20 releaseGerald Carter1-1/+1
(This used to be commit 65e7b5273bb58802bf0c389b77f7fcae0a1f6139)
2002-07-15updated the 3.0 branch from the head branch - ready for alpha18Andrew Tridgell2-9/+21
(This used to be commit 03ac082dcb375b6f3ca3d810a6a6367542bc23ce)
2002-03-23Fix the mp3 rename bug - also tidy up our open code and remove the specialJeremy Allison1-3/+4
cases for rename and unlink. Had to add desired_access into the share mode record. Jeremy. (This used to be commit 3b1b8ac43535fb0839c5474fa55bf7150f6cde31)
2002-03-15if our lock spin code fails then return the first error code, not theAndrew Tridgell1-4/+11
last one. This is what caused the lock1 and lock2 tests to fail. (This used to be commit e7ae8003cb4fdc93db5f842754884a6d2ec93dc0)
2002-03-14Use sys_usleep not usleep.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 8587dd95f850b4c6d2f015fe97ef98759ee8c236)
2002-03-13Ensure we attempt to lock at least once. Only sleep if time param set.Jeremy Allison1-1/+5
Jeremy. (This used to be commit 62b80d5c65ae8cf35347ee5c3d21ce1702c6449e)
2002-03-13include/smb_macros.h: Don't round up an allocation if the size is zero.Jeremy Allison1-1/+25
"One of these locks is not like the others... One of these locks is not quite the same" :-). When is a zero timeout lock not zero ? When it's being processed by Windows 2000 of course.. This code change, ugly though it is - completely fixes the foxpro/access multi-user file system database problems that people have been having. I used a *wonderful* test program donated by "Gerald Drouillard" <gerald@drouillard.ca> which allowed me to completely reproduce this problem, and to finally determine the correct fix. This also explains why Windows 2000 is *so slow* when responding to the smbtorture lock tests. I *love* it when all these things come together and finally make sense :-). Jeremy. (This used to be commit 8aa9860ea2ea7f5aed4b6aa12794fffdfa81b0d0)
2002-03-10this attempts to handle the rather bizarre lock cache semantics inAndrew Tridgell2-1/+15
w2k. It isn't entirely accurate, but its close (This used to be commit e02d7364707c4939efa4ff0ddf9b6d4f48e5d411)
2002-03-05accept the 0/0 lock but don't treat it in any sort of special wayAndrew Tridgell1-1/+0
(This used to be commit 8f7bf38de16a1f5316aa6a413fb697c43862c4c6)
2002-01-30Removed version number from file header.Tim Potter3-6/+3
Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
2002-01-08Debugs that print out a share mode table in debug level 10. This codeJeremy Allison1-4/+46
enabled me to track down a *nasty* bug. Jeremy. (This used to be commit ed5a9a0ee32aec460b9247ab4e4f5e38e8149e08)
2002-01-05Added DEBUG in set_share_mode to track down logic insanity.Jeremy Allison1-0/+8
Jeremy. (This used to be commit 32f4f3a45d473b3be1ae07f6c60897c12323d60c)
2001-12-18Removed unused function, delete_fn()Tim Potter1-57/+0
(This used to be commit f26e8205cff63967b9c1659b8e6ad71cbe36dace)
2001-11-30After conversations with Andrew, improved the robustness of theJeremy Allison1-26/+53
sharemode db in the following way. Originally, on startup and shutdown, smbd would scan the share mode db to ensure it was correct. This lead to scalability issues as scans lock the db for quite a long time. Andrew had the brainstorm that we only care about the record we're about to read. This new code (small change really, but quite significant) causes get_share_modes() to do a process_exists() call against each pid in each record, and to delete any that don't and re-write the entry if any dead records were detected. This allowed me to remove the startup/shutdown scans of the db (they can be added into smbstatus if anyone really cares to have them back). This will please the vfs author who was worried about the time taken on open() calls, and will lead to much greater robustness and scalability in the share mode db. We need much testing of this, and also netbench tests to ensure the extra process_exists() calls don't hurt performance (they shouldn't it's a very simple system call). Jeremy. (This used to be commit 4098d442030e66601450baeb09ae06b39a1ab571)