Skip to contentSkip to conversation

Should we be aggressively invalidating cache when using -onolock?

DISCUSSION Sachin Prabhu 2 participants 3 messages Sep 20, 2010 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 14128115.54.1284995685991.JavaMail.sprabhu@dhcp-1-233.fab.redhat.com

#1 lore raw
Quoted 4 lines · ----- "Chuck Lever

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

#2 lore raw
Quoted 7 lines · Sachin Prabhu
Quoted 4 lines · ----- "Chuck Lever

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?

Signature · 1 line
chuck[dot]lever[at]oracle[dot]com
#3 lore raw
Quoted 11 lines · ----- "Chuck Lever
Quoted 2 lines · Sachin Prabhu
Quoted 1 line · ----- "Chuck Lever

It also seems to me that if RHEL 4 is _not_ invalidating on lock,

then

Quoted 1 line
Quoted 1 line

it is not working as designed. AFAIK the Linux NFS client has

always

Quoted 4 lines
Quoted 2 lines

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.

Quoted 9 lines

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.