summaryrefslogtreecommitdiff
path: root/source3/smbd/statcache.c
AgeCommit message (Collapse)AuthorFilesLines
2010-08-26s3-build: only include memcache.h where needed.Günther Deschner1-0/+1
Guenther
2010-08-07s3: Remove smbd_messaging_context() from send_stat_cache_delete_message()Volker Lendecke1-2/+3
2010-05-06s3: only include gen_ndr headers where needed.Günther Deschner1-0/+1
This shrinks include/includes.h.gch by the size of 7 MB and reduces build time as follows: ccache build w/o patch real 4m21.529s ccache build with patch real 3m6.402s pch build w/o patch real 4m26.318s pch build with patch real 3m6.932s Guenther
2009-11-18s3: Replace some create_synthetic_smb_fname() callsVolker Lendecke1-13/+5
In very hot codepaths like the statcache copy_smb_filename and the subsequent recursive talloc_free is noticable in the CPU load.
2009-07-22s3: Change unix_convert to use an smb_filename struct internallyTim Prouty1-1/+14
This allows SMB_VFS_[L]STAT to be called directly. Additionally, I changed NTSTATUS result to be named status for consistency. I also removed the stat_cache_add() from build_stream_path() because stat_cache_lookup() is never actually called on a file with a stream. There is no reason why the stat cache couldn't be consulted for streams in the future. Jeremy/Volker, please take a look at this one when you get a chance.
2009-06-24s3: Plumb smb_filename through SMB_VFS_STAT and SMB_VFS_LSTATTim Prouty1-1/+1
This patch introduces two new temporary helper functions vfs_stat_smb_fname and vfs_lstat_smb_fname. They basically allowed me to call the new smb_filename version of stat, while avoiding plumbing it through callers that are still too inconvenient. As the conversion moves along, I will be able to remove callers of this, with the goal being to remove all callers. There was also a bug in create_synthetic_smb_fname_split (also a temporary utility function) that caused it to incorrectly handle filenames with ':'s in them when in posix mode. This is now fixed.
2009-04-14Convert Samba3 to use the common lib/util/charset APIAndrew Bartlett1-1/+1
This removes calls to push_*_allocate() and pull_*_allocate(), as well as convert_string_allocate, as they are not in the common API To allow transition to a common charcnv in future, provide Samba4-like strupper functions in source3/lib/charcnv.c (the actual implementation remains distinct, but the API is now shared) Andrew Bartlett
2007-12-18Add a in-memory cacheVolker Lendecke1-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. (This used to be commit 7a911b35713538d82001a3c9f34152e293fe1943)
2007-10-18RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison1-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. (This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f)
2007-10-10r25009: Large patch discussed with Volker. Move unix_convert to a talloc-basedJeremy Allison1-57/+71
interface. More development will come on top of this. Remove the "mangled map" parameter. Jeremy. (This used to be commit dee8beba7a92b8a3f68bbcc59fd0a827f68c7736)
2007-10-10r24813: Reformat to 80 columns.Jeremy Allison1-19/+32
Jeremy. (This used to be commit c6c8f5a897602d53876fe75e86283d97a394037d)
2007-10-10r23844: Add patch series from Volker (after review and consultation).Jeremy Allison1-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. (This used to be commit ea6ef368891af24164d2e76700c405a82b3dfc19)
2007-10-10r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell1-2/+1
(This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
2007-10-10r23779: Change from v2 or later to v3 or later.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
2007-10-10r23743: Simplify stat_cache_lookup() logic. For the history of this, seeVolker Lendecke1-68/+76
http://article.gmane.org/gmane.network.samba.internals/32486. (This used to be commit e5e42fe3d5b26c0ec48d98c001b9cb1623c0b5a7)
2007-10-10r23055: Rewrite messages.c to use auto-generated marshalling in the tdb. I'mVolker Lendecke1-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 (This used to be commit eaefd00563173dfabb7716c5695ac0a2f7139bb6)
2007-10-10r22911: Pass a messaging_context to message_send_allVolker Lendecke1-1/+2
(This used to be commit cc92ce665dcfe9054d09429219883b18a4cab090)
2007-10-10r22761: This introduces lib/conn_tdb.c with two main functions: ↵Volker Lendecke1-2/+1
connections_traverse and connections_forall. This centralizes all the routines that did individual tdb_open("connections.tdb") and direct tdb_traverse. Volker (This used to be commit e43e94cda1ad8876b3cb5d1129080b57fa6ec214)
2007-10-10r22009: change TDB_DATA from char * to unsigned char *Stefan Metzmacher1-3/+3
and fix all compiler warnings in the users metze (This used to be commit 3a28443079c141a6ce8182c65b56ca210e34f37f)
2007-10-10r20916: Add in the delete on close final fix - but only enabledJeremy Allison1-0/+34
with -DDEVELOPER. Jeremy. (This used to be commit 7f817067a70930ee3502ea3373173e0c23733253)
2007-10-10r16945: Sync trunk -> 3.0 for 3.0.24 code. Still needJeremy Allison1-4/+4
to do the upper layer directories but this is what everyone is waiting for.... Jeremy. (This used to be commit 9dafb7f48ca3e7af956b0a7d1720c2546fc4cfb8)
2007-10-10r15103: Okay, looking closer: Samba4 tdb not exporting u32 is a bug in samba4'sVolker Lendecke1-3/+3
tdb. tdb_open_ex needs it. Can someone from samba4 tell me how this should be handled? Thanks, Volker (This used to be commit 0a2f1ed5e9012e07ef158666b68994d0961768b6)
2007-10-10r15102: u32 is a tdb-only thing that's not exported by samba4 tdb. Replace ↵Volker Lendecke1-3/+3
by uint32. Volker (This used to be commit 0a1665a1b78d063840e42e85229ace5a751e3985)
2007-10-10r10186: More 64-bit warning fixes.Jeremy Allison1-2/+2
Jeremy. (This used to be commit 88034b9c2845a38833f300b812202c2a4ca3d2fd)
2007-10-10r7846: Fix from bugzilla@kevinjamieson.com Kevin Jamieson - typoJeremy Allison1-1/+1
in checking for .. in statcache. Bugid #2819. Jeremy. (This used to be commit a5619d717954ad2a3ffaa549b11bfa738720e325)
2007-10-10r6249: Get the comparison the right way around...Jeremy Allison1-1/+1
Jeremy. (This used to be commit 1d542eee571b80259568d49bd5dc2eb14fd80d01)
2007-10-10r6240: Fix for bug #2581. Add size limit (in kb) to stat cache.Jeremy Allison1-0/+5
Jeremy. (This used to be commit 836b73d0018c3137b7a924b6345e69ae5d23431d)
2007-10-10r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison1-3/+3
allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy. (This used to be commit 620f2e608f70ba92f032720c031283d295c5c06a)
2007-10-10r2116: Ensure statcache has large enough tdb memory hash size (1031).Jeremy Allison1-1/+1
Jeremy. (This used to be commit dad4d65787df7bd28351cb8f8724d3ae5387ca12)
2007-10-10r2112: Simplify the mangle hash code to use an in-memory tdb.Jeremy Allison1-2/+2
Should be ready for the new directory code now... Jeremy. (This used to be commit c2eff8ef1b65570d2e590f62f026cc18f9142652)
2007-10-10r2032: If you're selecting a hash algorithm for tdb, you need to do it at ↵Jeremy Allison1-22/+14
open time, it doesn't make sense anywhere else. Jeremy. (This used to be commit d7ea1ea8fb3420ca1ad8d95acdc43313898200ff)
2007-10-10r2026: Simplify statcache to use an in-memory tdb. Modify tdb to useJeremy Allison1-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. (This used to be commit 3fbadac85b8cad89b93d295968e99c38c8677575)
2007-10-10r570: Remove lots of globals to handle case issues - move themJeremy Allison1-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. (This used to be commit 578a508509d21226ad3332fc54c3ab54cd8ae452)
2003-11-03Fix more 64-bit printf warnings.Tim Potter1-2/+2
(This used to be commit 23443e3aa079710221557e18158d0ddb8ff48a36)
2003-09-15Fixed typo in debug.Tim Potter1-1/+1
(This used to be commit e2b5dd7d9b351984c40876f3c86f2a006e0eec42)
2003-09-05More cachegrind tuning, plus fix an error message.Jeremy Allison1-3/+5
Jeremy. (This used to be commit 8cb9ec5d533085d40fc6bfe4ca9647d80bf41ac7)
2003-09-05More tuning from cachegrind. Change most trim_string() calls to trim_char(0,Jeremy Allison1-3/+4
as that's what they do. Fix string_replace() to fast-path ascii. Jeremy. (This used to be commit f35e9a8b909d3c74be47083ccc4a4e91a14938db)
2003-07-27Allow the stat cache to better handle invalid multibyte strings, by usingAndrew Bartlett1-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 (This used to be commit d4c9261725578231079ed83e8e6584f12bd1cc43)
2003-07-07Fix from MORIYAMA Masayuki <msyk@mtg.biglobe.ne.jp> for new MB statcacheJeremy Allison1-7/+9
code. Bug #185. Jeremy. (This used to be commit 7a1ac7be42dfb90fd44f2c51810eedcea052386b)
2003-07-03Removed strupper/strlower macros that automatically map to ↵Jeremy Allison1-2/+2
strupper_m/strlower_m. I really want people to think about when they're using multibyte strings. Jeremy. (This used to be commit ff222716a08af65d26ad842ce4c2841cc6540959)
2003-07-02Added fix for Japanese case names in statcache - these can changeJeremy Allison1-2/+33
size on upper casing. Based on patch from monyo@home.monyo.com. Jeremy. (This used to be commit 72e382e99b92666acdaf50a040b14aa16d48b80d)
2003-07-02Whitespace reformat before applying a patch.Jeremy Allison1-184/+187
Jeremy. (This used to be commit bbe1276b516e1803a4a9285691674784b989b72f)
2003-05-14Prefix VFS API macros with SMB_ for consistency and to avoid problems with ↵Alexander Bokovoy1-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 (This used to be commit c2689ed118b490e49497a76ed6a2251262018769)
2003-05-11Fix VFS layer:Alexander Bokovoy1-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 (This used to be commit 91984ef5caa2d13c5d52e1f535bd3bbbae1ec978)
2003-04-23Merge the 'safe' parts of my StrnCpy patch - many of the users really wantedAndrew Bartlett1-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 (This used to be commit 32fb801ddc035e8971e9911ed4b6e51892e9d1cc)
2003-03-17Merge new statcache.c from HEAD.Andrew Bartlett1-61/+126
(This used to be commit 3b9db928fcaec322698d046db3a8a042b9a1d30c)
2003-02-10Cleanups: (merge from HEAD)Andrew Bartlett1-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 (This used to be commit c1cfc296c2efdb2b5972202146e80f0e3b6a3da4)
2002-01-30Removed version number from file header.Tim Potter1-2/+1
Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
2001-09-25fixed a typoAndrew Tridgell1-1/+1
(This used to be commit 11a2808e10bb7885da04c19c261d3876c31ac08d)
2001-07-04strchr and strrchr are macros when compiling with optimisation in gcc, so we ↵Andrew Tridgell1-1/+1
can't redefine them. damn. (This used to be commit c41fc06376d1a2b83690612304e85010b5e5f3cf)