> On Tue, May 2, 2017 at 7:58 AM, Malahal Naineni <mala...@gmail.com> wrote:
> A dupreq will place a refcount on its DRC when it calls xxx_get_drc, so we
> will release that DRC refcount when we free the dupreq.

Ok, so every dupreq holds a ref on the drc. In case of drc cache hit,
a dupreq entry can ref the
drc more than once. This is still fine because unless the dupreq entry
ref goes to zero the drc isn't freed.

> nfs_dupreq_finish() shouldn't free its own dupreq. When it does free some
> other dupreq, we will release DRC refcount corresponding to that dupreq.

> When we free all dupreqs that belong to a DRC

In the case of a disconnected client when are all the dupreqs freed ?

When all the filesystem operations subside from a client (mount point
is no longer in use),
nfs_dupreq_finish doesn't get called anymore. This is the only place
where dupreq entries are removed from
the drc. If the entries aren't removed from drc, drc refcnt doesn't go to 0.

>, its refcount should go to
> zero (maybe another ref is held by the socket itself, so the socket has to
> be closed as well).
>
>
> In fact, if we release DRC refcount without freeing the dupreq, that would
> be a bug!
>
> Regards, Malahal.
>
Thanks,
Satya.

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

Reply via email to