Why did you want to have an additional cache? FSAL_MDCACHE already provides a
cache of essentially every handle (though FSAL_MEM and FSAL_PSEUDO maintain
some additional caching because those object handles cannot be evicted (we
should actually beef up mdcache to genuinely prevent those handles from being
evicted so they don’t have to do additional caching work…).
Frank
From: sriram patil [mailto:spsrirampa...@gmail.com]
Sent: Sunday, January 7, 2018 11:00 PM
To: nfs-ganesha-devel@lists.sourceforge.net
Cc: kcha...@vmware.com; sakt...@vmware.com
Subject: Re: [Nfs-ganesha-devel] [FSAL_VFS] Probable memory leak when
deallocating handles
Hi,
Sorry for the confusion here. The free should work fine because it is
contagious memory allocated in single malloc/calloc call.
The problem I wanted to address is, there is no corresponding
vfs_sub_free_handle for vfs_sub_alloc_handle. I wanted to maintain a cache for
every handle, once we release the handle the cache entries should also be
evicted. Because there is no support for vfs_sub_free_handle, the sub fsal does
not know when is the handle released.
Also, it is easier if we have a void pointer in vfs_fsal_obj_handle to keep sub
fsal specific data. This way there is no need of having a separate cache in sub
fsal.
Thanks,
Sriram
On Mon, Jan 8, 2018 at 11:58 AM, sriram patil <spsrirampa...@gmail.com
<mailto:spsrirampa...@gmail.com> > wrote:
Hi,
I was going through the vfs_fsal_obj_handle workflow. As part of the function
alloc_handle we allocate the handle with the help of vfs_sub_alloc_handle.
vfs_sub_alloc_handle allocates vfs_fsal_obj_handle and vfs_file_handle_t back
to back. And when releasing the handle (obj_ops->release), it calls free on the
vfs_fsal_obj_handle. So, when is vfs_file_handle_t freed? Am I missing
something here?
Thanks,
Sriram
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Nfs-ganesha-devel mailing list
Nfs-ganesha-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel