2010-09-20 15:16:45

by Sachin Prabhu

[permalink] [raw]
Subject: Re: Should we be aggressively invalidating cache when using -onolock?

----- "Chuck Lever" <[email protected]> wrote:
> It also seems to me that if RHEL 4 is _not_ invalidating on lock, then
> it is not working as designed. AFAIK the Linux NFS client has always
> invalidated a file's data cache on lock. Did I misread something?
>

The flock support for NFS was only implemented in the 2.6.12 kernel. Hence on the RHEL 4 kernel ie 2.6.9 nfs_file_operations->flock is NULL and any flock operations performed by the application was only applicable on that node. No part of the NFS client code was executed for the flock() operation.

Sachin Prabhu


2010-09-20 15:34:29

by Sachin Prabhu

[permalink] [raw]
Subject: Re: Should we be aggressively invalidating cache when using -onolock?


----- "Chuck Lever" <[email protected]> wrote:

> On Sep 20, 2010, at 11:15 AM, Sachin Prabhu wrote:
>
> > ----- "Chuck Lever" <[email protected]> wrote:
> >> It also seems to me that if RHEL 4 is _not_ invalidating on lock,
> then
> >> it is not working as designed. AFAIK the Linux NFS client has
> always
> >> invalidated a file's data cache on lock. Did I misread something?
> >>
> >
> > The flock support for NFS was only implemented in the 2.6.12 kernel.
> Hence on the RHEL 4 kernel ie 2.6.9 nfs_file_operations->flock is NULL
> and any flock operations performed by the application was only
> applicable on that node. No part of the NFS client code was executed
> for the flock() operation.
>
> I see, so in RHEL 4, the original fcntl(2) invalidate-on-lock behavior
> is working correctly, but flock(2) is not, since flock(2) wasn't
> supported in 2.6.9's NFS client. Correct?
>
Yes.

2010-09-20 15:20:33

by Chuck Lever

[permalink] [raw]
Subject: Re: Should we be aggressively invalidating cache when using -onolock?


On Sep 20, 2010, at 11:15 AM, Sachin Prabhu wrote:

> ----- "Chuck Lever" <[email protected]> wrote:
>> It also seems to me that if RHEL 4 is _not_ invalidating on lock, then
>> it is not working as designed. AFAIK the Linux NFS client has always
>> invalidated a file's data cache on lock. Did I misread something?
>>
>
> The flock support for NFS was only implemented in the 2.6.12 kernel. Hence on the RHEL 4 kernel ie 2.6.9 nfs_file_operations->flock is NULL and any flock operations performed by the application was only applicable on that node. No part of the NFS client code was executed for the flock() operation.

I see, so in RHEL 4, the original fcntl(2) invalidate-on-lock behavior is working correctly, but flock(2) is not, since flock(2) wasn't supported in 2.6.9's NFS client. Correct?

--
chuck[dot]lever[at]oracle[dot]com