summaryrefslogtreecommitdiff
path: root/source3/include/locking.h
Commit message (Collapse)AuthorAgeFilesLines
* s3:locking: add brl_req_guid() and brl_req_mem_ctx() helper functionsStefan Metzmacher2019-09-091-0/+2
| | | | | | | | | | | This allows the vfs backend to detect a retry and keep state between the retries. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14113 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> (cherry picked from commit 66d92f37c3a643d97489a59bb6d1e75e91528c20)
* smbd: Remove struct blocking_lock_recordVolker Lendecke2019-06-201-20/+0
| | | | | | | | | | Forgot that one in the last patches Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Jun 20 23:39:34 UTC 2019 on sn-devel-184
* smbd: Remove unused brlock codeVolker Lendecke2019-06-201-3/+1
| | | | | | | No PENDING locks in brlock.tdb anymore. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Move "struct byte_range_lock" definition to brlock.cVolker Lendecke2013-09-111-9/+1
|
* smbd: Fix blank line endingsVolker Lendecke2013-09-111-6/+6
|
* s3:include: change lock_struct->fnum to uint64_tMichael Adam2012-06-061-1/+1
| | | | | | | | | Note: this changes the format of brlock.tdb! Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Wed Jun 6 23:22:00 CEST 2012 on sn-devel-104
* s3:include: change lock_context->tid to uint32_tMichael Adam2012-06-061-1/+1
| | | | | | Note: this changes for format of brlock.tdb! Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
* s3:includes: move struct share_mode_lock to locking.hStefan Metzmacher2012-06-061-0/+4
| | | | metze
* s3-build: move file_id.c into samba3-util and create a private headerAndrew Bartlett2012-04-181-1/+1
|
* s3-messages: only include messages.h where needed.Günther Deschner2011-03-301-0/+2
| | | | Guenther
* idl: add file_id idl.Günther Deschner2011-01-251-8/+1
| | | | | | | Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Tue Jan 25 12:27:00 CET 2011 on sn-devel-104
* This patch looks bigger than it is. It does 2 things. 1). Renames smbpid -> ↵Jeremy Allison2010-05-071-4/+4
| | | | | | smblctx in our locking code. 2). Widens smblctx to 64-bits internally. Preparing to use the SMB2 handle as the locking context. Jeremy.
* Plumb the SMB2 front end into the blocking lock backend.Jeremy Allison2010-04-301-0/+7
| | | | | | | | | | Metze, you'll probably be happier with this work as it doesn't abuse tevent in the way you dislike. This is a first cut at the code, which will need lots of testing but I'm hoping this will give people an idea of where I'm going with this. Jeremy.
* s3: Add extid to the dev/inode pairTim Prouty2009-02-191-0/+1
| | | | | | | | | | | This extends the file_id struct to add an additional generic uint64_t field: extid. For backwards compatibility with dev/inodes stored in xattr_tdbs and acl_tdbs, the ext id is ignored for these databases. This patch should cause no functional change on systems that don't use SMB_VFS_FILE_ID_CREATE to set the extid. Existing code that uses the smb_share_mode library will need to be updated to be compatibile with the new extid.
* Add VFS ops for Windows BRL: Lock, Unlock and Cancel:Zack Kirsch2009-02-131-0/+20
| | | | | | | | | | | | | | | | | | | | | | | This patch adds 3 new VFS OPs for Windows byte range locking: BRL_LOCK_WINDOWS, BRL_UNLOCK_WINDOWS and BRL_CANCEL_WINDOWS. Specifically: * I renamed brl_lock_windows, brl_unlock_windows and brl_lock_cancel to *_default as the default implementations of the VFS ops. * The blocking_lock_record (BLR) is now passed into the brl_lock_windows and brl_cancel_windows paths. The Onefs implementation uses it - future implementations may find it useful too. * Created brl_lock_cancel to do what brl_lock/brl_unlock do: set up a lock_struct and call either the Posix or Windows lock function. These happen to be the same for the default implementation. * Added helper functions: increment_current_lock_count() and decrement_current_lock_count(). * Minor spelling correction in brl_timeout_fn: brl -> blr. * Changed blocking_lock_cancel() to return the BLR that it has cancelled. This allows us to assert its the lock that we wanted to cancel. If this assert ever fires, this path will need to take in the BLR to cancel, rather than choosing on its own. * Adds a small helper function: find_blocking_lock_record_by_id(). Used by the OneFS implementation, but could be useful for others.
* RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison2007-10-181-2/+2
| | | | | | | | bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy. (This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f)
* r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell2007-10-101-2/+1
| | | | (This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
* r23779: Change from v2 or later to v3 or later.Jeremy Allison2007-10-101-1/+1
| | | | | Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
* r23195: Add void *private_data to brl_forallVolker Lendecke2007-10-101-12/+0
| | | | (This used to be commit c91b2bdc160d76bf0b0770fe7f92cbc7124d6c3c)
* r23183: Check in a change made by Tridge:Volker Lendecke2007-10-101-9/+10
| | | | | | | | | | | | | | 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 (This used to be commit 9b10dbbd5de8813fc15ebbb6be9b18010ffe8139)
* r23165: Convert brlock.tdb to dbwrapVolker Lendecke2007-10-101-0/+1
| | | | (This used to be commit 84f9885cf8cc57dcf3c2738d6b245de314890a41)
* r22736: Start to merge the low-hanging fruit from the now 7000-line cluster ↵Volker Lendecke2007-10-101-3/+3
| | | | | | | | | | patch. This changes "struct process_id" to "struct server_id", keeping both is just too much hassle. No functional change (I hope ;-)) Volker (This used to be commit 0ad4b1226c9d91b72136310d3bbb640d2c5d67b8)
* r22688: Change lock_data in struct byte_range_lock from void * to struct ↵Volker Lendecke2007-10-101-1/+1
| | | | | | lock_struct * (This used to be commit 8e0e278961ebf2fa4301874d522636699ace1b9b)
* r17346: Add optimisation vl needs for the cluster code whereJeremy Allison2007-10-101-0/+1
| | | | | | | we don't get the chainlock when getting the byte range lock record read-only. Jeremy. (This used to be commit fcd798ca0c1b76adb2bcda4a99c40c7aacb0addb)
* r17314: Optimisation for POSIX locking. If we're downgradingJeremy Allison2007-10-101-2/+6
| | | | | | | | a POSIX lock (applying a read-lock) and we overlap pending read locks then send them an unlock message, we may have allowed them to proceed. Jeremy. (This used to be commit a7a0b6ba50f4cf7c5a0a29809fdff9e1266a29e7)
* r17177: Get rid of a global variable by adding a private data pointer toVolker Lendecke2007-10-101-6/+0
| | | | | | | share_mode_forall(). Volker (This used to be commit f97f6cedffdc4d10afcac90a163b93a801acf514)
* r17098: Samba3 now cleanly passes Samba4 RAW-LOCK tortureJeremy Allison2007-10-101-1/+3
| | | | | | | | | test. Phew - that was painful :-). But what it means is that we now implement lock cancels and I can add lock cancels into POSIX lock handling which will fix the fast/slow system call issue with cifsfs ! Jeremy. (This used to be commit f1a9cf075b87c76c032d19da0168424c90f6cb3c)
* r16945: Sync trunk -> 3.0 for 3.0.24 code. Still needJeremy Allison2007-10-101-0/+88
to do the upper layer directories but this is what everyone is waiting for.... Jeremy. (This used to be commit 9dafb7f48ca3e7af956b0a7d1720c2546fc4cfb8)