summaryrefslogtreecommitdiff
path: root/source3/smbd/process.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r21879: Move process_blocking_lock_queue to a timed event.Volker Lendecke1-7/+1
The idea is that we have blocking.c:brl_timeout as a timed event that is present whenever we do have a blocking lock pending. It fires brl_timeout_fn() which calls process_blocking_lock_queue(). Whenever we make changes to blocking_lock_queue, we trigger a recalc_brl_timeout() which sets a new brl_timout event if necessary. This makes the call to blocking_locks_timeout_ms() in setup_select_timeout() unnecessary, this is implicitly done in event_add_to_select_args() from the timed events. Volker (This used to be commit 7e31b8ce21de803ac1f8967967393341a3f44ac3)
2007-10-10r21871: Move deadtime processing into an idle event. While there, simplifyVolker Lendecke1-21/+0
conn_idle_all() a bit. Volker (This used to be commit 3fc00977a99932b226bdcbc43bbc0ede1bcec26f)
2007-10-10r21870: Move sending auth_server keepalives out of the main loop into an ↵Volker Lendecke1-18/+0
idle event. Volker (This used to be commit 6226b30f38cd82531422815ba66a687aab50028d)
2007-10-10r21869: Move sending keepalives out of the main processing loop into idle event.Volker Lendecke1-12/+15
On the way, make lp_keepalive() a proper parameter. Volker (This used to be commit 9499fd9c803d030ce9827f8379c2e56d91bb786e)
2007-10-10r21868: Remove check_log_size from the central smbd processing loop. This ↵Volker Lendecke1-7/+0
can be done with a become_root/unbecome_root in debug.c. (This used to be commit 4632a0caaf251d9cc7b9d84cbd20362d37f0e4e0)
2007-10-10r21867: Simplify calling convention of timeout_processing. lp_deadtime is onlyVolker Lendecke1-10/+11
referenced in conn_idle_all(). (This used to be commit c0aaee6d36cf1fb873cfb9ab6ee52ff097a202a0)
2007-10-10r21784: Replace smb_register_idle_event() with event_add_timed(). This fixes ↵Volker Lendecke1-3/+0
winbind who did not run the idle events to drop ldap connections. Volker (This used to be commit af3308ce5a21220ff4c510de356dbaa6cf9ff997)
2007-10-10r21731: Fix long-standing bug in our chain processing code.Jeremy Allison1-3/+20
Should fix a bug with WinPE. Probably a candidate for the Vista patchset. Jeremy. (This used to be commit ef32de6b59fef3e9f59e6f864ce5eb072390ea48)
2007-10-10r21278: The main goal of this was to get rid of the NetInBuffer / ↵Volker Lendecke1-38/+2
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 452d51bc6fd41771b9c41ba6391664513d7cf2cd)
2007-10-10r21184: Dummy checkin to let the build farm pick up r21183 of Samba4Volker Lendecke1-2/+2
(This used to be commit 22c9511314d563e1f4480099d2990cb5fbb8546a)
2007-10-10r21166: Ensure we return the correct "EROFS" error on a non-writableJeremy Allison1-1/+1
filesystem. Jeremy. (This used to be commit 1e25501e8e6c568ab8892e05e0a60197e267d2b5)
2007-10-10r20931: This changes the notify infrastructure from a polling-based to an ↵Volker Lendecke1-31/+0
event-driven based approach. The only remaining hook into the backend is now void *(*notify_add)(TALLOC_CTX *mem_ctx, struct event_context *event_ctx, files_struct *fsp, uint32 *filter); (Should we put this through the VFS, so that others can more easily plug in?) The trick here is that the backend can pick filter bits that the main smbd should not handle anymore. Thanks to tridge for this idea. The backend can notify the main smbd process via void notify_fsp(files_struct *fsp, uint32 action, char *name); The core patch is not big, what makes this more than 1800 lines are the individual backends that are considerably changed but can be reviewed one by one. Based on this I'll continue with inotify now. Volker (This used to be commit 9cd6a8a82792b7b6967141565d043b6337836a5d)
2007-10-10r20846: Before this gets out of control...Volker Lendecke1-27/+38
This add a struct event_context and infrastructure for fd events to smbd. This is step zero to import lib/events. Jeremy, I rely on you to watch the change in receive_message_or_smb() closely. For the normal code path this should be the only relevant change. The rest is either not yet used or is cosmetic. Volker (This used to be commit cd07f93a8aecb24c056e33b1ad3447a41959810f)
2007-10-10r20742: Rename chkpth -> checkpath for sanity's sake :-).Jeremy Allison1-1/+1
Start removing unneeded "BOOL ok" from this reply.c (this logic is old, old, old..... :-). Jeremy. (This used to be commit 3d52268095c605a80dfcd371769198a332baa0a5)
2007-10-10r20700: In the main processing loop we select() on the fam socket. If it ↵Volker Lendecke1-0/+13
fires, it might be possible that we hang in the receive_smb() although that socket is not the reason for the select() to return. This immediately reacts to the fam socket to become readable, and goes into the select loop again. This fixes delays in files showing up in Windows. Jeremy, James please review this and merge to 3_0_24 if appropriate. Thanks, Volker (This used to be commit c846153b2ed2f9aca82491888e391ccbe239e88a)
2007-10-10r20432: Apply some constVolker Lendecke1-1/+1
(This used to be commit 22163fee595251d4ea92279d88a1e8525188c620)
2007-10-10r18605: sync dlinklist.h with samba4, that means DLIST_ADD_END()Stefan Metzmacher1-2/+1
and DLIST_DEMOTE() now take the type of the tmp pointer not the tmp pointer itself anymore. metze (This used to be commit 2f58645b7094e81dff3734f11aa183ea2ab53d2d)
2007-10-10r17569: Make 'max smbd processes' more robust. Counting on the child to ↵Volker Lendecke1-56/+2
decrement a tdb entry is not the most reliable way to count children correctly. This increments the number of children after a fork and decrements it upon SIGCLD. I'm keeping a list of children just for consistency checks, so that we at least get a debug level 0 message if something goes wrong. Volker (This used to be commit eb45de167d24d07a218307ec5a48c0029ec097c6)
2007-10-10r17105: Fix the race Volker found - we had a non-lockedJeremy Allison1-6/+7
region between detecting a pending lock was needed and when we added the blocking lock record. Make sure that we hold the lock over all this period. Removed the old code for doing blocking locks on SMB requests that never block (the old SMBlock and friends). Discovered something interesting about the strange NT_STATUS_FILE_LOCK_CONFLICT return. If we asked for a lock with zero timeout, and we got an error of NT_STATUS_FILE_LOCK_CONFLICT, treat it as though it was a blocking lock with a timeout of 150 - 300ms. This only happens when timeout is sent as zero and can be seen quite clearly in ethereal. This is the real replacement for old do_lock_spin() code. Re-worked the blocking lock select timeout to correctly use milliseconds instead of the old second level resolution (far too coarse for this work). Jeremy. (This used to be commit b81d6d1ae95a3d3e449dde629884b565eac289d9)
2007-10-10r16945: Sync trunk -> 3.0 for 3.0.24 code. Still needJeremy Allison1-8/+15
to do the upper layer directories but this is what everyone is waiting for.... Jeremy. (This used to be commit 9dafb7f48ca3e7af956b0a7d1720c2546fc4cfb8)
2007-10-10r16397: Fix Klocwork #11767 and drasticly simplify theJeremy Allison1-38/+36
logic in smbd/process.c. All interested (Volker, Jerry, James etc). PLEASE REVIEW THIS CHANGE. The logic should be identical but *much* easier to follow and change (and shouldn't confuse Klockwork :-). Jeremy. (This used to be commit d357f8b33594472ffa78d0a112accccc2a8b1fe7)
2007-10-10r15495: current_user_info is not referenced in process.cVolker Lendecke1-1/+0
(This used to be commit 8cedbbfbcf137b6a0c0323572982e9cb25648b0b)
2007-10-10r15088: Remove all time() and gettimeofday() calls out of the mainlineJeremy Allison1-4/+0
packet processing code. Only do these when needed (ie. in the idle timeout code). We drop an unneccessary global here too. Jeremy. (This used to be commit 8272a5ab0605fcf95527143c4f909aa1008e5b94)
2007-10-10r15084: Try and squeeze more out of the non-read/write code path.Jeremy Allison1-3/+12
Jeremy. (This used to be commit 23dcff4d50d1d35b7ddee0d0cb79c16a312f179c)
2007-10-10r15030: On a performace hunt... Remove as many extraneousJeremy Allison1-8/+4
memset's as possible. Jeremy. (This used to be commit 1217ed392b75aa8bfefa9c3f1ec5fa3bba841ee0)
2007-10-10r15022: Fix core dumps on normal server exit.Jeremy Allison1-4/+4
Jeremy. (This used to be commit 13c3abf03187f84874b5754b54de5d3fe2dea188)
2007-10-10r15018: Merge Volker's ipc/trans2/nttrans changes overJeremy Allison1-13/+18
into 3.0. Also merge the new POSIX lock code - this is not enabled unless -DDEVELOPER is defined. This doesn't yet map onto underlying system POSIX locks. Updates vfs to allow lock queries. Jeremy. (This used to be commit 08e52ead03304ff04229e1bfe544ff40e2564fc7)
2007-10-10r14898: This change is an attempt to improve the quality of the information thatJames Peach1-1/+1
is produced when a process exits abnormally. First, we coalesce the core dumping code so that we greatly improve our odds of being able to produce a core file, even in the case of a memory fault. I've removed duplicates of dump_core() and split it in two to reduce the amount of work needed to actually do the dump. Second, we refactor the exit_server code path to always log an explanation and a stack trace. My goal is to always produce enough log information for us to be able to explain any server exit, though there is a risk that this could produce too much log information on a flaky network. Finally, smbcontrol has gained a smbd fault injection operation to test the changes above. This is only enabled for developer builds. (This used to be commit 56bc02d64498eb3faf89f0c5452b9299daea8e95)
2007-10-10r14559: Oplocks have changed, process_smb can be static againVolker Lendecke1-3/+2
(This used to be commit 19e9bc03f81d8d000b683cf5c5f478ba25ddeb0d)
2007-10-10r14229: Something Coverity hasn't caught (yet) but I've gottenJeremy Allison1-3/+5
sensitive to null derefs. get_timed_events_timeout() can potentially return NULL. Cope with this. Jeremy. (This used to be commit 04838078723613628b298b7a87622df30432cf64)
2007-10-10r13571: Replace all calls to talloc_free() with thye TALLOC_FREE()Gerald Carter1-8/+8
macro which sets the freed pointer to NULL. (This used to be commit b65be8874a2efe5a4b167448960a4fcf6bd995e2)
2007-10-10r13498: Fix the kernel oplocks code for IRIX. Should fix #3515.Jeremy Allison1-6/+6
Jeremy. (This used to be commit 006cf9c3654e7f18e01b75a5fe87798df862d26a)
2007-10-10r13482: Push the FAM notification file descriptor into the selectJames Peach1-5/+20
set to avoid unnecessary polling. (This used to be commit 1dce945ccbba25092cf54890301c8f78f8aede33)
2007-10-10r13316: Let the carnage begin....Gerald Carter1-111/+4
Sync with trunk as off r13315 (This used to be commit 17e63ac4ed8325c0d44fe62b2442449f3298559f)
2007-10-10r10656: BIG merge from trunk. Features not copied overGerald Carter1-187/+270
* \PIPE\unixinfo * winbindd's {group,alias}membership new functions * winbindd's lookupsids() functionality * swat (trunk changes to be reverted as per discussion with Deryck) (This used to be commit 939c3cb5d78e3a2236209b296aa8aba8bdce32d3)
2007-10-10r10188: 64-bit warning fix.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 3b8a8e2947e4d956766e97bea8fa9c25210d1c19)
2007-10-10r9126: Fix valgrind bug Volker found in interaction with new aio bufferJeremy Allison1-0/+4
flipping and oplocks. Jeremy. (This used to be commit a18c5ff3eada93e46da3f7cbd326b8dceb72e147)
2007-10-10r8798: Save one system call per SMB. smb_run_idle_events right now is only ↵Volker Lendecke1-4/+0
used to close idle pdb_ldap connections, and from my point of view this can wait until normal timeout handling, this does not need to be done per client request. Volker (This used to be commit 404b817d7294fbea64f0fca019406c5c7458e386)
2007-10-10r8782: Fix bug #2918. The problem was using Inbuffer to push a deferred open ↵Jeremy Allison1-5/+7
message onto the queue when we're in a chained message set - we're actually processing a different buffer then. Added current_inbuf as a static inside smbd/process.c to ensure the correct message gets pushed and processed. Jeremy. (This used to be commit ccef7581717bff6145ffc386d5be24d6f42634cb)
2007-10-10r7963: Add aio support to 3.0.Jeremy Allison1-13/+98
Jeremy. (This used to be commit 1de27da47051af08790317f5b48b02719d6b9934)
2007-10-10r7961: randomize reloading so that smbds do not pverload cupsdSimo Sorce1-0/+10
by reloading printers all at the same time. sss (This used to be commit da227d5f4311c84a12a4e2a9fd510328268af4b3)
2007-10-10r7882: Looks like a large patch - but what it actually does is make SambaJeremy Allison1-5/+5
safe for using our headers and linking with C++ modules. Stops us from using C++ reserved keywords in our code. Jeremy (This used to be commit 9506b8e145982b1160a2f0aee5c9b7a54980940a)
2007-10-10r7550: Steal the correct error return for invalid TID on NTcreateX from Samba4Jeremy Allison1-2/+8
(thanks tridge !). Jeremy. (This used to be commit 0288823aacdbec6ba99e944c9f06f051e55c64b8)
2007-10-10r7344: Correctly return if malloc fails.Volker Lendecke1-0/+1
Jeremy, you might want to check this. Thanks, Volker (This used to be commit 560f9d37353f6b886996144215f99e06f2513007)
2007-10-10r6346: Add a counter for the number of SMB operations per connection/file.Jeremy Allison1-2/+6
You will need to do a make clean after SVN updating this. Next will come a smbcontrol message to dump this info. This should be interesting to profile client activity. Jeremy. (This used to be commit 743174da86ac724fc9ee3d4b7bd9a2a97a234bd8)
2007-10-10r6225: get rid of warnings from my compiler about nested externsHerb Lewis1-4/+5
(This used to be commit efea76ac71412f8622cd233912309e91b9ea52da)
2007-10-10r6172: Tidy up error processing significantly. Remove unix_ERR_XXX global ↵Jeremy Allison1-0/+3
nastyness. Jeremy. (This used to be commit d3379fe61bb934082b51a37adac232a96bafcf46)
2007-10-10r4539: patch from Rob -- adding real printcap name cache function to speed ↵Gerald Carter1-8/+7
up printcap reloads (This used to be commit 1cad5250932b963c2eb9b775221b13db386d601b)
2007-10-10r4190: When changing length calculations, get them right......Jeremy Allison1-1/+1
Jeremy. (This used to be commit 63cfa904ad186bb9d793584d319bd4a7107cc8b9)
2007-10-10r4186: Fix client & server to allow 127k READX calls.Jeremy Allison1-2/+1
Jeremy. (This used to be commit 831cb21a874601e4536c2cf76c5351e1d0defcb5)