From 8beeec77c3b426a01e1f10ca51149c7ca7e01b7e Mon Sep 17 00:00:00 2001 From: Aurelien Degremont Date: Wed, 15 Feb 2023 10:42:25 +0000 Subject: [PATCH] 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. Fixes: c10c6ee ("LU-15728 llite: fix relatime support") Test-Parameters: testlist=sanity env=ONLY=56oc,ONLY_REPEAT=70 Change-Id: Ieed4d4c7523c26cfc5bc230986d96b2acf152dee Signed-off-by: Aurelien Degremont Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50009 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Alex Zhuravlev Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- lustre/mdd/mdd_object.c | 8 ++++++-- lustre/tests/sanity.sh | 9 --------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/lustre/mdd/mdd_object.c b/lustre/mdd/mdd_object.c index 8f7ad59..24d9291 100644 --- a/lustre/mdd/mdd_object.c +++ b/lustre/mdd/mdd_object.c @@ -651,12 +651,17 @@ static bool is_project_state_change(const struct lu_attr *oattr, return false; } -/* +/** * This gives the same functionality as the code between * sys_chmod and inode_setattr * chown_common and inode_setattr * utimes and inode_setattr * This API is ported from mds_fix_attr but remove some unnecesssary stuff. + * + * @param[in] oattr Original, current object attributes. + * @param[in,out] la New attributes to be evaluated and potentially + * modified depending on oattr content and other rules. + * @param[in] ma md_attr to be evaluated for that object. */ static int mdd_fix_attr(const struct lu_env *env, struct mdd_object *obj, const struct lu_attr *oattr, struct lu_attr *la, @@ -710,7 +715,6 @@ static int mdd_fix_attr(const struct lu_env *env, struct mdd_object *obj, * close RPCs. */ if (la->la_valid & LA_ATIME && - oattr->la_atime > max(oattr->la_ctime, oattr->la_mtime) && la->la_atime <= (oattr->la_atime + mdd_obj2mdd_dev(obj)->mdd_atime_diff)) la->la_valid &= ~LA_ATIME; diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 6aa45af..375f7df 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -5303,15 +5303,6 @@ test_39s() { # Remount the client to clear 'relatime' option remount_client $MOUNT - if (( MDS1_VERSION >= $(version_code 2.15.50) )); then - # The full test lasted less than default atime_diff - # Client was remounted to clear 'relatime' option for next tests - # and to confirm atime was written to disk - local atime5=$(stat -c %X $DIR/$tfile) - (( atime3 == atime5 )) || - error "atime3 $atime3 != atime5 $atime5" - fi - (( atime0 < atime1 )) || error "atime $atime0 should be smaller than $atime1" (( atime1 == atime2 )) || -- 1.8.3.1