Whamcloud - gitweb
LU-15728 mdd: fix sanity-56oc failure 09/50009/5
authorAurelien Degremont <degremoa@amazon.com>
Wed, 15 Feb 2023 10:42:25 +0000 (10:42 +0000)
committerOleg Drokin <green@whamcloud.com>
Thu, 23 Feb 2023 06:35:29 +0000 (06:35 +0000)
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 <degremoa@amazon.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50009
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/mdd/mdd_object.c
lustre/tests/sanity.sh

index 8f7ad59..24d9291 100644 (file)
@@ -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;
index 6aa45af..375f7df 100755 (executable)
@@ -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 )) ||