Whamcloud - gitweb
LU-15728 llite: fix relatime support
authorAurelien Degremont <degremoa@amazon.com>
Thu, 7 Apr 2022 12:58:00 +0000 (12:58 +0000)
committerAndreas Dilger <adilger@whamcloud.com>
Mon, 21 Aug 2023 08:47:16 +0000 (08:47 +0000)
commit8a51a653af049701aef101c869e456f28d767e72
treef4180f9bb055727c2af06ca97fd4ac7a14a15488
parentf36d968b6ed9ffe230a0a513729d4ffe831f8e64
LU-15728 llite: fix relatime support

relatime behavior is properly managed by VFS, however
Lustre also stores acmtime on OST objects and atime
updates for OST objects should honor relatime behavior.

This patch updates 'ci_noatime' feature which was introduced to
properly honor noatime option for OST objects, to also support
'relatime'.
file_is_noatime() code already comes from upstream touch_atime().
Add missing parts from touch_atime() to also support relatime.

It also forces atime to disk on MDD if ondisk atime is older than
ondisk mtime/ctime to match relatime (even if relatime is not enabled)

Add a new test for relatime feature.

Lustre-change: https://review.whamcloud.com/47017
Lustre-commit: c10c6eeb37dd553166367b96369dca25183ace3b

Signed-off-by: Aurelien Degremont <degremoa@amazon.com>
Change-Id: I7a26f39841300a60c015944f9e544115b4446ead
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
LU-15728 mdd: fix sanity-56oc failure

sanity 56oc starts failing since relatime patch was landed.
'relatime' patch introduced an atime behavior change.  It was forcing
atime uptime to disk on MDD if ondisk atime is older than ondisk
mtime/ctime to match relatime (even if relatime was not enabled).

This was an optimization, trying to have a slightly better atime value
cheaply. This is unfortunately causing regression in sanity-56oc.
Let's remove it for now until we understand that better.

Lustre-change: https://review.whamcloud.com/50009
Lustre-commit: 8beeec77c3b426a01e1f10ca51149c7ca7e01b7e

Fixes: c10c6ee ("LU-15728 llite: fix relatime support")
Change-Id: Ieed4d4c7523c26cfc5bc230986d96b2acf152dee
Signed-off-by: Aurelien Degremont <degremoa@amazon.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/51858
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/llite/file.c
lustre/mdd/mdd_object.c
lustre/tests/sanity.sh