summaryrefslogtreecommitdiff
path: root/source3/locking/proto.h
AgeCommit message (Collapse)AuthorFilesLines
2013-10-15smbd: Factor out remove_stale_share_mode_entriesVolker Lendecke1-0/+1
Will be used in the next commit Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-10-15smbd: Put "have_read_oplocks" into brlock.tdbVolker Lendecke1-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>
2013-10-08smbd: Convert set_share_mode to return bool for successVolker Lendecke1-1/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-10-08smbd: Change parameter from unsigned to uint32_tVolker Lendecke1-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>
2013-09-11smbd: Add brl_fsp access functionVolker Lendecke1-0/+1
2013-09-11smbd: Add brl_num_locks access functionVolker Lendecke1-0/+2
2013-09-11smbd: Make brl_lock_failed staticVolker Lendecke1-1/+0
2013-09-11smbd: Make brl_same_context staticVolker Lendecke1-2/+0
2013-09-03smbd: Rename parameter "i" to "idx"Volker Lendecke1-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>
2013-04-26smbd: We don't use DEFERRED_OPEN_ENTRY anymoreVolker Lendecke1-6/+0
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-18s3:locking: add function share_mode_cleanup_disconnected()Gregor Beck1-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>
2013-04-18s3:locking: no need to make a file_id passed by value a constantGregor Beck1-3/+3
Signed-off-by: Gregor Beck <gbeck@sernet.de> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-04-18s3:locking:brlock: add function brl_cleanup_disconnected()Gregor Beck1-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>
2012-09-08s3:locking: add brl_mark_disconnected() and brl_reconnect_disconnected()Stefan Metzmacher1-0/+2
Pair-Programmed-With: Michael Adam <obnox@samba.org>
2012-09-08s3:locking: add mark_share_mode_disconnected()Stefan Metzmacher1-0/+2
Pair-Programmed-With: Michael Adam <obnox@samba.org>
2012-06-22s3: Make reduce_windows_lock_ref_count staticVolker Lendecke1-1/+0
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-25s3: Add "share_mode_stale_pid"Volker Lendecke1-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>
2012-05-18s3: Revert the serverid changes, they need more workVolker Lendecke1-1/+0
Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Fri May 18 13:12:14 CEST 2012 on sn-devel-104
2012-05-17s3: Add "share_mode_stale_server"Volker Lendecke1-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>
2012-04-04Second part of bugfix for bug #8837 - smbd crashes when deleting directory ↵Jeremy Allison1-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.
2012-02-19s3: get_share_mode_lock_fresh->get_share_mode_lockVolker Lendecke1-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
2012-02-19s3: get_share_mode_lock->get_existing_share_mode_lockVolker Lendecke1-2/+2
2012-01-12s3: Introduce get_share_mode_lock_fresh()Volker Lendecke1-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>
2011-12-14s3: Remove UNUSED_SHARE_MODE_ENTRYVolker Lendecke1-1/+0
2011-12-14s3:smbd: remove brl_register_msgs()Stefan Metzmacher1-1/+5
metze
2011-12-13s3: Move can_set_delete_on_close to smbd/Volker Lendecke1-1/+0
2011-05-31s3:locking/proto.h: add _LOCKING_PROTO_H_ guardMichael Adam1-0/+5
2011-05-31s3:locking/proto.h: add GPL/Copyright headerMichael Adam1-0/+21
2011-03-30s3-locking: move locking prototypes out of proto.h.Günther Deschner1-0/+201
Will later become part of locking.h Guenther