summaryrefslogtreecommitdiff
path: root/source3/smbd/oplock.c
AgeCommit message (Collapse)AuthorFilesLines
2011-08-02s3: Pass sconn explicitly to schedule_deferred_open_message_smbVolker Lendecke1-2/+10
2011-08-02s3: Fix some nonempty blank linesVolker Lendecke1-4/+4
2011-06-21s3-build: Provide a run-time shim to work around duplicate symbolsAndrew Bartlett1-2/+2
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>
2011-06-09lib/util Bring procid_str() into lib/util as server_id_string()Andrew Bartlett1-5/+5
This is needed for OpenChange, which prints Samba struct server_id values in debug messages. Andrew Bartlett
2011-06-09s3-talloc Change TALLOC_ARRAY() to talloc_array()Andrew Bartlett1-1/+1
Using the standard macro makes it easier to move code into common, as TALLOC_ARRAY isn't standard talloc.
2011-05-31s3-globals Remove smbd_event_context() (use server_event_context())Andrew Bartlett1-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
2011-03-30s3-messages: make ndr_messaging.h part of messages.h.Günther Deschner1-1/+0
Guenther
2011-03-30s3-messages: only include messages.h where needed.Günther Deschner1-0/+1
Guenther
2011-03-30s3: include smbd/smbd.h where needed.Günther Deschner1-0/+1
Guenther
2011-02-17s3-cluster Always fill in the clustering vnn elementAndrew Bartlett1-4/+0
This avoids this structure being partially uninitialised. Adnrew Bartlett
2011-02-05Move the "oplock file with byte range locks" check to the correct place, ↵Jeremy Allison1-17/+0
where we're making oplock decisions. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sat Feb 5 01:18:14 CET 2011 on sn-devel-104
2011-02-01Ensure we send the direct levelII oplock break to the correct fid.Pavel Shilovsky1-1/+10
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Tue Feb 1 00:39:56 CET 2011 on sn-devel-104
2011-01-31Fix bug #7928 - Samba problems with kernel oplocks option set to "no"Pavel Shilovsky1-7/+28
We should not grant levelII oplocks on a file with existing byte range locks.
2011-01-25Add name_hash into the share mode entry struct (as yet only use for renames ↵Jeremy Allison1-0/+2
to identify a specific path).
2010-10-08s3: Hang the isilon kernel oplocks off the NULL contextVolker Lendecke1-1/+2
All I see is a fd_event that does not need a special destructor. Tim, Steven, I've added the #error as well for you to remove after review. Thanks, Volker Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Fri Oct 8 20:48:11 UTC 2010 on sn-devel-104
2010-10-08s3: Hang the irix kernel oplocks off the NULL ctxVolker Lendecke1-1/+1
Just a fd_event to be cleaned up. The pipe is closed implicitly.
2010-10-08s3: Hang the linux kernel oplocks off the NULL ctxVolker Lendecke1-1/+1
The destructor that is called removes the signal handler. But at process exit the signal handling is lost anyway.
2010-10-05s3: Stop using the write cache after an oplock breakVolker Lendecke1-0/+1
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Tue Oct 5 10:09:38 UTC 2010 on sn-devel-104
2010-10-03s3: Remove smbd_server_conn from process_kernel_oplock_breakVolker Lendecke1-2/+8
2010-10-03s3: Remove smbd_server_conn from process_oplock_break_messageVolker Lendecke1-3/+8
2010-10-03s3: Remove smbd_server_conn from process_oplock_async_level2_break_messageVolker Lendecke1-2/+8
2010-10-03s3: Lift smbd_server_conn from initial_break_processingVolker Lendecke1-5/+9
2010-09-28s3: Lift smbd_server_conn from file_find_difVolker Lendecke1-1/+1
2010-08-24s3: Make srv_send_smb take an sconn instead of a sock fdVolker Lendecke1-1/+1
2010-08-16s3: Remove smbd_server_fd from send_break_message_smb1Volker Lendecke1-1/+1
2010-07-05s3: Remove smbd_messaging_context() from contend_level2_oplocks_begin_default()Volker Lendecke1-1/+1
2010-07-05s3: Remove smbd_messaging_context() from reply_to_oplock_break_requests()Volker Lendecke1-1/+1
2010-07-05s3: Remove procid_self() from break_kernel_oplock()Volker Lendecke1-1/+1
2010-06-12s3: Remove smbd_server_conn from break_level2_to_none_asyncVolker Lendecke1-1/+1
2010-06-09Rename "allow_smb2" -> "using_smb2" and make the usage clearer.Jeremy Allison1-3/+3
2010-05-13Be more forgiving on client oplock break failure (as Windows does). Remove a ↵Jeremy Allison1-4/+0
global. Jeremy.
2010-05-12Pass more SMB2 oplock tests. Only oplock stream tests left to fix.Jeremy Allison1-1/+4
Jeremy.
2010-05-06s3: only include gen_ndr headers where needed.Günther Deschner1-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
2010-04-24Implement oplocks within SMB2. Plumb into the existing SMB1 oplock system.Jeremy Allison1-3/+3
Seems to work but needs more tests (to be added). Jeremy.
2010-04-12Move to using 64-bit mid values in our internal open file database.Jeremy Allison1-30/+30
This will allow us to share logic much easier between SMB1 and SMB2 servers. Jeremy
2010-04-09Plumb SMB2 stubs into all the places we defer SMB1 operations.Jeremy Allison1-12/+12
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.
2010-04-07Start to plumb smb2 into the oplock system. Calls dummy functions for now.Jeremy Allison1-46/+41
Jeremy.
2010-01-19s3: Fix a typoVolker Lendecke1-1/+1
2010-01-19s3: Remove a comment from ancient times that no longer appliesVolker Lendecke1-1/+0
2009-11-03s3: Remove debug_ctx()Volker Lendecke1-5/+5
smbd just crashed on me: In a debug message I called a routine preparing a string that itself used debug_ctx. The outer routine also used it after the inner routine had returned. It was still referencing the talloc context that the outer debug_ctx() had given us, which the inner DEBUG had already freed.
2009-07-20s3: Change fsp->fsp_name to be an smb_filename struct!Tim Prouty1-10/+14
2009-04-12We have to deny a level 2 oplock if kernel oplocks are enabledVolker Lendecke1-0/+6
The second r/o opener of a file is supposed to get a level2 oplock. The first opener due to the protection in process_oplock_break_message() has been forced to break to no oplock. The second opener according to locking.tdb gets a level2 oplock. Further down in open_file_ntcreate we try to set this level2 oplock in the kernel, and the non-clustered Linux kernel disallows this. The rules for the kernel leases are a bit baroque, but the attempt to do the SETLEASE correctly fails and we end up with no oplock for any client. In the clustered case however the linux kernel on the second opening node has not seen the open fd of the first node, it is only the cluster fs that has this information. If the cluster fs does not have the very same notion of leases as the local kernel has, we can end up with a WRLCK style kernel lease for the second opener where locking.tdb only indicates a level2 oplock. Getting a kernel oplock break signal with just a level2 oplock in locking.tdb is something smbd is not prepared for. For example after sending out the break in response to the kernel signal we set a timeout, waiting for a reply. More work needs to be done to make level2 kernel oplocks real for us. This patch addresses a real problem we have right now without them.
2009-04-07s3 oplocks: Add back procid_str to debug messageTim Prouty1-2/+3
2009-04-06s3 oplocks: Refactor level II oplock contentionTim Prouty1-57/+53
2009-04-03Use cluster-aware procid_is_me instead of comparing pid'sVolker Lendecke1-2/+2
2009-04-03Use procid_str in debug messages for better cluster-debuggabilityVolker Lendecke1-11/+13
2009-03-23s3:smbd: use new simplified snb_signing code in the serverStefan Metzmacher1-24/+3
We keep the seqnum/mid mapping in the smb_request structure. This also moves one global variable into the smbd_server_connection struct. metze
2009-02-19s3: Add extid to the dev/inode pairTim Prouty1-14/+14
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.
2009-02-09s3 OneFS: Add kernel oplocks implementationTim Prouty1-0/+7
A few functions in oplocks_onefs.c need to be accessed from the onefs vfs module. It would be ideal if oplocks were implemented at the vfs layer, but since they aren't yet, a new header is added to source3/include to make these functions available to the onefs vfs module. oplocks_onefs.o doesn't need to be linked into the onefs vfs module explicitly, since it is already linked into smbd by default.
2009-02-09s3 oplocks: Add capabilites flags field to the kernel_oplocks structTim Prouty1-2/+28
Here is a short description for each of the new capability flags: KOPLOCKS_LEVEL2_SUPPORTED: Level 2 oplocks are supported natively in the kernel. KOPLOCKS_DEFERRED_OPEN_NOTIFICATION: The kernel notifies deferred openers when they can retry the open. KOPLOCKS_TIMEOUT_NOTIFICATION: The kernel notifies smbds when an oplock break times out. KOPLOCKS_OPLOCK_BROKEN_NOTIFICATION: The kernel notifies smbds when an oplock is broken.