summaryrefslogtreecommitdiff
path: root/source3/smbd/process.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-01-21 11:49:00 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:17:21 -0500
commitd5206610cd67f88e2cc7d5b2b434e320e81c29d5 (patch)
tree5b085416bd4403cea107f73a1e874199fd1284b1 /source3/smbd/process.c
parent57881f749495825f61f8affce921eee46fc7b728 (diff)
downloadsamba-d5206610cd67f88e2cc7d5b2b434e320e81c29d5.tar.gz
samba-d5206610cd67f88e2cc7d5b2b434e320e81c29d5.tar.bz2
samba-d5206610cd67f88e2cc7d5b2b434e320e81c29d5.zip
r20931: This changes the notify infrastructure from a polling-based to an 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)
Diffstat (limited to 'source3/smbd/process.c')
-rw-r--r--source3/smbd/process.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 2a52da12b3..cfecd7fecb 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -304,9 +304,6 @@ static void async_processing(fd_set *pfds)
exit_server_cleanly("termination signal");
}
- /* check for async change notify events */
- process_pending_change_notify_queue(0);
-
/* check for sighup processing */
if (reload_after_sighup) {
change_to_root_user();
@@ -468,7 +465,6 @@ static BOOL receive_message_or_smb(char *buffer, int buffer_len, int timeout)
START_PROFILE(smbd_idle);
maxfd = select_on_fd(smbd_server_fd(), maxfd, &r_fds);
- maxfd = select_on_fd(change_notify_fd(), maxfd, &r_fds);
maxfd = select_on_fd(oplock_notify_fd(), maxfd, &r_fds);
selrtn = sys_select(maxfd+1,&r_fds,&w_fds,NULL,&to);
@@ -525,20 +521,6 @@ static BOOL receive_message_or_smb(char *buffer, int buffer_len, int timeout)
goto again;
}
- if ((change_notify_fd() >= 0) && FD_ISSET(change_notify_fd(),
- &r_fds)) {
-
- process_pending_change_notify_queue((time_t)0);
-
- /*
- * Same comment as for oplock processing applies here. We
- * might have done I/O on the client socket.
- */
-
- goto again;
- }
-
-
return receive_smb(smbd_server_fd(), buffer, 0);
}
@@ -1251,16 +1233,9 @@ int chain_reply(char *inbuf,char *outbuf,int size,int bufsize)
static int setup_select_timeout(void)
{
int select_timeout;
- int t;
select_timeout = blocking_locks_timeout_ms(SMBD_SELECT_TIMEOUT*1000);
- t = change_notify_timeout();
- DEBUG(10, ("change_notify_timeout: %d\n", t));
- if (t != -1) {
- select_timeout = MIN(select_timeout, t*1000);
- }
-
if (print_notify_messages_pending()) {
select_timeout = MIN(select_timeout, 1000);
}
@@ -1459,12 +1434,6 @@ machine %s in domain %s.\n", global_myname(), lp_workgroup()));
update_monitored_printq_cache();
/*
- * Check to see if we have any change notifies
- * outstanding on the queue.
- */
- process_pending_change_notify_queue(t);
-
- /*
* Now we are root, check if the log files need pruning.
* Force a log file check.
*/