Bug 762026 (GLUSTER-294) - posix: Final lstat call in posix_setattr will change the timestamp set for a utimes request
Summary: posix: Final lstat call in posix_setattr will change the timestamp set for a ...
Keywords:
Status: CLOSED NOTABUG
Alias: GLUSTER-294
Product: GlusterFS
Classification: Community
Component: posix
Version: mainline
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Shehjar Tikoo
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: GLUSTER-399
TreeView+ depends on / blocked
 
Reported: 2009-10-02 07:42 UTC by Shehjar Tikoo
Modified: 2015-12-01 16:45 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Regression: RTP
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.