-
Notifications
You must be signed in to change notification settings - Fork 997
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix update mtime before close #3552
Conversation
Mutate Test Report pkg/meta/benchmarks_test.go-1-1: score:0.00 failed:0, passed:0, compile error:0, out of coverage:0, skip by comment:0, others:0 pkg/meta/load_dump_test.go-1-1: score:0.00 failed:0, passed:0, compile error:0, out of coverage:0, skip by comment:0, others:0 pkg/fs/fs_test.go-3-4: score:0.00 failed:0, passed:0, compile error:0, out of coverage:112, skip by comment:0, others:0 pkg/fs/fs_test.go-2-4: score:0.00 failed:0, passed:0, compile error:2, out of coverage:110, skip by comment:0, others:0 pkg/fs/fs_test.go-1-4: score:0.67 failed:2, passed:4, compile error:0, out of coverage:106, skip by comment:0, others:0 pkg/object/object_storage_test.go-1-1: score:0.17 failed:10, passed:2, compile error:1, out of coverage:0, skip by comment:0, others:0 pkg/meta/sql_test.go-2-4: score:0.24 failed:107, passed:34, compile error:28, out of coverage:228, skip by comment:0, others:0 pkg/meta/sql_test.go-1-4: score:0.36 failed:148, passed:84, compile error:82, out of coverage:83, skip by comment:0, others:0 pkg/meta/sql_test.go-4-4: score:0.46 failed:130, passed:112, compile error:40, out of coverage:112, skip by comment:0, others:0 pkg/meta/sql_test.go-3-4: score:0.30 failed:215, passed:92, compile error:41, out of coverage:49, skip by comment:0, others:0 |
ext4 keeps only mtime when calling |
Access log shows that it sets the atime & mtime explicitly after |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #3552 +/- ##
==========================================
+ Coverage 56.47% 56.51% +0.04%
==========================================
Files 149 149
Lines 36323 36511 +188
==========================================
+ Hits 20514 20635 +121
- Misses 13552 13618 +66
- Partials 2257 2258 +1
☔ View full report in Codecov by Sentry. |
Mutate Test Report pkg/meta/load_dump_test.go-1-1: score:0.00 failed:0, passed:0, compile error:0, out of coverage:0, skip by comment:0, others:0 pkg/fs/fs_test.go-3-4: score:0.00 failed:0, passed:0, compile error:0, out of coverage:112, skip by comment:0, others:0 pkg/fs/fs_test.go-2-4: score:0.00 failed:0, passed:0, compile error:2, out of coverage:110, skip by comment:0, others:0 pkg/fs/fs_test.go-4-4: score:0.00 failed:0, passed:0, compile error:0, out of coverage:110, skip by comment:0, others:0 pkg/object/object_storage_test.go-1-1: score:0.17 failed:10, passed:2, compile error:1, out of coverage:0, skip by comment:0, others:0 pkg/fs/fs_test.go-1-4: score:0.67 failed:2, passed:4, compile error:0, out of coverage:106, skip by comment:0, others:0 pkg/meta/sql_test.go-2-4: score:0.25 failed:105, passed:35, compile error:28, out of coverage:230, skip by comment:0, others:0 pkg/meta/sql_test.go-1-4: score:0.36 failed:148, passed:85, compile error:82, out of coverage:83, skip by comment:0, others:0 pkg/meta/sql_test.go-4-4: score:0.46 failed:130, passed:109, compile error:40, out of coverage:115, skip by comment:0, others:0 pkg/meta/sql_test.go-3-4: score:0.32 failed:208, passed:100, compile error:41, out of coverage:49, skip by comment:0, others:0 |
Currently, it updates mtime as it updates the chunks in meta engine after data persisted. Actually, the mtime should be the time when data was written from kernel or application, not the time when data is persisted.
Especially, a setattr could be called to update mtime before data is persisted, then the
mtime
could be lost (overwritten by data persistency).close #3204