summaryrefslogtreecommitdiffstats
path: root/source3/locking/proto.h
Commit message (Collapse)AuthorAgeFilesLines
* s3:locking: add downgrade_share_lease() helper functionVolker Lendecke2014-12-041-0/+6
| | | | | | | | | Pair-Programmed-With: Jeremy Allison <jra@samba.org> Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:open_files.idl: add data structures for SMB2.1 and SMB3.0 leases.Stefan Metzmacher2014-12-041-2/+3
| | | | | | | Pair-Programmed-With: Volker Lendecke <vl@samba.org> Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:locking: convert brl_have_read field to brl_num_read.Volker Lendecke2014-11-111-3/+3
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:locking: allow early return for share_entry_forall()Volker Lendecke2014-10-311-2/+2
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:locking: Introduce share_mode_forallVolker Lendecke2014-10-311-0/+4
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:locking: Rename share_mode_forall->share_entry_forallVolker Lendecke2014-10-311-2/+2
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* brlock: Do auto-cleanup at conflict timeVolker Lendecke2014-08-231-1/+1
| | | | | | | This avoids the need to do sweeping validate_lock_entries calls Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Simplify brl_locktestVolker Lendecke2014-07-221-7/+2
| | | | | | | | Pass "struct lock_struct" as a parameter. This had to be destructured before the call and re-constructed inside brl_locktest. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* smbd: do_lock_cancel does not need "blr" anymoreVolker Lendecke2014-07-041-2/+1
| | | | | | | | 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): Fri Jul 4 08:52:31 CEST 2014 on sn-devel-104
* smbd: brl_lock_cancel does not need "blr" anymoreVolker Lendecke2014-07-041-2/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: do_lock does not need "blr" anymoreVolker Lendecke2014-07-041-2/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: brl_lock does not need "blr" anymoreVolker Lendecke2014-07-041-2/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Explicitly pass "file_id" to rename_share_filenameVolker Lendecke2014-03-211-0/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Factor out get_share_mode_write_time of get_file_infosVolker Lendecke2013-11-221-0/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Factor out remove_stale_share_mode_entriesVolker Lendecke2013-10-151-0/+1
| | | | | | | Will be used in the next commit Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* smbd: Put "have_read_oplocks" into brlock.tdbVolker Lendecke2013-10-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements an idea by metze: Right now Samba does not grant level2 oplocks where it should: After an initial no-oplock open that has been written to, we don't have the FAKE_LEVEL2_OPLOCK entry in locking.tdb around anymore, this downgraded to NO_OPLOCK. Windows in this case will grant level2 if being asked, we don't. Part of the reason for this is that we don't have a proper mechanism to communicate the fact that level2 needs to be broken to other smbds. Metze's insight was that we have to look into brlock.tdb for every write anyway, so this might be the right place to store this information. My first reaction was that this is really hackish, but on further thought this is not. oplocks depend on brlocks anyway, and we have the proper mechanisms in place for brlocks. The format for this change is to add one byte to the end of the brlock.tdb record with value 1 if we have level2 oplocks around. Thus this patch effectively reverts 8f41142 which I discovered while writing this change. We now legally have unaligned records. We can certainly talk about the format, but I'm not yet convinced we need an idl for this yet. This is a potentially very hot code path, and ndr marshalling has a cost. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Convert set_share_mode to return bool for successVolker Lendecke2013-10-081-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Change parameter from unsigned to uint32_tVolker Lendecke2013-10-081-1/+1
| | | | | | | | share_mode_stale_pid internally only has to deal with uint32_t. Make the parameter match this. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Add brl_fsp access functionVolker Lendecke2013-09-111-0/+1
|
* smbd: Add brl_num_locks access functionVolker Lendecke2013-09-111-0/+2
|
* smbd: Make brl_lock_failed staticVolker Lendecke2013-09-111-1/+0
|
* smbd: Make brl_same_context staticVolker Lendecke2013-09-111-2/+0
|
* smbd: Rename parameter "i" to "idx"Volker Lendecke2013-09-031-1/+1
| | | | | | | We'll need "i" in a later checkin ... :-) Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* smbd: We don't use DEFERRED_OPEN_ENTRY anymoreVolker Lendecke2013-04-261-6/+0
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:locking: add function share_mode_cleanup_disconnected()Gregor Beck2013-04-181-0/+3
| | | | | | | | | | | For a given file, clean share mode entries for a given persistent file id. Pair-Programmed-With: Michael Adam <obnox@samba.org> Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Gregor Beck <gbeck@sernet.de> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:locking: no need to make a file_id passed by value a constantGregor Beck2013-04-181-3/+3
| | | | | | Signed-off-by: Gregor Beck <gbeck@sernet.de> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:locking:brlock: add function brl_cleanup_disconnected()Gregor Beck2013-04-181-0/+1
| | | | | | | | For a given file, clean up brl entries belonging to a given persistent file id. Signed-off-by: Gregor Beck <gbeck@sernet.de> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:locking: add brl_mark_disconnected() and brl_reconnect_disconnected()Stefan Metzmacher2012-09-081-0/+2
| | | | Pair-Programmed-With: Michael Adam <obnox@samba.org>
* s3:locking: add mark_share_mode_disconnected()Stefan Metzmacher2012-09-081-0/+2
| | | | Pair-Programmed-With: Michael Adam <obnox@samba.org>
* s3: Make reduce_windows_lock_ref_count staticVolker Lendecke2012-06-221-1/+0
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3: Add "share_mode_stale_pid"Volker Lendecke2012-05-251-0/+1
| | | | | | | | This is a helper routine that prunes a dead share mode entry on demand. This prepares for removing the serverids_exist call in parse_share_modes. Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3: Revert the serverid changes, they need more workVolker Lendecke2012-05-181-1/+0
| | | | | Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Fri May 18 13:12:14 CEST 2012 on sn-devel-104
* s3: Add "share_mode_stale_server"Volker Lendecke2012-05-171-0/+1
| | | | | | | This is a helper routine that prunes a dead share mode entry on demand. This prepares for removing the serverids_exist call in parse_share_modes. Signed-off-by: Jeremy Allison <jra@samba.org>
* Second part of bugfix for bug #8837 - smbd crashes when deleting directory ↵Jeremy Allison2012-04-041-2/+8
| | | | | | | and veto files are enabled. Store the 'struct security_token' as well as the 'struct security_unix_token' inside the locking db when setting a delete on close.
* s3: get_share_mode_lock_fresh->get_share_mode_lockVolker Lendecke2012-02-191-1/+1
| | | | | | | get_share_mode_lock_fresh is just a confusing name Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Sun Feb 19 19:16:41 CET 2012 on sn-devel-104
* s3: get_share_mode_lock->get_existing_share_mode_lockVolker Lendecke2012-02-191-2/+2
|
* s3: Introduce get_share_mode_lock_fresh()Volker Lendecke2012-01-121-4/+7
| | | | | | | | This slightly simplifies the code path for all callers which assume that a share mode exists already. Only the callers in open_file_ntcreate and open_directory will ever create new share modes. Signed-off-by: Jeremy Allison <jra@samba.org>
* s3: Remove UNUSED_SHARE_MODE_ENTRYVolker Lendecke2011-12-141-1/+0
|
* s3:smbd: remove brl_register_msgs()Stefan Metzmacher2011-12-141-1/+5
| | | | metze
* s3: Move can_set_delete_on_close to smbd/Volker Lendecke2011-12-131-1/+0
|
* s3:locking/proto.h: add _LOCKING_PROTO_H_ guardMichael Adam2011-05-311-0/+5
|
* s3:locking/proto.h: add GPL/Copyright headerMichael Adam2011-05-311-0/+21
|
* s3-locking: move locking prototypes out of proto.h.Günther Deschner2011-03-301-0/+201
Will later become part of locking.h Guenther