Samba and MS Shadow Copy

Alexander Bokovoy a.bokovoy at sam-solutions.net
Tue Aug 5 12:18:09 GMT 2003


On Tue, Aug 05, 2003 at 08:01:16AM -0400, Ken Cross wrote:
> metze:
> 
> OK, here is the guts of the VFS module related to Shadow Copy stuff.  I
> snipped out sections of code that are irrelevant, repetitive, or deal with
> the internals of our file system that wouldn't make any sense to anybody.
Thank you!


> 2.  The VFS routine for "stat" includes a cache for file stats.  Samba has a
> HUGE amount of stat requests going on.  This code will keep the stat in
> cache for one second.  A lot of operations (open with create, unlink, etc.)
> will invalidate the cache.  Tests have shown NetBench operations get a 70%
> cache hit. (!)
Interesting... Is this of a general use?

> 3.  I've abused the "log level" parameter to add a new parameter to smb.conf
> without mucking with loadparam.  See the vfs_alfs_init routine.  The
> "statcache_size" isn't really a debug level, it's a value to override a
> default value.  So 
> 
>   log level = 2 statcache_size:100
> 
> will set statcache_size in the DEBUGLEVEL_CLASS array (see debug.c).  Then I
> use:
> 
>   i = ( DEBUGLEVEL_CLASS_ISSET[ alfs_statcache_index ] ?
> 
>         DEBUGLEVEL_CLASS[ alfs_statcache_index ] : DEFAULT_STATCACHE_SIZE );
> 
> 
> to retrieve the value or, if not set, use a default value.
This is incorrect use. For proper specification of your VFS module (and
other modules' too) parameters use parametric options API instead.

-- 
/ Alexander Bokovoy
---
You had mail, but the super-user read it, and deleted it!



More information about the samba-technical mailing list