Hi,
I had a follow up question on this. I was looking into NSM related
implementation as well. I see that ganesha handles the notify messages from
clients and releases all the locks. But, when the server crashes/restarts
it does not explicitly notify clients. I did not find any code sending
SM_NOTIFY.
There is a separate binary, sm_notify.ganesha, but I am not sure why is it
a separate binary instead of making a clnt_call with SM_NOTIFY.
There are respectives functions in nsm.h for every NSM proc, but nsm_notify
is not implemented.
Is this handled in some other way? Are the service scripts supposed to use
sm_notify.fanesha binary in some way or it is just test code?
Thanks,
Sriram
On 16-Oct-2017 11:55 PM, "sriram patil" <spsrirampa...@gmail.com> wrote:
>
>
> On 16-Oct-2017 12:50 PM, "Malahal Naineni" <mala...@gmail.com> wrote:
>
> NFSv3 protocol doesn't deal with locks, so there is no mention of grace
> period. NLM protocol is used in NFSv3 environments, so grace period does
> exist in NLM.
>
> >> So, NFSv3 only server will mostly run with "Graceless = true"
>
> The above is true if you run ganesha with NFSv3 and disable NLM. This is
> not the usual case! We do run with NLM enabled, so we have grace period
> defined even in our NFSv3 only environments.
>
>
> Okay. So, NFSv4 grace period is used for NLM in case of NFSv3. The
> nlm_grace_tv confused me. Thanks for clarifying.
>
>
> >> So, nfs4_Lock should actually use the NLM server grace period
>
> You mean nlm4_Lock? I don't see a separate NLM grace period in
> ganesha. nlm_grace_tv seems to be just grace time (not period). It should
> be removed as it is NOT used at all.
>
>
> True. Will send this patch.
>
>
> Regards, Malahal.
>
>
> On Mon, Oct 16, 2017 at 11:35 AM, sriram patil <spsrirampa...@gmail.com>
> wrote:
>
>> Hi,
>>
>> I was looking into NLM locking code for NFSv3. According to NLM/NSM
>> protocols specifications, when server restarts, the client should send
>> nlm4_Lock request with "reclaim" flag set. This reclaim is honored
>> only if "NLM server" is in grace period. However, this code in
>> nlm4_Lock function actually looks if the NFS server is in grace
>> period, instead of checking NLM server.
>>
>> Also, NLM is used in case of NFSv3 and NFSv3 specs do not define grace
>> period. So, NFSv3 only server will mostly run with "Graceless = true"
>> and the lock recovery will not work on server restarts.
>>
>> So, nfs4_Lock should actually use the NLM server grace period
>> (nlm_grace_tv) for handling reclaims. Since NFSv4 does not use NLM at
>> all, we can assume that NLM code path is useful only for NFSv3.
>>
>> Does this look like a genuine issue?
>>
>> 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
>>
>
>
>
------------------------------------------------------------------------------
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