Bug 446083

Summary: Ensure that 'noac' and/or 'actimeo=0' turn off attribute caching
Product: Red Hat Enterprise Linux 4 Reporter: Bryn M. Reeves <bmr>
Component: kernelAssignee: Peter Staubach <staubach>
Status: CLOSED ERRATA QA Contact: Martin Jenner <mjenner>
Severity: high Docs Contact:
Priority: high    
Version: 4.6CC: cww, guido.tijskens, jlayton, jneedham, juanino, matt.dey, ricardo.labiaga, rlerch, sfolkwil, steved, tao, vgoyal
Target Milestone: rcFlags: rlerch: needinfo? (staubach)
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-05-18 19:24:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 450184, 458752, 461297, 476728    
Attachments:
Description Flags
[PATCH] NFS: Fix nfs_attribute_timeout to ensure it works with actimeo=0
none
Proposed patch none

Description Bryn M. Reeves 2008-05-12 17:10:50 UTC
Description of problem:
Both the 'noac' and 'actimeo=0' mount options should ensure that attributes
are not cached, however a bug in nfs_attribute_timeout() means that
currently, the attributes may in fact get cached for up to one jiffy. This
has been seen to cause corruption in some applications.

The reason for the bug is that the time_in_range() test returns 'true' as
long as the current time lies between nfsi->read_cache_jiffies and
nfsi->read_cache_jiffies + nfsi->attrtimeo. In other words, if jiffies
equals nfsi->read_cache_jiffies, then we still cache the attribute data.



Version-Release number of selected component (if applicable):
2.6.9-67.EL

How reproducible:
Dependent on NFS server and workload

Steps to Reproduce:
1. have one client host extend a file on an NFS volume
2. have another client host stat & attempt to write into the newly extended area

  
Actual results:
The second host does not see the change in file size made by the first
immediately despite the use of noac/actimeo=0.

Expected results:
The change to the size is immediately reflected on all clients.

Additional info:
Thread/patch from linux-nfs: http://article.gmane.org/gmane.linux.nfs/20074

Comment 2 Trond Myklebust 2008-05-21 17:52:45 UTC
Created attachment 306286 [details]
[PATCH] NFS: Fix nfs_attribute_timeout to ensure it works with actimeo=0

The patch against RHEL-4 is identical. Only the line numbers change in the
diff. The attached patch was tested at NetApp, and appears to fix the bug in
question.

Cheers
  Trond

Comment 3 Jerry Uanino 2008-05-23 20:36:09 UTC
I believe this bug is effecting me.  Is there any movement from RedHat to
integrate this patch?

Comment 9 RHEL Product and Program Management 2008-06-05 18:55:50 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 10 Peter Staubach 2008-06-09 16:11:35 UTC
Created attachment 308709 [details]
Proposed patch

Comment 18 Vivek Goyal 2008-08-11 15:41:21 UTC
Committed in 78.4.EL . RPMS are available at http://people.redhat.com/vgoyal/rhel4/

Comment 19 RHEL Product and Program Management 2008-09-03 12:53:00 UTC
Updating PM score.

Comment 26 errata-xmlrpc 2009-05-18 19:24:12 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2009-1024.html