summaryrefslogtreecommitdiffstats
path: root/source3/smbd/blocking.c
Commit message (Collapse)AuthorAgeFilesLines
* s3-build: Provide a run-time shim to work around duplicate symbolsAndrew Bartlett2011-06-211-3/+3
| | | | | | | | | | | | | | | | The become_root() and similar 'smbd' functions that are used widely in Samba libraries had 'dummy' copies in dummysmbd.c and dummyroot.c. These have been replaced by a runtime plugin mechanim, which ensures that standlone binaries still do nothing, while in smbd the correct function is used. This avoids having these as duplicate symbols in the smbd binary, which can cause unpredictable behaviour. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* lib/util/time.c: timeval_current_ofs_msecRusty Russell2011-06-011-2/+1
| | | | | | | | | | Several places want "milliseconds from current time", and several were simply doing "msec * 1000" which can (and does in one place) result in a usec value over 1 a million. Using a helper to do this is safer and more readable. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* s3-globals Remove smbd_event_context() (use server_event_context())Andrew Bartlett2011-05-311-1/+1
| | | | | | | | This has been a wrapper around server_event_context() for some time now, and removing this from dummmysmbd.c assists with library dependencies. Andrew Bartlett
* Fix many const compiler warnings.Jeremy Allison2011-05-051-2/+2
|
* s3-messages: make ndr_messaging.h part of messages.h.Günther Deschner2011-03-301-1/+0
| | | | Guenther
* s3-messages: only include messages.h where needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* s3: include smbd/smbd.h where needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* s3: Remove smbd_server_conn from process_blocking_lock_cancel_messageVolker Lendecke2010-10-031-1/+7
|
* s3: Remove smbd_server_conn from smb1 receive_unlock_msgVolker Lendecke2010-10-031-1/+9
|
* s3: Make srv_send_smb take an sconn instead of a sock fdVolker Lendecke2010-08-241-2/+2
|
* s3: Remove smbd_server_fd from blocking_lock_reply_errorVolker Lendecke2010-08-161-1/+1
|
* s3: Remove smbd_server_fd from generic_blocking_lock_errorVolker Lendecke2010-08-161-1/+1
|
* s3: Remove procid_self() from blocking_lock_cancel_smb1()Volker Lendecke2010-07-051-1/+1
|
* s3: Remove procid_self() from process_blocking_lock_queue()Volker Lendecke2010-07-051-2/+2
|
* s3: Remove procid_self() from remove_pending_lock_requests_by_mid_smb1()Volker Lendecke2010-07-051-1/+1
|
* s3: Remove procid_self() from cancel_pending_lock_requests_by_fid()Volker Lendecke2010-07-051-1/+1
|
* s3: Remove procid_self() from generic_blocking_lock_error()Volker Lendecke2010-07-051-1/+2
|
* s3: Remove procid_self() from push_blocking_lock_request()Volker Lendecke2010-07-051-1/+1
|
* s3: Remove smbd_messaging_context() from blocking_lock_cancel_smb1()Volker Lendecke2010-07-051-2/+2
|
* s3: Remove smbd_messaging_context() from process_trans2()Volker Lendecke2010-07-051-1/+2
|
* s3: Remove smbd_messaging_context() from process_lockingX()Volker Lendecke2010-07-051-1/+1
|
* s3: Remove smbd_messaging_context() from reply_lockingX_error()Volker Lendecke2010-07-051-1/+1
|
* s3: Remove smbd_messaging_context() from push_blocking_lock_request()Volker Lendecke2010-07-051-2/+2
|
* s3: Explicitly pass sconn to process_blocking_lock_queue_smb2Volker Lendecke2010-06-121-1/+1
|
* s3: Explicitly pass sconn to process_blocking_lock_queueVolker Lendecke2010-06-121-4/+3
|
* s3: Remove smbd_server_conn from blocking_lock_cancel_smb1Volker Lendecke2010-06-121-1/+1
|
* s3: Explicitly pass sconn to recalc_brl_timeoutVolker Lendecke2010-06-121-4/+3
|
* s3: Explicitly pass sconn to blocking_lock_was_deferred_smb1Volker Lendecke2010-06-121-2/+2
|
* s3: Explicitly pass sconn to remove_pending_lock_requests_by_mid_smb1Volker Lendecke2010-06-121-2/+2
|
* s3: Remove smbd_server_conn from cancel_pending_lock_requests_by_fidVolker Lendecke2010-06-121-1/+1
|
* s3: Remove smbd_server_conn from push_blocking_lock_requestVolker Lendecke2010-06-121-1/+1
|
* s3: Remove smbd_server_conn from brl_timeout_fnVolker Lendecke2010-06-121-4/+6
|
* Rename "allow_smb2" -> "using_smb2" and make the usage clearer.Jeremy Allison2010-06-091-3/+3
|
* This patch looks bigger than it is. It does 2 things. 1). Renames smbpid -> ↵Jeremy Allison2010-05-071-27/+27
| | | | | | smblctx in our locking code. 2). Widens smblctx to 64-bits internally. Preparing to use the SMB2 handle as the locking context. Jeremy.
* Make us pass all SMB2 lock tests except MULTIPLE-UNLOCK and CONTEXT. Them ↵Jeremy Allison2010-05-071-2/+6
| | | | | | next :-). Jeremy.
* Fix more SMB2 locking. We still crash but this won't last :-).Jeremy Allison2010-05-061-3/+2
| | | | Jeremy.
* s3: only include gen_ndr headers where needed.Günther Deschner2010-05-061-0/+1
| | | | | | | | | | | | | | | | | This shrinks include/includes.h.gch by the size of 7 MB and reduces build time as follows: ccache build w/o patch real 4m21.529s ccache build with patch real 3m6.402s pch build w/o patch real 4m26.318s pch build with patch real 3m6.932s Guenther
* Fixed issue with return in a void function found by Björn JACKE <bj@SerNet.DE>Jeremy Allison2010-05-051-1/+2
| | | | Jeremy.
* Plumb the SMB2 front end into the blocking lock backend.Jeremy Allison2010-04-301-5/+16
| | | | | | | | | | 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.
* Carefully label SMB1-specific locking calls.Jeremy Allison2010-04-291-5/+14
| | | | Jeremy.
* Move the global blocking lock records into the smb1 state.Jeremy Allison2010-04-291-21/+30
| | | | Jeremy
* Move to using 64-bit mid values in our internal open file database.Jeremy Allison2010-04-121-2/+2
| | | | | | | This will allow us to share logic much easier between SMB1 and SMB2 servers. Jeremy
* Plumb SMB2 stubs into all the places we defer SMB1 operations.Jeremy Allison2010-04-091-1/+1
| | | | | | | | Rename functions to be internally consistent. Next step is to cope queueing single (non-compounded) SMB2 requests to put some code inside the stubs. Jeremy.
* Stop smb2 from calling into smb1 blocking lock request code.Jeremy Allison2010-04-081-0/+14
| | | | | | | | | | | Allocate a uint16_t internal SMB1 mid for an SMB2 request. Add a back pointer from the faked up smb_request struct to the smb2 request. Getting ready to add restart code for blocking locks, share mode violations and oplocks in SMB2. Jeremy.
* s3/smbd: change locking behavior when "lock spin time = 0".Steven Danneman2010-02-121-1/+1
| | | | | | | | | | | | | | | | | | | | | The "lock spin time" parameter mimics the following Windows setting which by default is 250ms in Windows and 200ms in Samba. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\LockViolationDelay When a client sends repeated, non-blocking, contending BRL requests to a Windows server, after the first Windows starts treating these requests as timed blocking locks with the above timeout. As an efficiency, I've changed the behavior when this setting is 0, to skip this logic and treat all requests as non-blocking locks. This gives the smbd server behavior similar to the 3.0 release with the do_spin_lock() implementation. I've also changed the blocking lock parameter in the call from push_blocking_lock_request() to true as all requests made in this path are blocking by definition.
* Fix trailing whitespace errors I added (sorry).Jeremy Allison2010-02-051-2/+2
| | | | Jeremy.
* s3-brlock: add a minimim retry time for pending blocking locksAndrew Tridgell2010-02-051-0/+20
| | | | | | | | | | | | | | | | | When we are waiting on a pending byte range lock, another smbd might exit uncleanly, and therefore not notify us of the removal of the lock, and thus not trigger the lock to be retried. We coped with this up to now by adding a message_send_all() in the SIGCHLD and cluster reconfigure handlers to send a MSG_SMB_UNLOCK to all smbd processes. That would generate O(N^2) work when a large number of clients disconnected at once (such as on a network outage), which could leave the whole system unusable for a very long time (many minutes, or even longer). By adding a minimum re-check time for pending byte range locks we avoid this problem by ensuring that pending locks are retried at a more regular interval.
* Second part of the fix for bug 6828 - infinite timeout occurs when byte lock ↵Jeremy Allison2009-10-261-6/+9
| | | | | | | | held outside of samba. Fixes case where a connection with a pending lock can me marked "idle", and ensures that the lock queue timeout is always recalculated. Jeremy.
* Fix bug 6828 - infinite timeout occurs when byte lock held outside of sambaJeremy Allison2009-10-201-8/+18
| | | | Jeremy.
* s3: Change fsp->fsp_name to be an smb_filename struct!Tim Prouty2009-07-201-7/+8
|