Bug 1593542

Summary: ctime: Upgrade/Enabling ctime feature wrongly updates older files with latest {a|m|c}time
Product: [Community] GlusterFS Reporter: Kotresh HR <khiremat>
Component: ctimeAssignee: Kotresh HR <khiremat>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: mainlineCC: atumball, bugs, pasik, pkarampu
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1715422 1733885 1739430 (view as bug list) Environment:
Last Closed: 2019-07-23 01:29:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1715422, 1733885, 1739430    

Description Kotresh HR 2018-06-21 04:09:56 UTC
Description of problem:
Upgrade scenario: Currently for older files, the ctime gets updated during {a|m|c}time modification fop and eventually becomes consistent. 
With any {a|m|c}time modification, the ctime is initialized with latest time which is incorrect. So how do we handle this upgrade scenario.

Version-Release number of selected component (if applicable):
mainline

How reproducible:
Always

Steps to Reproduce:
1.  Create EC/replica volume, mount it, create a file.
2.  Enable ctime feature
3.  touch the created file {m|a|c}time will be latest. Only access time should have been updated.

Actual results:
 {a|m|c}time gets updated.

Expected results:
 Only access time should have been updated.


Additional info:

Comment 1 Worker Ant 2019-06-24 19:11:36 UTC
REVIEW: https://review.gluster.org/22936 (ctime: Set mdata xattr on legacy files) posted (#1) for review on master by Kotresh HR

Comment 2 Worker Ant 2019-07-22 06:57:08 UTC
REVIEW: https://review.gluster.org/22936 (ctime: Set mdata xattr on legacy files) merged (#14) on master by Atin Mukherjee

Comment 3 Worker Ant 2019-07-22 15:30:46 UTC
REVIEW: https://review.gluster.org/23091 (features/utime: Fix mem_put crash) posted (#1) for review on master by Pranith Kumar Karampuri

Comment 4 Worker Ant 2019-07-23 01:29:55 UTC
REVIEW: https://review.gluster.org/23091 (features/utime: Fix mem_put crash) merged (#1) on master by Pranith Kumar Karampuri