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>
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
>
------------------------------------------------------------------------------
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