Whamcloud - gitweb
LU-15728 llite: fix relatime support 17/47017/16
authorAurelien Degremont <degremoa@amazon.com>
Thu, 7 Apr 2022 12:58:00 +0000 (12:58 +0000)
committerOleg Drokin <green@whamcloud.com>
Wed, 8 Feb 2023 06:26:25 +0000 (06:26 +0000)
commitc10c6eeb37dd553166367b96369dca25183ace3b
tree646107095dee22ec1ac769acdb820732e4609614
parent0c05dc21ab8d3ab5ebea711a646fad587cd77861
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.

Signed-off-by: Aurelien Degremont <degremoa@amazon.com>
Change-Id: I7a26f39841300a60c015944f9e544115b4446ead
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/47017
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/llite/file.c
lustre/mdd/mdd_object.c
lustre/tests/sanity.sh