1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-30 13:18:05 +03:00
Commit Graph

99 Commits

Author SHA1 Message Date
Stefan Metzmacher
c16c90a1cb s3:smbd: use new simplified snb_signing code in the server
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-03-23 12:21:13 +01:00
Stefan Metzmacher
196a5d0388 s3:signing: the seqnum should only be decremented by 1 for ntcancel requests
[MS-SMB] 3.3.5.1 Receiving Any Message says that the seqnum
is incremented by only for ntcancel requests for any other
request it's by incremented by 2, even if it doesn't expect
a response.

metze
2009-03-06 16:37:20 +01:00
Tim Prouty
c6f1f055fd s3 oplocks: Make the level2 oplock contention API more granular
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.
2009-02-09 23:47:45 -08:00
todd stecher
54c51a66e3 S3: New module interface for SMB message statistics gathering
This changelist allows for the addition of custom performance
monitoring modules through smb.conf. Entrypoints in the main message
processing code have been added to capture the command, subop, ioctl,
identity and message size statistics.
2009-02-09 13:23:44 -08:00
Volker Lendecke
d94e9c802c Remove the global variable "chain_size" 2009-01-31 11:09:39 +01:00
Stefan Metzmacher
b8c416fe2a s3:smbd: convert aio to use tevent_signal
metze
2009-01-27 15:28:09 +01:00
Stefan Metzmacher
3dde0cbb76 s3:smbd: move all globals and static variables in globals.[ch]
The goal is to move all this variables into a big context structure.

metze
2009-01-08 12:22:21 +01:00
Volker Lendecke
52958ea115 Remove a direct inbuf reference (should have been removed with 8987641d...) 2008-11-08 10:42:28 +01:00
Volker Lendecke
8987641db8 Rewrite aio.c to keep the whole smb_request structure, not just the inbuf 2008-11-04 20:52:06 +01:00
Volker Lendecke
e4897a5376 Add construct_reply_common_req wrapper
The goal is to remove the remaining direct calls to construct_reply_common.
2008-11-04 20:52:06 +01:00
Volker Lendecke
d62ff20cd5 Fix nonempty blank lines 2008-11-04 20:52:06 +01:00
Volker Lendecke
71bc6e93a1 Use talloc for struct aio_extra 2008-11-04 20:52:06 +01:00
Volker Lendecke
9a05c277ca Make a comment match its function definition 2008-11-03 17:58:07 +01:00
Volker Lendecke
f3e638bc9f Make a [un]become_root wrap a bit tighter
Sooner or later this would bite us.
2008-11-02 21:53:44 +01:00
Volker Lendecke
2bab73a18d Remove a bunch of direct inbuf references by adding "vwv" to smb_request 2008-11-02 16:58:19 +01:00
Timur
4dfa72423e Fix aio on FreeBSD. 2008-09-15 18:45:10 -07:00
Andrew Tridgell
563a7ccdd9 become root for AIO operations
We need to become root for AIO read and write to allow the AIO thread
to send a completion signal to the parent process when the IO
completes
(This used to be commit c548e5c69f)
2008-08-26 14:39:43 +02:00
Volker Lendecke
fcee8fee63 Allow "max mux" async i/o requests
In the negprot reply, we allowed the client to issued "max mux" concurrent
requests. The OS might allow less, for example AFAIK AIX has a configurable
limit of concurrent AIO requests. We will fall back to sync operation for the
requests that are too many when aio_read/aio_write return an error.

Jeremy, please check!
(This used to be commit 8f86f7f25c)
2008-02-24 11:39:59 +01:00
Volker Lendecke
21b6a03678 Export aio_request_done()
This is for external modules implementing the Posix AIO API that not
necessarily depend on the signal mechanism to indicate completion.
(This used to be commit 9a069d306b)
2008-02-24 11:39:57 +01:00
Volker Lendecke
db9db9cef9 AIO on streams does not work (yet...)
(This used to be commit 1ba223f202)
2008-02-24 00:05:40 +01:00
Volker Lendecke
4c4c1bfb79 Update position information also for AIO
Necessary to survive RAW-SEEK with AIO enabled.

Jeremy, please check!
(This used to be commit e2ca12c234)
2008-02-19 16:19:49 +01:00
Volker Lendecke
e12cd305dd Inform level II oplock holders when we write using AIO
Jeremy, please check!
(This used to be commit 81d823e026)
2008-02-19 16:19:49 +01:00
Volker Lendecke
34a92c6285 Re-enable async I/O for non-TSM systems
The logic was wrong: A "SMB_VFS_AIO_FORCE()==False" disabled async I/O, whereas
a "SMB_VFS_AIO_FORCE()==True" should enforce it regardless of other settings.

