Bug 762026 (GLUSTER-294)

Summary: posix: Final lstat call in posix_setattr will change the timestamp set for a utimes request
Product: [Community] GlusterFS Reporter: Shehjar Tikoo <shehjart>
Component: posixAssignee: Shehjar Tikoo <shehjart>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: mainlineCC: gluster-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: RTP Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 762131    

Description Shehjar Tikoo 2009-10-02 07:42:04 UTC
In posix_setattr, doing lstat on the path after a setting of attribute
is a problem for utimes because the lstat will update the atime to a
time which will be different from a possibly time supplied by the
user to posix_setattr.

May be we should not be doing an lstat on the file if setattr requires
setting the times. Instead, we already have a pre-stat in setattr, we
could just update that with the user supplied times and return the
changed buf as post-attr.

Comment 1 Shehjar Tikoo 2009-11-12 03:22:09 UTC
This needs to be fixed as soon as NFS is merged because the changing timestamps
will consistently report changed times to the NFS client resulting in cache
invalidations without any real reason.

Comment 2 Shehjar Tikoo 2009-12-18 10:33:47 UTC
This bug report was based on my wrong understanding that lstat changes atime. This is not the case and so I am closing this bug.