summaryrefslogtreecommitdiffstats
path: root/source/locking/brlock.c
Commit message (Collapse)AuthorAgeFilesLines
* r25055: Add file_id_string_tosVolker Lendecke2007-09-101-1/+1
| | | | This removes file_id_string_static and file_id_string_static2
* r24266: Remove the "open files database hash size" parameterVolker Lendecke2007-08-071-2/+1
| | | | This has been superseded by the "tdb_hashsize:<tdbname>" parameter
* r24034: Print the full cluster pid in print_lock_structVolker Lendecke2007-07-241-2/+2
|
* r23885: Fix make test on opi.Volker Lendecke2007-07-161-0/+1
|
* r23882: Fix Coverity id 389 -- finally (I hope)Volker Lendecke2007-07-161-7/+11
|
* r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell2007-07-101-2/+1
|
* r23780: Find and fix more GPL2 -> GPL3.Jeremy Allison2007-07-091-1/+1
| | | | Jeremy.
* r23759: Fix make test -- sorryVolker Lendecke2007-07-091-2/+2
|
* r23755: Fix Coverity id 384Volker Lendecke2007-07-091-1/+7
|
* r23516: Fix bug found & fixed by Doug Rudoff (doug_rudoff@isilon.com)Jeremy Allison2007-06-161-0/+6
| | | | | | | - when cleaning up invalid locks make sure we mark the lck struct as modified so it'll get saved back correctly (that was the original intent). Jeremy.
* r23511: Merge branches/SAMBA_3_0@23510James Peach2007-06-151-5/+5
| | | | | Tidy calls to smb_panic by removing trailing newlines. Print the failed expression in SMB_ASSERT.
* r23316: Ouch... This would not have run in production without cluster codeVolker Lendecke2007-06-031-2/+2
| | | | anyway.
* r23204: Add MSG_SMB_BRL_VALIDATE. Tridge, this is a bit different from your bzrVolker Lendecke2007-05-291-0/+106
| | | | | | | | | | branch, please check if it fulfils your needs. Two changes: The validation is not done inside the brlock.c traverse_fn, it's done as a separate routine. Secondly, this patch does not call the checker routines in smbcontrol directly but depends on a running smbd.
* r23195: Add void *private_data to brl_forallVolker Lendecke2007-05-291-10/+28
|
* r23183: Check in a change made by Tridge:Volker Lendecke2007-05-291-11/+9
| | | | | | | | | | | | | This replaces the internal explicit dev/ino file id representation by a "struct file_id". This is necessary as cluster file systems and NFS don't necessarily assign the same device number to the shared file system. With this structure in place we can now easily add different schemes to map a file to a unique 64-bit device node. Jeremy, you might note that I did not change the external interface of smb_share_modes.c. Volker
* r23169: Merge 535 of Tridge's bzr tree:Volker Lendecke2007-05-271-2/+5
| | | | | store the right data after cleaning lock records. This fixes RAW-BENCH-LOCK after a recovery on a cluster
* r23165: Convert brlock.tdb to dbwrapVolker Lendecke2007-05-271-38/+51
|
* r23014: For all branches, ensure that if we're blocked on a POSIXJeremy Allison2007-05-191-3/+22
| | | | | | | | lock we know nothing about that we retry the lock every 10 seconds instead of waiting for the standard select timeout. This is how we used to (and are supposed to) work. Jeremy.
* r22945: merge 22009 from SAMBA_3_0 + some warning fixes for new code:Stefan Metzmacher2007-05-161-4/+4
| | | | | | | | change TDB_DATA from char * to unsigned char * and fix all compiler warnings in the users metze
* r22846: Chunk one to replace message_send_pid with messaging_send: Deep insideVolker Lendecke2007-05-141-23/+28
| | | | | | locking/locking.c we have to send retry messages to timed lock holders. The majority of this patch passes a "struct messaging_context" down there. No functional change, survives make test.
* r22736: Start to merge the low-hanging fruit from the now 7000-line cluster ↵Volker Lendecke2007-05-071-6/+6
| | | | | | | | | patch. This changes "struct process_id" to "struct server_id", keeping both is just too much hassle. No functional change (I hope ;-)) Volker
* r22688: Change lock_data in struct byte_range_lock from void * to struct ↵Volker Lendecke2007-05-051-24/+15
| | | | lock_struct *
* r22588: Make all uses of TALLOC_MEMDUP consistent.Jeremy Allison2007-04-301-3/+8
| | | | Jeremy.
* r21723: Make use of the per-hashchain "freelists"Volker Lendecke2007-03-061-0/+3
|
* r19810: more merge work....does not compile currently. Working on smbd mergeGerald Carter2006-11-211-189/+335
|
* r17045: Make sure we're using the right pointers in theJeremy Allison2006-07-151-11/+7
| | | | | right place... Jeremy.
* r17044: One more for 3.0.23a - fix a reference after free...Jeremy Allison2006-07-151-0/+1
| | | | | (pointer swizzelling can be painful...). Jeremy.
* r17042: Fix critical memleak in POSIX locks (only) code.Jeremy Allison2006-07-141-0/+2
| | | | | This needs to be in 3.0.23a. Jeremy.
* r15837: starting sync up for 3.0.23rc1 (in sync with SAMBA_3_0 r15822)Gerald Carter2006-05-231-4/+105
|
* r15083: Using talloc with destructors is nice and all, but in thisJeremy Allison2006-04-131-9/+5
| | | | | | | case it's in a performace critical path and it *hurts* us. Go back to plain malloc/free with an explicit destructor call. Jeremy.
* r15060: The brlock code gets called a lot. Ensure we keep theJeremy Allison2006-04-121-29/+13
| | | | | | key around while we're using it - saves many calls to locking_key() (now deleted). Jeremy.
* r15026: Fix warning until POSIX locking finished.Jeremy Allison2006-04-101-2/+1
| | | | Jeremy.
* r15018: Merge Volker's ipc/trans2/nttrans changes overJeremy Allison2006-04-101-315/+985
| | | | | | | | into 3.0. Also merge the new POSIX lock code - this is not enabled unless -DDEVELOPER is defined. This doesn't yet map onto underlying system POSIX locks. Updates vfs to allow lock queries. Jeremy.
* r14763: Add a new tuning parameter, open files database hash size,Jeremy Allison2006-03-291-2/+4
| | | | | | | | | this allows us to experiment with ensuring the tdb hash size for our open files and locking db are appropriately sized. Make the hash size larger by default (10007 instead of 1049) and make the locking db hash size the same as the open file db hash size. Jeremy.
* r13915: Fixed a very interesting class of realloc() bugs found by Coverity.Jeremy Allison2006-03-071-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | realloc can return NULL in one of two cases - (1) the realloc failed, (2) realloc succeeded but the new size requested was zero, in which case this is identical to a free() call. The error paths dealing with these two cases should be different, but mostly weren't. Secondly the standard idiom for dealing with realloc when you know the new size is non-zero is the following : tmp = realloc(p, size); if (!tmp) { SAFE_FREE(p); return error; } else { p = tmp; } However, there were *many* *many* places in Samba where we were using the old (broken) idiom of : p = realloc(p, size) if (!p) { return error; } which will leak the memory pointed to by p on realloc fail. This commit (hopefully) fixes all these cases by moving to a standard idiom of : p = SMB_REALLOC(p, size) if (!p) { return error; } Where if the realloc returns null due to the realloc failing or size == 0 we *guarentee* that the storage pointed to by p has been freed. This allows me to remove a lot of code that was dealing with the standard (more verbose) method that required a tmp pointer. This is almost always what you want. When a realloc fails you never usually want the old memory, you want to free it and get into your error processing asap. For the 11 remaining cases where we really do need to keep the old pointer I have invented the new macro SMB_REALLOC_KEEP_OLD_ON_ERROR, which can be used as follows : tmp = SMB_REALLOC_KEEP_OLD_ON_ERROR(p, size); if (!tmp) { SAFE_FREE(p); return error; } else { p = tmp; } SMB_REALLOC_KEEP_OLD_ON_ERROR guarentees never to free the pointer p, even on size == 0 or realloc fail. All this is done by a hidden extra argument to Realloc(), BOOL free_old_on_error which is set appropriately by the SMB_REALLOC and SMB_REALLOC_KEEP_OLD_ON_ERROR macros (and their array counterparts). It remains to be seen what this will do to our Coverity bug count :-). Jeremy.
* r10656: BIG merge from trunk. Features not copied overGerald Carter2005-09-301-12/+12
| | | | | | | * \PIPE\unixinfo * winbindd's {group,alias}membership new functions * winbindd's lookupsids() functionality * swat (trunk changes to be reverted as per discussion with Deryck)
* r6502: add LOCKING debug class - pull PRINTINGDB class definition from trunkHerb Lewis2005-04-271-0/+3
| | | | so our numbers don't get out of sync
* r5634: Fix 64-bit overflow problems found by BlueArc torture tester.Jeremy Allison2005-03-031-9/+0
| | | | | | We still have a few strange bugs with 64-bit locking values. I will get traces. Jeremy.
* r4108: As check_self is *always* False in every invokation, remove theJeremy Allison2004-12-091-11/+6
| | | | | logic for it. We still pass Samba4 RAW-LOCK test. Jeremy.
* r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison2004-12-071-1/+1
| | | | | | | | | allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy.
* r3050: Steal from Samba4 :-). Make us pass most of the new lock tests ↵Jeremy Allison2004-10-181-17/+56
| | | | | | | (except for the cancel lock which I have to add). Jeremy.
* r3008: when checking for the existance of a lock we are only doing a singleAndrew Tridgell2004-10-171-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
* r1011: fix bad merge (from a few months ago) and ensure that we always use ↵Gerald Carter2004-06-041-2/+2
| | | | tdb_open_log() instead of tdb_open_ex()
* r2: import HEAD into svn+ssh://svn.samba.org/home/svn/samba/trunkCVS Import User2004-04-041-0/+714
metze