summaryrefslogtreecommitdiffstats
path: root/source3/locking
Commit message (Collapse)AuthorAgeFilesLines
* s3:locking add NDR debug in share_mode_forallChristian Ambach2013-04-191-0/+4
| | | | | | | | Reviewed-by: Volker Lendecke <vl@samba.org> Signed-off-by: Christian Ambach <ambi@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Fri Apr 19 15:06:33 CEST 2013 on sn-devel-104
* s3:locking: add function share_mode_cleanup_disconnected()Gregor Beck2013-04-182-0/+102
| | | | | | | | | | | 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: improve debug output of parse_share_modes()Gregor Beck2013-04-181-1/+2
| | | | | | Signed-off-by: Gregor Beck <gbeck@sernet.de> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:locking: no need to make a file_id passed by value a constantGregor Beck2013-04-182-13/+10
| | | | | | 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-182-0/+74
| | | | | | | | 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:brlock: explain the lockdb_clean semantic better in ↵Michael Adam2013-04-181-1/+5
| | | | | | | | brl_reconnect_disconnected() Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Gregor Beck <gbeck@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:locking:brlock: let validate_lock_entries keep entries for disconnected ↵Gregor Beck2013-04-181-8/+23
| | | | | | | | | | | | | servers in traverses We should not remove locks of disconnected opens just like that. When getting the byte range lock record for a newly connected file handle, we still do the clean up, because in that situation, disconnected entries are not valid any more. 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: improve the comment for the brl self cleaning codeMichael Adam2013-04-181-3/+6
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Gregor Beck <gbeck@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:locking:brlock: use serverids_exist to validate_lock_entriesGregor Beck2013-04-181-3/+34
| | | | | | | | | ...instead of checking each server-id separately which can be expensive in a cluster. Signed-off-by: Gregor Beck <gbeck@sernet.de> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* brlock.c: Fix typo in comment.Karolin Seeger2013-02-181-1/+1
| | | | | | redundent -> redundant Signed-off-by: Karolin Seeger <kseeger@samba.org>
* s3: Use dbwrap_parse_record in fetch_share_mode_unlockedVolker Lendecke2012-11-281-13/+14
| | | | Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:locking: add brl_mark_disconnected() and brl_reconnect_disconnected()Stefan Metzmacher2012-09-082-0/+127
| | | | Pair-Programmed-With: Michael Adam <obnox@samba.org>
* s3:locking: add mark_share_mode_disconnected()Stefan Metzmacher2012-09-082-0/+40
| | | | Pair-Programmed-With: Michael Adam <obnox@samba.org>
* s3:locking: fix trailing space in brl_close_fnum()Michael Adam2012-09-051-1/+1
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3: Fix a typoVolker Lendecke2012-09-041-1/+1
| | | | Signed-off-by: Jeremy Allison <jra@samba.org>
* s3:brlock: give traverse_fn a proper nameChristian Ambach2012-08-161-2/+2
|
* Move copy_unix_token() from locking/locking.c to lib/util.c.Jeremy Allison2012-07-031-29/+0
| | | | Make public.
* s3:brlock: s/int/uint64_t for fnumStefan Metzmacher2012-06-281-1/+1
| | | | | | | | | | | | | | | fsp->fnum and lock->fnum are uint64_t already and we should not truncate the value here. Currently this doesn't matter as we only use 16-bit. But as 'int' is int32_t and we later compare fnum with lock->fnum == fnum, the cast from int32_t to uint64_t goes via int64_t instead of uint32_t. This means even if fsp->fnum just uses 32-bit of the uint64_t we'll get the wrong result, as the implicit cast from a negative int32_t value to uint64_t adds 0xFFFFFFFF00000000. metze
* s3:brlock: add some const to print_lock_struct()Stefan Metzmacher2012-06-281-1/+1
| | | | metze
* s3: Remove reduce_windows_lock_ref_count, used only onceVolker Lendecke2012-06-221-8/+2
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3: Make reduce_windows_lock_ref_count staticVolker Lendecke2012-06-222-2/+2
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3: Use dbwrap_util for windows_lock_ref_countVolker Lendecke2012-06-221-94/+21
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:util: rename procid_equal() to serverid_equal()Michael Adam2012-06-213-8/+8
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3: Remove a user of procid_is_meVolker Lendecke2012-06-211-1/+2
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:locking: change locking.c to use fsp_fnum_dbg() for fsp->fnum logging.Michael Adam2012-06-151-8/+8
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:locking: change brlock.c to use fsp_fnum_dbg() for fsp->fnum logging.Michael Adam2012-06-151-4/+4
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3: Fix a commentVolker Lendecke2012-06-141-15/+13
| | | | | | | | | The fd count is implicit Signed-off-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Jun 14 01:53:17 CEST 2012 on sn-devel-104
* s3:include: change lock_struct->fnum to uint64_tMichael Adam2012-06-063-5/+6
| | | | | | | | | 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 connection_struct->cnum to uint32_tMichael Adam2012-06-061-1/+1
| | | | Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
* s3: Simplify get_delete_on_close_token moreVolker Lendecke2012-06-031-6/+2
| | | | | | All remaining callers actually want the token Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3: Simplify get_delete_on_close_token slightlyVolker Lendecke2012-06-031-19/+32
| | | | | | | Introduce find_delete_on_close_token. Thus is_delete_on_close_set does not have to call get_delete_on_close_token anymore. Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3: Avoid a lot of calls to serverid_exists()Volker Lendecke2012-06-011-1/+1
| | | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Fri Jun 1 18:58:30 CEST 2012 on sn-devel-104
* s3: Do not check the PIDs is parse_share_modesVolker Lendecke2012-05-251-42/+0
| | | | | | | We do that when conflicts arise Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3: Be less picky on stale share mode entriesVolker Lendecke2012-05-251-1/+3
| | | | | | | If a process died, the share mode entry might be bogus. Ignore those entries. Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3: Check for serverid_exists in rename_share_filenameVolker Lendecke2012-05-251-0/+4
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* Fix an invalid state only reachable on server crash/abort.Jeremy Allison2012-05-251-0/+11
| | | | | | | Remove any delete-on-close tokens and clear the count if there are no valid share modes. Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3: Add "share_mode_stale_pid"Volker Lendecke2012-05-252-0/+33
| | | | | | | | 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>
* Raise the debug level from 1 to 5 in get_share_mode_lock_internal()Jeremy Allison2012-05-181-1/+2
| | | | | This isn't a fatal condition, there is a valid codepath that can cause this message.
* s3: Revert the serverid changes, they need more workVolker Lendecke2012-05-183-40/+43
| | | | | Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Fri May 18 13:12:14 CEST 2012 on sn-devel-104
* s3: Be less picky on stale share mode entriesVolker Lendecke2012-05-171-1/+3
| | | | | | If a process died, the share mode entry might be bogus. Ignore those entries. Signed-off-by: Jeremy Allison <jra@samba.org>
* s3: Check for serverid_exists in rename_share_filenameVolker Lendecke2012-05-171-0/+4
| | | | Signed-off-by: Jeremy Allison <jra@samba.org>
* s3: Do not check the PIDs is parse_share_modesVolker Lendecke2012-05-171-42/+0
| | | | | | We do that when conflicts arise Signed-off-by: Jeremy Allison <jra@samba.org>
* s3: Add "share_mode_stale_server"Volker Lendecke2012-05-172-0/+33
| | | | | | | 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>
* s3: talloc_zero is not needed for structs we ndr_pull intoVolker Lendecke2012-05-141-1/+1
| | | | | Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Mon May 14 18:59:07 CEST 2012 on sn-devel-104
* s3: Fix Coverity ID 2682 -- NULL_RETURNSVolker Lendecke2012-04-191-3/+10
| | | | | Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Thu Apr 19 22:28:34 CEST 2012 on sn-devel-104
* Found whilst back-porting the fix for bug 8837 - smbd crashes when deleting ↵Jeremy Allison2012-04-071-9/+10
| | | | | | | | | | | directory and veto files are enabled. The delete tokens are unique to each name hash representing a pathname, if we don't correctly return here we'll add duplicate tokens for a given pasname hash. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sat Apr 7 02:13:58 CEST 2012 on sn-devel-104
* build: Remove SMB_OFF_T, replace with off_tAndrew Bartlett2012-04-061-32/+32
| | | | | | | | | Now that we always require a 64 bit off_t, we no longer need SMB_OFF_T. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Fri Apr 6 01:47:43 CEST 2012 on sn-devel-104
* build: Remove SMB_F* locking definesAndrew Bartlett2012-04-051-6/+6
|
* build: #ifdef LARGE_SMB_OFF_T as off_t is now always 64 bitsAndrew Bartlett2012-04-051-15/+2
|
* Second part of bugfix for bug #8837 - smbd crashes when deleting directory ↵Jeremy Allison2012-04-042-10/+51
| | | | | | | 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.