Alexander, please check!
(This used to be commit 46882ad992)
2008-01-30 11:12:10 +01:00
Volker Lendecke
bb2c52ad43 Remove an unused variable
(This used to be commit 24e719a1d4)
2008-01-12 23:57:11 +01:00
Michael Adam
4a056e127a Remove redundant parameter fd from SMB_VFS_AIO_CANCEL().
Michael
(This used to be commit 3c997ae000)
2008-01-08 12:20:55 +01:00
Jeremy Allison
9254bb4ef1 Refactor the crypto code after a very helpful conversation
with Volker. Mostly making sure we have data on the incoming
packet type, not stored in the smb header.
Jeremy.
(This used to be commit c4e5a50504)
2008-01-04 12:56:23 -08:00
Volker Lendecke
bd7fc51f2d Fix the build
(This used to be commit 7fb858b350)
2007-12-27 22:32:36 +01:00
Jeremy Allison
afc93255d1 Add SMB encryption. Still fixing client decrypt but
negotiation works.
Jeremy.
(This used to be commit d78045601a)
2007-12-26 17:12:36 -08:00
Jeremy Allison
30191d1a57 RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
(This used to be commit f35a266b3c)
2007-10-18 17:40:25 -07:00
Gerald (Jerry) Carter
e5a951325a [GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch.
(This used to be commit 5c6c8e1fe9)
2007-10-10 15:34:30 -05:00
Volker Lendecke
921fbb25eb r24332: schedule_aio_read_and_X does not need InBuf/OutBuf
(This used to be commit 9ad91bd205)
2007-10-10 12:29:30 -05:00
Volker Lendecke
12d94f77f9 r24279: Remove reply_prep_legacy from reply_write_and_X
(This used to be commit f18b7a9a28)
2007-10-10 12:29:24 -05:00
Volker Lendecke
115062e7ce r24049: Some more 64-bit warnings
(This used to be commit eabe796e46)
2007-10-10 12:28:59 -05:00
Andrew Tridgell
5e54558c6d r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
(This used to be commit b0132e94fc)
2007-10-10 12:28:22 -05:00
Jeremy Allison
d824b98f80 r23779: Change from v2 or later to v3 or later.
Jeremy.
(This used to be commit 407e6e695b)
2007-10-10 12:28:20 -05:00
Jeremy Allison
cc35d1300d r23508: Fix sync_file() to return NTSTATUS and return this
on failure in the write path.
Jeremy.
(This used to be commit cd3f7dbee8)
2007-10-10 12:23:23 -05:00
Michael Adam
e95c34dc6b r22411: Fix the build:
Prototype of create_aio_ex_read, set_message and definition of
UNIXERROR have changed in r22389 and r22391? to require an additional
"inbuf" argument. Some places in smbd/aio.c had not been adapted.

This patch fixes the build.

Michael
(This used to be commit 9de1af6dc8)
2007-10-10 12:19:32 -05:00
Jeremy Allison
0829e1ad1c r22391: Looks bigger than it is. Make "inbuf" available
to all callers of smb_setlen (via set_message()
calls). This will allow the server to reflect back
the correct encryption context.
Jeremy.
(This used to be commit 2d80a96120)
2007-10-10 12:19:30 -05:00
Jeremy Allison
dc90cd89a7 r22389: Start preparing for multiple encryption contexts in the
server. Allow server to reflect back to calling client
the encryption context that was sent.
Jeremy.
(This used to be commit b49e90335d)
2007-10-10 12:19:30 -05:00
Volker Lendecke
d9a29aade0 r21279: Get rid of 'aio write behind', this is broken.
It should probably better be integrated with our write cache.

Volker
(This used to be commit 58bfd168b0)
2007-10-10 12:17:53 -05:00
Volker Lendecke
fe881c3e38 r21278: The main goal of this was to get rid of the NetInBuffer / set_InBuffer. But it
turns out that this patch actually speeds up the async writes considerably.

I tested writing 100.000 times 65535 bytes with the allowed 10 ops in
parallel. Without this patch it took about 32 seconds on my dual-core 1.6GHz
laptop. With this patch it dropped to about 26 seconds. I can only explain it
by better cache locality, NewInBuffer allocates more than 128k, so we jump
around in memory more.

Jeremy, please check!

Volker
(This used to be commit 452d51bc6f)
2007-10-10 12:17:53 -05:00
Volker Lendecke
4f5cfc9899 r21277: Fix an off by one error in the signal handler for aio: We can actually receive
AIO_PENDING_SIZE signals, not one less.

Jeremy I'm not merging this to 3_0_25, I want you to look at it first!

Volker
(This used to be commit 8fd0ec5836)
2007-10-10 12:17:53 -05:00
Volker Lendecke
bea1025b1a r21269: Reformatting
(This used to be commit b2eaa733c5)
2007-10-10 12:17:53 -05:00
Volker Lendecke
f933a9abc2 r20541: Fix some obvious glitches in wait_for_aio_completion. Hmmm. It seems
reply_close() at its heart is going to be an async call :-)

Volker
(This used to be commit 36f60407ae)
2007-10-10 12:16:55 -05:00
James Peach
5bb49b08f3 r20237: Replace exit_server with exit_server_cleanly where appropriate. All
send_smb failures should be clean exits. All times when we exit as
a matter of policy should also be clean exits.
(This used to be commit d6382092e7)
2007-10-10 12:16:34 -05:00
Jeremy Allison
bd9b6a249a r11283: Move to using sival_int from sival_ptr. Part of bug #2922.
Jeremy.
(This used to be commit f68ff32630)
2007-10-10 11:05:10 -05:00
James Peach
93954d6390 r9985: Move the all the strict sync logic into file_sync().
(This used to be commit cc680bbe22)
2007-10-10 11:03:30 -05:00
Günther Deschner
60e18904e6 r8402: allow to build with --enable-aio-support.
Guenther
(This used to be commit 49351d91c5)
2007-10-10 11:00:04 -05:00
Jeremy Allison
f2f55d703d r7963: Add aio support to 3.0.
Jeremy.
(This used to be commit 1de27da470)
2007-10-10 10:58:05 -05:00