The Samba-Bugzilla – Attachment 1144 Details for
Bug 2581
stat cache grows unlimited
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch.
look (text/plain), 2.45 KB, created by
Jeremy Allison
on 2005-04-07 13:39:57 UTC
(
hide
)
Description:
Proposed patch.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2005-04-07 13:39:57 UTC
Size:
2.45 KB
patch
obsolete
>Index: smbd/statcache.c >=================================================================== >--- smbd/statcache.c (revision 6238) >+++ smbd/statcache.c (working copy) >@@ -47,10 +47,15 @@ > TDB_DATA data_val; > char *original_path; > size_t original_path_length; >+ size_t sc_size = lp_max_stat_cache_size(); > > if (!lp_stat_cache()) > return; > >+ if (sc_size && (sc_size*1024 > tdb_stat_cache->map_size)) { >+ reset_stat_cache(); >+ } >+ > ZERO_STRUCT(data_val); > > /* >Index: param/loadparm.c >=================================================================== >--- param/loadparm.c (revision 6238) >+++ param/loadparm.c (working copy) >@@ -281,6 +281,7 @@ > BOOL bNTPipeSupport; > BOOL bNTStatusSupport; > BOOL bStatCache; >+ int iMaxStatCacheSize; > BOOL bKernelOplocks; > BOOL bAllowTrustedDomains; > BOOL bLanmanAuth; >@@ -1033,6 +1034,7 @@ > {"map archive", P_BOOL, P_LOCAL, &sDefault.bMap_archive, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL}, > {"mangled names", P_BOOL, P_LOCAL, &sDefault.bMangledNames, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL}, > {"mangled map", P_STRING, P_LOCAL, &sDefault.szMangledMap, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL | FLAG_DEPRECATED }, >+ {"max stat cache size", P_INTEGER, P_GLOBAL, &Globals.iMaxStatCacheSize, NULL, NULL, FLAG_ADVANCED}, > {"stat cache", P_BOOL, P_GLOBAL, &Globals.bStatCache, NULL, NULL, FLAG_ADVANCED}, > {"store dos attributes", P_BOOL, P_LOCAL, &sDefault.bStoreDosAttributes, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL}, > >@@ -1462,6 +1464,7 @@ > Globals.bNTPipeSupport = True; /* Do NT pipes by default. */ > Globals.bNTStatusSupport = True; /* Use NT status by default. */ > Globals.bStatCache = True; /* use stat cache by default */ >+ Globals.iMaxStatCacheSize = 0; /* unlimited size in kb by default. */ > Globals.restrict_anonymous = 0; > Globals.bClientLanManAuth = True; /* Do use the LanMan hash if it is available */ > Globals.bClientPlaintextAuth = True; /* Do use a plaintext password if is requested by the server */ >@@ -1814,6 +1817,7 @@ > FN_GLOBAL_BOOL(lp_nt_pipe_support, &Globals.bNTPipeSupport) > FN_GLOBAL_BOOL(lp_nt_status_support, &Globals.bNTStatusSupport) > FN_GLOBAL_BOOL(lp_stat_cache, &Globals.bStatCache) >+FN_GLOBAL_INTEGER(lp_max_stat_cache_size, &Globals.iMaxStatCacheSize) > FN_GLOBAL_BOOL(lp_allow_trusted_domains, &Globals.bAllowTrustedDomains) > FN_GLOBAL_INTEGER(lp_restrict_anonymous, &Globals.restrict_anonymous) > FN_GLOBAL_BOOL(lp_lanman_auth, &Globals.bLanmanAuth)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 2581
: 1144