-
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
vfs: introduce --atime-mode option to control atime update behavior #3521
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #3521 +/- ##
==========================================
- Coverage 56.40% 56.05% -0.35%
==========================================
Files 149 149
Lines 36420 36992 +572
==========================================
+ Hits 20542 20737 +195
- Misses 13620 13978 +358
- Partials 2258 2277 +19
☔ View full report in Codecov by Sentry. |
Add one space around the numbers, and between Chinese word and English word. |
1fe64e8
to
0e90d62
Compare
We should also check and update the atime in Well, |
Currently juicefs doesn't update atime on access, so introduce --atime-mode option to select how to update atime. And support three modes: - noatime: don't update atime - relatime: update atime relative to motify or change time - strictatime: always update atime Fixes: juicedata#3240 Signed-off-by: Eryu Guan <[email protected]>
To avoid getting attr from meta server on each atime update. Signed-off-by: Eryu Guan <[email protected]>
To avoid getting attr again. Signed-off-by: Eryu Guan <[email protected]>
Added touchAtime() in Open() as well. |
Transaction is expensive, we could avoid starting a transaction when touchAtime() was given a current attr, so we don't have to get attr first. Signed-off-by: Eryu Guan <[email protected]>
To avoid multiple atime updates in short time. Signed-off-by: Eryu Guan <[email protected]>
Signed-off-by: Eryu Guan <[email protected]>
Signed-off-by: Eryu Guan <[email protected]>
Thanks all for the reviews! |
Currently juicefs doesn't update atime on access, so introduce --atime-mode option to select how to update atime. And support three modes:
Fixes: #3240
Signed-off-by: Eryu Guan [email protected]