1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/source3/include
Steven Danneman 455fccf86b s3:events: Call all ready fd event handlers on each iteration of the main loop
Previously, only one fd handler was being called per main message loop
in all smbd child processes.

In the case where multiple fds are available for reading the fd
corresponding to the event closest to the beginning of the event list
would be run.  Obviously this is arbitrary and could cause unfairness.

Usually, the first event fd is the network socket, meaning heavy load
of client requests can starve out other fd events such as oplock
or notify upcalls from the kernel.

In this patch, I have changed the behavior of run_events() to unset
any fd that it has already called a handler function, as well
as decrement the number of fds that were returned from select().
This allows the caller of run_events() to iterate it, until all
available fds have been handled.

I then changed the main loop in smbd child processes to iterate
run_events().  This way, all available fds are handled on each wake
of select, while still checking for timed or signalled events between
each handler function call.  I also added an explicit check for
EINTR from select(), which previously was masked by the fact that
run_events() would handle any signal event before the return code
was checked.

This required a signature change to run_events() but all other callers
should have no change in their behavior.  I also fixed a bug in
run_events() where it could be called with a selrtn value of -1,
doing unecessary looping through the fd_event list when no fds were
available.

Also, remove the temporary echo handler hack, as all fds should be
treated fairly now.
2010-10-01 13:31:33 -07:00
..
ads.h s3/libads: use monotonic clock for ldap connection timeouts 2010-09-07 20:37:53 +02:00
adt_tree.h s3: Remove unused comparison fn from "struct sorted_tree" 2010-02-13 13:26:11 +01:00
async_smb.h s3: Add a talloc_move for the inbuf to cli_smb_recv 2010-02-22 23:23:18 +01:00
auth.h s3-auth Fix typo in comment 2010-09-11 22:32:43 +10:00
client.h s3:rpc_server: make it possible to use rpcint_binding_handle() directly 2010-09-04 09:01:10 +02:00
clitar.h
ctdbd_conn.h s3: Make ctdbd_init_connection static 2010-08-31 17:07:41 +02:00
dbwrap.h s3-build: use dbwrap.h only where needed. 2010-08-26 00:25:55 +02:00
debug.h s3: Fix some nonempty blank lines 2010-03-14 17:42:49 +01:00
debugparse.h
dynconfig.h s3: Fix some nonempty blank lines 2010-03-14 17:42:49 +01:00
event.h s3:events: Call all ready fd event handlers on each iteration of the main loop 2010-10-01 13:31:33 -07:00
fake_file.h
g_lock.h s3: Remove the dependency of g_lock on procid_self 2010-08-28 12:28:53 +02:00
idmap.h s3-idmap: only include idmap headers where needed. 2010-08-26 00:20:29 +02:00
includes.h s3-nmbd: move SYNC_DNS to nmbd.h 2010-09-20 14:10:34 -07:00
interfaces.h Fix bug 5681: Do not limit the number of network interfaces 2009-05-18 13:38:55 +02:00
intl.h
krb5_env.h s3-libads: move KRB5_ENV_CCNAME to separate header krb5_env.h. 2010-07-01 21:17:17 +02:00
krb5_protos.h s3-ads: Fix wrong test in if statement 2010-08-19 11:28:12 -04:00
libsmb_internal.h s3: remove POLICY_HND. 2009-03-18 23:22:29 +01:00
libsmbclient.h [Bug 7345] Incomplete description of function return values in libsmbclient.h 2010-04-11 11:37:00 -04:00
local.h Allows changing the maximum number of simultaneous clients in winbindd through an smb.conf option. 2010-09-14 16:43:39 -07:00
localedir.h
locking.h This patch looks bigger than it is. It does 2 things. 1). Renames smbpid -> smblctx in our locking code. 2). Widens smblctx to 64-bits internally. Preparing to use the SMB2 handle as the locking context. 2010-05-07 06:20:50 -07:00
MacExtensions.h
mangle.h
mapping.h s3:dom_sid Global replace of DOM_SID with struct dom_sid 2010-05-21 10:39:59 +02:00
memcache.h
messages.h s3: Remove talloc_autofree_context() from messaging_tdb_parent_init() 2010-09-26 03:29:28 +02:00
module.h s3: Remove some unused #defines 2010-03-14 17:42:49 +01:00
msdfs.h s3: Remove a struct typedef 2009-11-21 23:19:50 +01:00
nameserv.h s3:nmbd: also listen explicit on the subnet broadcast addresses 2010-02-08 18:35:10 +01:00
nss_info.h s3:dom_sid Global replace of DOM_SID with struct dom_sid 2010-05-21 10:39:59 +02:00
nt_printing.h s3-spoolss: Fix servername/printername handling which turns out to be very important to get right. 2010-09-30 02:59:35 +02:00
ntdomain.h s3-dcerpc: remove auth_data_free_func 2010-09-23 10:54:24 -07:00
ntioctl.h
ntlmssp_wrap.h s3-auth: Add auth_ntlmssp wrapper for client side 2010-07-20 15:52:34 +10:00
ntquotas.h s3:dom_sid Global replace of DOM_SID with struct dom_sid 2010-05-21 10:39:59 +02:00
oplock_onefs.h
packet.h s3: Add parameter "ctdb timeout" 2009-11-05 12:05:36 +01:00
passdb.h s3-secrets: only include secrets.h when needed. 2010-08-05 10:12:25 +02:00
popt_common.h s3-popt: Only include popt-common.h when needed. 2010-08-05 12:08:31 +02:00
printing.h s3-printing: Make auth_serversupplied_info const. 2010-09-09 16:00:08 +02:00
proto.h samba: share readline wrappers among all buildsystems. 2010-10-01 22:30:22 +02:00
pthreadpool.h Add thread pool 2009-05-01 12:30:58 +02:00
registry.h s3:registry: move prototype from reg_init_smbconf.c to its own header. 2010-09-21 08:52:06 +02:00
rpc_dce.h s3-dcerpc: rename SCHANNEL_SIG_SIZE to NL_AUTH_SIGNATURE_SIZE and move to IDL. 2010-07-16 23:09:54 +02:00
rpc_misc.h s3-build: only include rpc_misc.h where needed. 2010-08-26 00:26:01 +02:00
safe_string.h s3: Explicitly pass flags2 to clistr_pull_talloc 2010-08-05 14:53:54 +02:00
samba_linux_quota.h
secrets.h s3-secrets: only include secrets.h when needed. 2010-08-05 10:12:25 +02:00
serverid.h s3: Remove talloc_autofree_context() from serverid_parent_init() 2010-09-26 03:29:28 +02:00
session.h
smb_acls.h
smb_krb5.h s3-krb5 Only build ADS support if arcfour-hmac-md5 is available 2010-08-13 09:08:27 -04:00
smb_macros.h s3: remove TvalDiff macro, we can use the shared usec_time_diff function 2010-09-16 21:38:20 +02:00
smb_perfcount.h s3: added per-client statistics to onefs perfcount module 2009-03-27 17:33:26 -07:00
smb_share_modes.h s3: Add extid to the dev/inode pair 2009-02-19 20:58:26 -08:00
smb_signing.h s3:libsmb: add a smb_signing_init_ex() function 2010-03-22 17:15:10 +01:00
smb.h s3:auth Remove NT_USER_TOKEN 2010-09-11 18:46:06 +10:00
smbldap.h s3-build: only include smbldap.h where needed. 2010-09-20 13:54:56 -07:00
smbprofile.h s3/profile: remove the magical clock initialization from the profile code 2010-09-14 22:45:07 +02:00
srvstr.h
stamp-h.in
sysquotas.h
talloc_dict.h s3: Add talloc_dict.[ch] 2009-08-16 12:38:19 +02:00
tldap_util.h Add tldap_pull_guid 2009-07-04 12:54:22 +02:00
tldap.h If the connection is down, don't try another write. 2009-06-28 15:51:02 +02:00
trans2.h s3:dom_sid Global replace of DOM_SID with struct dom_sid 2010-05-21 10:39:59 +02:00
transfer_file.h
util_tdb.h s3: Make tdb_wrap_open more robust 2010-03-13 20:20:37 +01:00
vfs_macros.h Fix for bug #7189 - Open txt files with notepad on samba shares creates problem. 2010-03-05 15:13:37 -08:00
vfs.h Fix for bug #7189 - Open txt files with notepad on samba shares creates problem. 2010-03-05 15:13:37 -08:00