Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 500528

Summary: [5.3]kernel:Add mount options for controlling the lookup cache.
Product: Red Hat Enterprise Linux 5 Reporter: Lachlan McIlroy <lmcilroy>
Component: kernelAssignee: Red Hat Kernel Manager <kernel-mgr>
Status: CLOSED DUPLICATE QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.3CC: vgaikwad
Target Milestone: rc   
Target Release: 5.4   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-05-20 05:21:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
NFS: Add options for finer control of the lookup cache none

Description Lachlan McIlroy 2009-05-13 05:05:47 UTC
Description of Problem:

The lookup cache of client maybe different from server, if the ctime on dir
doesn't change after a operation modify the dir, such as 'touch dir/file',
'rm -rf dir/file' etc.

Version-Release number of selected component:

Red Hat Enterprise Linux Version Number: RHEL5
Release Number:   5.3GA
Architecture:     x86, x86_64, ia64
Kernel Version:   kernel-2.6.18-128.EL
Related Package Version:  none
Related Middleware / Application: none

How reproducible:

Reproduce Environment :
[1] OS: RHEL5.3GA
[2] IP: 192.168.0.19
[3] add the following line to '/etc/exports':
   /nfsroot *(rw,insecure,no_root_squash,fsid=0)

Steps to Reproduce :
step1: mkdir /nfsroot
step2: service nfs restart
step3: rm -rf /nfsroot/*
step4: mount -t nfs4 192.168.0.19:/  /mnt
step5: rm -f /nfsroot/file; ls -l /mnt/file ; uname -a > /nfsroot/file; ls -l /mnt/file
step6: umount /mnt

Actual Results:

ls: /mnt/file: No such file or directory
ls: /mnt/file: No such file or directory

Expected Results:

ls: /mnt/file: No such file or directory
-rw-r--r-- 1 4294967294 4294967294 82 2009-04-14 17:26 /mnt/file

Additional Info:

- patch file: kernel-add-option-for-controlling-the-lookup-cache.patch

This mount options has been added to the Community's kernel.

Comment 1 Lachlan McIlroy 2009-05-13 05:20:15 UTC
Created attachment 343702 [details]
NFS: Add options for finer control of the lookup cache

Add the flag NFS_MOUNT_LOOKUP_CACHE_NONEG to turn off the caching of
negative dentries. In reality what we do is to force
nfs_lookup_revalidate() to always discard negative dentries.

Add the flag NFS_MOUNT_LOOKUP_CACHE_NONE for enforcing stricter
revalidation of dentries. It forces the revalidate code to always do a
lookup instead of just checking the cached mtime of the parent directory.

Comment 2 Lachlan McIlroy 2009-05-20 05:21:00 UTC

*** This bug has been marked as a duplicate of bug 489285 ***