summaryrefslogtreecommitdiffstats
path: root/source/smbd/statcache.c
Commit message (Collapse)AuthorAgeFilesLines
* Add a in-memory cacheVolker Lendecke2007-12-181-41/+23
| | | | | | | | | | | This is a more general API that caches data with a LRU scheme. See include/cache.h. No comments yet, I'm still working on it. But Jeremy has given me a hint in one of his checkins that he would like to make use of this now. The idea is that we get rid of all our silly little caches and merge them all into one cache that we can then very easily trim, for example even with a smbcontrol message if someone decides memory is tight. The main user is the stat cache, this patch also converts the getwd cache. More caches to come.
* RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison2007-10-181-4/+4
| | | | | | | bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy.
* r25009: Large patch discussed with Volker. Move unix_convert to a talloc-basedJeremy Allison2007-10-101-57/+71
| | | | | | interface. More development will come on top of this. Remove the "mangled map" parameter. Jeremy.
* r24813: Reformat to 80 columns.Jeremy Allison2007-10-101-19/+32
| | | | Jeremy.
* r23844: Add patch series from Volker (after review and consultation).Jeremy Allison2007-10-101-33/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | 0001-Save-a-strdup-in-stat_cache_add.patch 0002-Use-ISDOT-and-ISDOTDOT.patch 0003-Move-fname_equal-around.patch 0004-unix_convert-pstring-dirpath-char.patch 0005-Ignore-.o-files.patch 0006-Get-rid-of-pstrings-inside-unix_convert.patch 0007-revert-pstring-unix_convert.patch 0008-Make-name-an-allocated-pstring-inside-unix_convert.patch 0009-Pass-explicit-pstring-to-mangle_check_cache.patch 0010-Don-t-overwrite-orig_path-unnecessarily.patch 0011-Defer-allocating-name.patch 0012-Make-sure-dirpath-is-always-correctly-allocated.patch 0013-Remove-one-pstring-dependency-in-unix_convert.patch 0014-Remove-more-name-pstring-dependencies.patch 0015-Hide-the-nasty-API-of-mangle_check_cache-in-mangle_c.patch 0016-name-does-not-need-to-be-pstring-size-anymore.patch 0017-Make-use-of-ISDOT-and-ISDOTDOT.patch 0018-Remove-pstring-from-stat_cache_lookup.patch 0019-Add-my-copyright.patch To remove pstrings from statcache and unix_convert. Jeremy.
* r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell2007-10-101-2/+1
|
* r23779: Change from v2 or later to v3 or later.Jeremy Allison2007-10-101-1/+1
| | | | Jeremy.
* r23743: Simplify stat_cache_lookup() logic. For the history of this, seeVolker Lendecke2007-10-101-68/+76
| | | | http://article.gmane.org/gmane.network.samba.internals/32486.
* r23055: Rewrite messages.c to use auto-generated marshalling in the tdb. I'mVolker Lendecke2007-10-101-1/+0
| | | | | | | | | | | doing this because for the clustering the marshalling is needed in more than one place, so I wanted a decent routine to marshall a message_rec struct which was not there before. Tridge, this seems about the same speed as it used to be before, the librpc/ndr overhead in my tests was under the noise. Volker
* r22911: Pass a messaging_context to message_send_allVolker Lendecke2007-10-101-1/+2
|
* r22761: This introduces lib/conn_tdb.c with two main functions: ↵Volker Lendecke2007-10-101-2/+1
| | | | | | | | | connections_traverse and connections_forall. This centralizes all the routines that did individual tdb_open("connections.tdb") and direct tdb_traverse. Volker
* r22009: change TDB_DATA from char * to unsigned char *Stefan Metzmacher2007-10-101-3/+3
| | | | | | and fix all compiler warnings in the users metze
* r20916: Add in the delete on close final fix - but only enabledJeremy Allison2007-10-101-0/+34
| | | | | with -DDEVELOPER. Jeremy.
* r16945: Sync trunk -> 3.0 for 3.0.24 code. Still needJeremy Allison2007-10-101-4/+4
| | | | | | | to do the upper layer directories but this is what everyone is waiting for.... Jeremy.
* r15103: Okay, looking closer: Samba4 tdb not exporting u32 is a bug in samba4'sVolker Lendecke2007-10-101-3/+3
| | | | | | | | | tdb. tdb_open_ex needs it. Can someone from samba4 tell me how this should be handled? Thanks, Volker
* r15102: u32 is a tdb-only thing that's not exported by samba4 tdb. Replace ↵Volker Lendecke2007-10-101-3/+3
| | | | | | by uint32. Volker
* r10186: More 64-bit warning fixes.Jeremy Allison2007-10-101-2/+2
| | | | Jeremy.
* r7846: Fix from bugzilla@kevinjamieson.com Kevin Jamieson - typoJeremy Allison2007-10-101-1/+1
| | | | | in checking for .. in statcache. Bugid #2819. Jeremy.
* r6249: Get the comparison the right way around...Jeremy Allison2007-10-101-1/+1
| | | | Jeremy.
* r6240: Fix for bug #2581. Add size limit (in kb) to stat cache.Jeremy Allison2007-10-101-0/+5
| | | | Jeremy.
* r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison2007-10-101-3/+3
| | | | | | | | | allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy.
* r2116: Ensure statcache has large enough tdb memory hash size (1031).Jeremy Allison2007-10-101-1/+1
| | | | Jeremy.
* r2112: Simplify the mangle hash code to use an in-memory tdb.Jeremy Allison2007-10-101-2/+2
| | | | | Should be ready for the new directory code now... Jeremy.
* r2032: If you're selecting a hash algorithm for tdb, you need to do it at ↵Jeremy Allison2007-10-101-22/+14
| | | | | | | open time, it doesn't make sense anywhere else. Jeremy.
* r2026: Simplify statcache to use an in-memory tdb. Modify tdb to useJeremy Allison2007-10-101-75/+65
| | | | | | a customer hash function for this tdb (yes it does make a difference on benchmarks). Remove the no longer used hash.c code. Jeremy.
* r570: Remove lots of globals to handle case issues - move themJeremy Allison2007-10-101-4/+2
| | | | | | | | to connection struct entries (as they should have been from the start). Jerry, once you've cut over to 3.0.4 release branch I'll add this to 3.0 also. - Jerry cut over :-). Jeremy.
* Fix more 64-bit printf warnings.Tim Potter2003-11-031-2/+2
|
* Fixed typo in debug.Tim Potter2003-09-151-1/+1
|
* More cachegrind tuning, plus fix an error message.Jeremy Allison2003-09-051-3/+5
| | | | Jeremy.
* More tuning from cachegrind. Change most trim_string() calls to trim_char(0,Jeremy Allison2003-09-051-3/+4
| | | | | as that's what they do. Fix string_replace() to fast-path ascii. Jeremy.
* Allow the stat cache to better handle invalid multibyte strings, by usingAndrew Bartlett2003-07-271-8/+25
| | | | | | | | | | strdup_upper(). This function may fail - and we can just drop out of using the cache in that case. (Rather than panicing). This also should get us closer to supporting all of the weird 'longer/shorter' on uppercase/lowercase. Andrew Bartlett
* Fix from MORIYAMA Masayuki <msyk@mtg.biglobe.ne.jp> for new MB statcacheJeremy Allison2003-07-071-7/+9
| | | | | code. Bug #185. Jeremy.
* Removed strupper/strlower macros that automatically map to ↵Jeremy Allison2003-07-031-2/+2
| | | | | | | strupper_m/strlower_m. I really want people to think about when they're using multibyte strings. Jeremy.
* Added fix for Japanese case names in statcache - these can changeJeremy Allison2003-07-021-2/+33
| | | | | size on upper casing. Based on patch from monyo@home.monyo.com. Jeremy.
* Whitespace reformat before applying a patch.Jeremy Allison2003-07-021-184/+187
| | | | Jeremy.
* Prefix VFS API macros with SMB_ for consistency and to avoid problems with ↵Alexander Bokovoy2003-05-141-1/+1
| | | | VFS_ macros at system side. We currently have one clash with AIX and its VFS_LOCK. Compiled and tested -- no new functionality or code, just plain rename of macros for yet-unreleased VFS API version. Needs to be done before a24 is out
* Fix VFS layer:Alexander Bokovoy2003-05-111-1/+1
| | | | | | | | | 1. Finally work with cascaded modules with private data storage per module 2. Convert VFS API to macro calls to simplify cascading 3. Add quota support to VFS layer (prepare to NT quota support) Patch by Stefan (metze) Metzemacher, with review of Jelmer and me Tested in past few weeks. Documentation to new VFS API for third-party developers to follow
* Merge the 'safe' parts of my StrnCpy patch - many of the users really wantedAndrew Bartlett2003-04-231-12/+0
| | | | | | | | | | | | a pstrcpy/fstrcpy or at most a safe_strcpy(). These have the advantage of being compiler-verifiable. Get these out of the way, along with a rewrite of 'get_short_archi' in the spoolss client and server. (This pushes around const string pointers, rather than copied strings). Andrew Bartlett
* Merge new statcache.c from HEAD.Andrew Bartlett2003-03-171-61/+126
|
* Cleanups: (merge from HEAD)Andrew Bartlett2003-02-101-2/+2
| | | | | | | | | | - use safe_strcpy() instead of pstrcpy() for malloc()ed strings - CUPS: a failure in an attempt to automaticly add a printer is not level 0 stuff. - Fix up a possible Realloc() failure segfault Andrew Bartlett
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header.
* fixed a typoAndrew Tridgell2001-09-251-1/+1
|
* strchr and strrchr are macros when compiling with optimisation in gcc, so we ↵Andrew Tridgell2001-07-041-1/+1
| | | | can't redefine them. damn.
* statcache initialisation fixAndrew Tridgell2001-05-121-5/+5
| | | | pointed out by Elrond
* Removed unnessesary init.Jeremy Allison2000-11-271-1/+1
| | | | Jeremy.
* Fix for updating of print queues changed from a local box. Essentially,Jeremy Allison2000-11-211-1/+1
| | | | | | this makes sure that the change messages sent to ourselves are handled synchronously w.r.t. other smb packets incoming. Jeremy.
* Ok - this is a big patch - and it may break smbd a bit (althoughJeremy Allison2000-10-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | I hope not). If you encounter strange file-serving behavior after this patch then back it out. I analysed our stat() usage and realised we were doing approx. 3 stat calls per open, and 2 per getattr/setattr. This patch should fix all that. It causes the stat struct returned from unix_convert() (which now *must* be passed a valid SMB_STRUCT_STAT pointer) to be passed through into the open code. This should prevent the multiple stats that were being done so as not to violate layer encapsulation in the API's. Herb - if you could run a NetBench test with this code and do a padc/par syscall test and also run with the current 2.2.0 code and test the padc/par syscalls I'd appreciate it - you should find the number of stat calls reduced - not sure by how much. The patch depends on unix_convert() actually finding the file and returning a stat struct, or returning a zero'd out stat struct if the file didn't exist. I believe we can guarentee this to be the case - I just wasn't confident enough to make this an assertion before. Ok ok - I did write this whilst at the Miami conference..... sometimes you get a little free time at these things :-). Jeremy.
* Herb's warning fixes. Also the POSIX locking fix.Jeremy Allison2000-10-061-27/+6
| | | | | We now use our own vfs layer to do get/set acl calls (hurrah!). Jeremy.
* Restructuring of vfs layer to include a "this" pointer - can be an fsp orJeremy Allison2000-10-061-1/+1
| | | | | | | | | | | | | | | a conn struct depending on the call. We need this to have a clean NT ACL call interface. This will break any existing VFS libraries (that's why this is pre-release code). Andrew gets credit for this one :-) :-). In addition - added Herb's WITH_PROFILE changes - Herb - please examine the changes I've made to the smbd/reply.c code you added. The original code was very ugly and I have replaced it with a START_PROFILE(x)/END_PROFILE(x) pair using the preprocessor. Please check this compiles ok with the --with-profile switch. Jeremy.
* Made re-init of stat cache explicit rather than being hidden.Jeremy Allison2000-10-041-1/+2
| | | | Jeremy.