diff options
author | Jeremy Allison <jra@samba.org> | 2003-09-05 21:30:50 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2003-09-05 21:30:50 +0000 |
commit | 966b0fc7c96b1dba63fa755312a2be64e18ff471 (patch) | |
tree | 93eed4b8880005b154cb5346e20bc5fdc2a2cd31 /source3/smbd | |
parent | 94f59f54921174fc156fade575ca114d331b1bd8 (diff) | |
download | samba-966b0fc7c96b1dba63fa755312a2be64e18ff471.tar.gz samba-966b0fc7c96b1dba63fa755312a2be64e18ff471.tar.bz2 samba-966b0fc7c96b1dba63fa755312a2be64e18ff471.zip |
More cachegrind tuning, plus fix an error message.
Jeremy.
(This used to be commit 8cb9ec5d533085d40fc6bfe4ca9647d80bf41ac7)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/statcache.c | 8 | ||||
-rw-r--r-- | source3/smbd/trans2.c | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/source3/smbd/statcache.c b/source3/smbd/statcache.c index 28915a30a0..948173687d 100644 --- a/source3/smbd/statcache.c +++ b/source3/smbd/statcache.c @@ -217,10 +217,10 @@ BOOL stat_cache_lookup(connection_struct *conn, pstring name, pstring dirpath, /* * Don't lookup trivial valid directory entries. */ - if((*name == '\0') || (strcmp(name, ".") == 0) || (strcmp(name, "..") == 0)) { - DO_PROFILE_INC(statcache_misses); + if((*name == '\0') || (name[0] == '.' && + ((name[1] == '\0') || + (name[1] == '.' && name[1] == '\0')))) return False; - } if (case_sensitive) { chk_name = strdup(name); @@ -248,6 +248,7 @@ BOOL stat_cache_lookup(connection_struct *conn, pstring name, pstring dirpath, while (1) { hash_elem = hash_lookup(&stat_cache, chk_name); if(hash_elem == NULL) { + DEBUG(10,("stat_cache_lookup: lookup failed for name [%s]\n", chk_name )); /* * Didn't find it - remove last component for next try. */ @@ -277,6 +278,7 @@ BOOL stat_cache_lookup(connection_struct *conn, pstring name, pstring dirpath, } } else { scp = (stat_cache_entry *)(hash_elem->value); + DEBUG(10,("stat_cache_lookup: lookup succeeded for name [%s] -> [%s]\n", chk_name, scp->translated_path )); DO_PROFILE_INC(statcache_hits); if(SMB_VFS_STAT(conn,scp->translated_path, pst) != 0) { /* Discard this entry - it doesn't exist in the filesystem. */ diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 7e46a6b6ab..033e76a33e 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -1781,7 +1781,7 @@ static int call_trans2setfsinfo(connection_struct *conn, int set_bad_path_error(int err, BOOL bad_path, char *outbuf, int def_class, uint32 def_code) { - DEBUG(10,("set_bad_path_error: err = %dm bad_path = %d\n", + DEBUG(10,("set_bad_path_error: err = %d bad_path = %d\n", err, (int)bad_path )); if(err == ENOENT) { |