summaryrefslogtreecommitdiff
path: root/source3/smbd/notify.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-05-12 23:10:01 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:16:59 -0500
commit2602e5fab165d426e3a87e0cdcf8f7c67596e501 (patch)
treec439136a6659e59f4b96688b48e802ac29915ccf /source3/smbd/notify.c
parentc8baac2fd6fc9c83d44b93ff03d543353de9593c (diff)
downloadsamba-2602e5fab165d426e3a87e0cdcf8f7c67596e501.tar.gz
samba-2602e5fab165d426e3a87e0cdcf8f7c67596e501.tar.bz2
samba-2602e5fab165d426e3a87e0cdcf8f7c67596e501.zip
r15555: Make "change notify timeout" a per-share parameter - used
when there's no kernel or FAM change notify. If set to zero this will turn off change notify for the share except when we ourselves change something (renames / deletes etc. ). Designed to help on large directory shares where a new changenotify is issued between each delete. This will be fixed correctly when we move to internal change notify (eg. back-port Samba4 changenotify). Jeremy. (This used to be commit 5a17bffbcd5082fde79c241468a0ff2b5903d540)
Diffstat (limited to 'source3/smbd/notify.c')
-rw-r--r--source3/smbd/notify.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/source3/smbd/notify.c b/source3/smbd/notify.c
index b2d0fc3326..829ca3a736 100644
--- a/source3/smbd/notify.c
+++ b/source3/smbd/notify.c
@@ -135,7 +135,19 @@ void remove_pending_change_notify_requests_by_filename(files_struct *fsp, NTSTAT
}
/****************************************************************************
- Return true if there are pending change notifies.
+ Set the current change notify timeout to the lowest value across all service
+ values.
+****************************************************************************/
+
+void set_change_notify_timeout(int val)
+{
+ if (val > 0) {
+ cnotify->select_time = MIN(cnotify->select_time, val);
+ }
+}
+
+/****************************************************************************
+ Longest time to sleep for before doing a change notify scan.
****************************************************************************/
int change_notify_timeout(void)