Skip to content

Conversation

@ThomasWaldmann
Copy link
Member

When creating an archive with --atime on platforms without O_NOATIME, opening a file for reading could update atime before we recorded it (thus we archived the updated atime, not the original one).

Capture pre-open path-based-stat atime and use it
if it pre-dates the atime we got from the fd AND
if it refers to same fs object (avoid race condition).

@codecov
Copy link

codecov bot commented Nov 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.90%. Comparing base (37fbe3f) to head (abff184).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #9180   +/-   ##
=======================================
  Coverage   75.89%   75.90%           
=======================================
  Files          86       86           
  Lines       14761    14765    +4     
  Branches     2198     2199    +1     
=======================================
+ Hits        11203    11207    +4     
  Misses       2884     2884           
  Partials      674      674           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ThomasWaldmann
Copy link
Member Author

difficult to test in master: windows is too broken, lots of fail in cygwin.

When creating an archive with --atime on platforms
without O_NOATIME, opening a file for reading could
update atime before we recorded it (thus we archived
the updated atime, not the original one).

Capture pre-open path-based-stat atime and use it
if it pre-dates the atime we got from the fd AND
if it refers to same fs object (avoid race condition).
@ThomasWaldmann ThomasWaldmann force-pushed the fix/issue-6194-atime-preserve branch from ec0cb41 to abff184 Compare February 10, 2026 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant