diff options
author | Ira Cooper <samba@ira.wakeful.net> | 2010-04-18 15:02:23 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2010-04-18 15:12:41 +0200 |
commit | e1ca45179419f96b831cc929ff46df39a4766388 (patch) | |
tree | 574aa4dc142231ca240fbfb1389a683e5878edf7 /source3/modules/vfs_notify_fam.c | |
parent | 69ce29826cf209d79b4aa63e6d1f30ccf7bfd7ae (diff) | |
download | samba-e1ca45179419f96b831cc929ff46df39a4766388.tar.gz samba-e1ca45179419f96b831cc929ff46df39a4766388.tar.bz2 samba-e1ca45179419f96b831cc929ff46df39a4766388.zip |
s3: Improved support for GAMIN.
Support the FAMNoExists API for gamin to reduce cpu use and problems when
using GAMIN as FAM for vfs_notify_fam.
Diffstat (limited to 'source3/modules/vfs_notify_fam.c')
-rw-r--r-- | source3/modules/vfs_notify_fam.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source3/modules/vfs_notify_fam.c b/source3/modules/vfs_notify_fam.c index 8f00c9207f..652e785e02 100644 --- a/source3/modules/vfs_notify_fam.c +++ b/source3/modules/vfs_notify_fam.c @@ -79,12 +79,27 @@ static NTSTATUS fam_open_connection(FAMConnection *fam_conn, ZERO_STRUCTP(fam_conn); FAMCONNECTION_GETFD(fam_conn) = -1; + +#ifdef HAVE_FAMNOEXISTS + /* We should honor outside setting of the GAM_CLIENT_ID. */ + setenv("GAM_CLIENT_ID","SAMBA",0); +#endif + if (asprintf(&name, "smbd (%lu)", (unsigned long)sys_getpid()) == -1) { DEBUG(0, ("No memory\n")); return NT_STATUS_NO_MEMORY; } res = FAMOpen2(fam_conn, name); + +#ifdef HAVE_FAMNOEXISTS + /* + * This reduces the chatter between GAMIN and samba making the pair + * much more reliable. + */ + FAMNoExists(fam_conn); +#endif + SAFE_FREE(name); if (res < 0) { |