summaryrefslogtreecommitdiff
path: root/source3/smbd/globals.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2012-09-13 10:13:21 -0700
committerJeremy Allison <jra@samba.org>2012-09-13 21:31:42 +0200
commit56b752512597acaffa94a979ef9140760e0f5cf3 (patch)
tree8a54245369ad6042366f4d24bffadd298efbecc4 /source3/smbd/globals.c
parent23158d72c8de9318e1f136331ef4d788df243af7 (diff)
downloadsamba-56b752512597acaffa94a979ef9140760e0f5cf3.tar.gz
samba-56b752512597acaffa94a979ef9140760e0f5cf3.tar.bz2
samba-56b752512597acaffa94a979ef9140760e0f5cf3.zip
Sigh :-(. Removing optimization prematurely is the root of all evil :-(.
Sorry for the mistake, but the LastDir singleton cache in vfs_ChDir() actually plays an important role. When we're processing a stream of SMB1/SMB2/SMB3 requests we don't want to add a chdir()/getcwd() system call pair on every request if they're all on the same connection and dealing with the same base path. I did some testing with a program that times 1,000,000 chdir() requests vs. 1,000,000 strcmp requests and it's a penalty of 10x doing the system calls. Just because it's old code, doesn't mean it's bad :-(. Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Sep 13 21:31:42 CEST 2012 on sn-devel-104
Diffstat (limited to 'source3/smbd/globals.c')
-rw-r--r--source3/smbd/globals.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source3/smbd/globals.c b/source3/smbd/globals.c
index 874f35d1f6..80f6a66427 100644
--- a/source3/smbd/globals.c
+++ b/source3/smbd/globals.c
@@ -85,6 +85,7 @@ int conn_ctx_stack_ndx = 0;
struct vfs_init_function_entry *backends = NULL;
char *sparse_buf = NULL;
+char *LastDir = NULL;
struct smbd_parent_context *am_parent = NULL;
struct memcache *smbd_memcache_ctx = NULL;