Hmm we can use the mdcache. But wanted to store some extra information from
sub fsal. I guess I can do it by allocating more memory in
vfs_sub_alloc_handle with a single malloc call.
Thanks,
Sriram
On 08-Jan-2018 7:43 PM, "Frank Filz" <ffilz...@mindspring.com> wrote:
> 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>
> 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
>
>
>
>
> ------------------------------
> [image: Avast logo] <https://www.avast.com/antivirus>
>
> This email has been checked for viruses by Avast antivirus software.
> www.avast.com <https://www.avast.com/antivirus>
>
> <#m_-432962764810679348_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
------------------------------------------------------------------------------
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