Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
|
|
This is needed for OpenChange, which prints Samba struct server_id
values in debug messages.
Andrew Bartlett
|
|
Using the standard macro makes it easier to move code into common, as
TALLOC_ARRAY isn't standard talloc.
|
|
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
|
|
Guenther
|
|
Guenther
|
|
Guenther
|
|
This avoids this structure being partially uninitialised.
Adnrew Bartlett
|
|
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
|
|
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Feb 1 00:39:56 CET 2011 on sn-devel-104
|
|
We should not grant levelII oplocks on a file with existing
byte range locks.
|
|
to identify a specific path).
|
|
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
|
|
Just a fd_event to be cleaned up. The pipe is closed implicitly.
|
|
The destructor that is called removes the signal handler. But at process
exit the signal handling is lost anyway.
|
|
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Oct 5 10:09:38 UTC 2010 on sn-devel-104
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
global.
Jeremy.
|
|
Jeremy.
|
|
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
|
|
Seems to work but needs more tests (to be added).
Jeremy.
|
|
This will allow us to share logic much easier between SMB1 and SMB2
servers.
Jeremy
|
|
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.
|
|
Jeremy.
|
|
|
|
|
|
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.
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
We keep the seqnum/mid mapping in the smb_request structure.
This also moves one global variable into the
smbd_server_connection struct.
metze
|
|
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.
|
|
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.
|
|
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.
|
|
This replaces release_level2_oplocks_on_change with
contend_level2_oplock_begin/end in order to contend level2 oplocks
throughout an operation rather than just at the begining. This is
necessary for some kernel oplock implementations, and also lays the
groundwork for better correctness in Samba's standard level2 oplock
handling. The next step for non-kernel oplocks is to add additional
state to the share mode lock struct that prevents any new opens from
granting oplocks while a contending operation is in progress.
All operations that contend level 2 oplocks are now correctly spanned
except for aio and synchronous writes. The two write paths both have
non-trivial error paths that need extra care to get right.
RAW-OPLOCK and the rest of 'make test' are still passing with this
change.
|
|
Level 2 for kernel oplocks
Pass in an extra argument when releasing an oplock so kernel oplock
implementations can support downgrading from Level 1 to Level 2.
|