Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp2125529rwb; Thu, 27 Jul 2023 02:23:58 -0700 (PDT) X-Google-Smtp-Source: APBJJlHB6DKWf7BPHN86qqQIzZOAr2VaGhkYr60fi+2gVOm8kmJu2lOnmJCRa0U/NSt4vj0G7oTl X-Received: by 2002:a17:907:3f0c:b0:988:565f:bf46 with SMTP id hq12-20020a1709073f0c00b00988565fbf46mr1898910ejc.32.1690449838214; Thu, 27 Jul 2023 02:23:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690449838; cv=none; d=google.com; s=arc-20160816; b=Crw1FDLnINcmtZrxgFIA2CuS7ezIppJf0w/UXK2tiPBEWjdOpm+Ct3v6AHoq/o1F3G vEKj62UuLk/vN4Z39DYo/G6l1HcP6JUlOLUzKgL9rBEt2LQiBJcfI5ZFm7+1xOeirCtV nf4xVvaMknB79SUACyj/6taw3/BDjKD8xQLBSPJGfaOMfQmvsSmznrzz2MKag1cbHEk4 81xFl1rWKXVZ7U65jBrzDxhl5lL708q+ms73EHhNZYrYiE92P0yrBlFSmun3du+1bw1J /2p3kDCnuvqj3Yj1NvmgqHuYutUpnxd6gdxybM9qfaQIq5tGaUT+I6INAS+nZWrRyJCI 0VpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=b6hL/js6pZOsBdQ1d+bOfRD36AB6yEOr3j2OUa8CNN8=; fh=lZIjxcKnN3jyg9x/mnPks4IQwRAKNt4ErK5LfNoWWC0=; b=0QWciDsRQ1NPicO0Qy3+953d3C5XvatR6V2N3mFBjpjPN/FxbEWaHGl07nujmnCE0k kiqES0412t2aAaR46JvcJNCj3YNLgQdioWlgl6Yl66jPTDBcYxk492kKxaEHB6WDcznw dBPLl6C+gO9aNyHnCFjzt3npOJNXLh0SiFFd270D+dkuFE1foOxZUNSnkUgBGpv+V2fP Sf0fV8P7j8Bv/GsYep3QCzBcN6xrGj+gPX3S+6MsK/WGKVzRFYCur9mNIoUIV4MAkxM4 JOAxQPRuxchp7qEPVuLv1u1MhRzA+fhwIm8pxUa5WBR88wdWbDOJFrj2LHBP9rky0vOB BN9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jGiNSiA0; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c22-20020a056402121600b0052239083be7si645183edw.636.2023.07.27.02.23.33; Thu, 27 Jul 2023 02:23:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jGiNSiA0; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232541AbjG0JJp (ORCPT + 99 others); Thu, 27 Jul 2023 05:09:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232466AbjG0JJQ (ORCPT ); Thu, 27 Jul 2023 05:09:16 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E67C4202 for ; Thu, 27 Jul 2023 01:52:31 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E82E361D02 for ; Thu, 27 Jul 2023 08:52:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ADFF0C433C8; Thu, 27 Jul 2023 08:52:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690447950; bh=AuMxo34AUpmkl0Yqv80MIJPx7PKx9VvtA+IEF7Kq6UU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jGiNSiA0AOi+5UW7LO6P65q6mofLmrerXULuQNiP3MXOoR7FE5hJjzpP+WZ8VtNOI BiZ5DmUEIHLCz9Pe4Jf+F3fRzo4m7JnjA+lNZyB5YuGlT3Cy0AKwKbwINwR5ZAJUr1 SZKHrtpSttCNtwRGD8WnElpHZWIDFXy5eO37/GvXA+gbk7YdMP/QZLKuugykCIU3st paW5O4WuEtHd8qoilrQEjwfgiVcaHpYhbnpuSoTsGSCxvhdx98WtFJmKVMb+96tV+4 G2fYKVkCYMSjwwvMsHx040uotOri65KtTBLXSLFsjzHaCTG8mnnWBdusI/dIp2jwkk ufSeEf4XmoO5w== Date: Thu, 27 Jul 2023 10:52:25 +0200 From: Christian Brauner To: kernel test robot Cc: Jeff Layton , oe-lkp@lists.linux.dev, lkp@intel.com, Christian Brauner , Jan Kara , linux-ext4@vger.kernel.org Subject: Re: [brauner-vfs:vfs.ctime] [ext4] 979492850a: xfstests.generic.371.fail Message-ID: <20230727-archaisch-funknetz-c7158b8406ad@brauner> References: <202307271100.7155c64a-oliver.sang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <202307271100.7155c64a-oliver.sang@intel.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thu, Jul 27, 2023 at 01:32:52PM +0800, kernel test robot wrote: > > > Hello, > > kernel test robot noticed "xfstests.generic.371.fail" on: > > commit: 979492850abd8e0d6ab0081be7593b32e5e6c9cc ("ext4: convert to ctime accessor functions") > https://git.kernel.org/cgit/linux/kernel/git/vfs/vfs.git vfs.ctime This is outdated the diff between the commit version referenced here and the one currently in the branch is: diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 2af347669db7..1e2259d9967d 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -900,8 +900,10 @@ do { \ #define EXT4_INODE_SET_CTIME(inode, raw_inode) \ EXT4_INODE_SET_XTIME_VAL(i_ctime, inode, raw_inode, inode_get_ctime(inode)) -#define EXT4_EINODE_SET_XTIME(xtime, einode, raw_inode) \ - EXT4_INODE_SET_XTIME_VAL(xtime, &((einode)->vfs_inode), raw_inode, (einode)->xtime) +#define EXT4_EINODE_SET_XTIME(xtime, einode, raw_inode) \ + if (EXT4_FITS_IN_INODE(raw_inode, einode, xtime)) \ + EXT4_INODE_SET_XTIME_VAL(xtime, &((einode)->vfs_inode), \ + raw_inode, (einode)->xtime) #define EXT4_INODE_GET_XTIME_VAL(xtime, inode, raw_inode) \ (EXT4_FITS_IN_INODE(raw_inode, EXT4_I(inode), xtime ## _extra) ? \ @@ -922,9 +924,14 @@ do { \ EXT4_INODE_GET_XTIME_VAL(i_ctime, inode, raw_inode)); \ } while (0) -#define EXT4_EINODE_GET_XTIME(xtime, einode, raw_inode) \ -do { \ - (einode)->xtime = EXT4_INODE_GET_XTIME_VAL(xtime, &(einode->vfs_inode), raw_inode); \ +#define EXT4_EINODE_GET_XTIME(xtime, einode, raw_inode) \ +do { \ + if (EXT4_FITS_IN_INODE(raw_inode, einode, xtime)) \ + (einode)->xtime = \ + EXT4_INODE_GET_XTIME_VAL(xtime, &(einode->vfs_inode), \ + raw_inode); \ + else \ + (einode)->xtime = (struct timespec64){0, 0}; \ } while (0) #define i_disk_version osd1.linux1.l_i_version diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index 07f6d96ebc60..933ad03f4f58 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -3957,7 +3957,7 @@ static int ext4_rename(struct mnt_idmap *idmap, struct inode *old_dir, ext4_dec_count(new.inode); inode_set_ctime_current(new.inode); } - old.dir->i_mtime = inode_set_ctime_current(old.inode); + old.dir->i_mtime = inode_set_ctime_current(old.dir); ext4_update_dx_flag(old.dir); if (old.dir_bh) { retval = ext4_rename_dir_finish(handle, &old, new.dir->i_ino); With that I can't reproduce the reported failure. FSTYP -- ext4 PLATFORM -- Linux/x86_64 imp1-vm 6.5.0-rc1-vfs-all-91bcc05fab9b #139 SMP PREEMPT_DYNAMIC Wed Jul 26 15:51:58 UTC 2023 MKFS_OPTIONS -- -F /dev/sda4 MOUNT_OPTIONS -- -o acl,user_xattr /dev/sda4 /mnt/scratch generic/371 10s ... 15s Ran: generic/371 Passed all 1 tests