Questions regarding vfs module development and memcache
jra at samba.org
Fri Jun 10 22:21:54 UTC 2016
On Fri, Jun 10, 2016 at 08:44:03AM -0600, Trever L. Adams wrote:
> Regarding my work on https://github.com/fumiyas/samba-virusfilter/. One
> of the todo items is to move away from his own caching system for the
> scan results to Samba's memcache. The problem with this is that the
> information contains to variable length members: the file name and the
> scan report.
> I know I can talloc an object that is the datastructure (with the
> lengths for those) + the needed space and memcpy, or similar, the data
> into that object.
> I am using my own privately declared memcache, but the memcache_number
> is of concern. I am assuming I need to use a TALLOC type. The only thing
> that makes sense is SINGLETON_CACHE_TALLOC. Based on the code, it
> appears I can use anything that is a TALLOC type.
Add a new memcache_number inside lib/util/memcache.h.
Look at the code that added a new cache type:
git show 60fbfc5563ada64ea145e93ceaee791165d78e64..13b6199a2fd47dd96166878f861f2ae56d2b4a45
More information about the samba-technical