Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp9521188ybl; Fri, 17 Jan 2020 13:34:31 -0800 (PST) X-Google-Smtp-Source: APXvYqyhC5mbkF54m9aJPdvvqzEf8d8SdQZLFhUcC3m+shAvS8iM/Wzy99BE8kzH0WMZ6MZXs2Em X-Received: by 2002:a9d:75da:: with SMTP id c26mr7790076otl.40.1579296870786; Fri, 17 Jan 2020 13:34:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579296870; cv=none; d=google.com; s=arc-20160816; b=KpePs/bV1u8wMfqEAmmtuKX7ZLaPNBvbd1r28UcVtzp/RnhcbVkMNGT6NGkNolHT83 O5pejbGvDP4M2tqC1nfMLJj2meZixHJWE/oKT0gaf94K4AnNJKMhOGP/YK/5b++dhFHK +VANkf8T1LINOFy5z/GIxZkV2hIblPw58PRTmVv0IiZ0L2nmb/PvXhqXw5tz3lLJdDnR LiY5aI+gc5FIN6tYO5/DqxaY56qy45pzZb4/1sLzscuPZP9/L2Mf+ZjHrP/kUSA79cis n51urRnOU3gxz99vFAuwX3Cd4lukmwcmc2rOZ1AhoaH3K7TXlLbig6YN7pOZisVxHMjt zQuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=XKlrWBgT+sGw4ORO4sDG2YhEkOQUi9vE+w3htcN82EU=; b=KRBK35hnqw2lM/mYAAlzY5MuWv1q/zS0rkY4rqdep20+caAqRC9kQ+OrPaGkiixnA7 rRZrfxpYE4wZdSVs+Qqcfv296rr3a4OexsXCMPW8E4wikBzEqUwey3RNTNhfq9tQ3Fty alwnMq2Anb709MVli/0H71FMcTyinn6e6Q+VN7uc+v85+yj9w6wj0yt/X3QPEF1N8CCv jHQIPzwP9qan2Muz7YjttDUzy/va1JthX+v1s4ellRwwjM0S7BRwSSOL8IAwKKz0TLJR 2lyKKU5sq2ShqbDqaE+bxXc8H1Tlu7hujb2h25w+TvWBvgqq+rreVeZL8sRtxtj3sQft He0g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m67si13803611oib.117.2020.01.17.13.34.19; Fri, 17 Jan 2020 13:34:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729427AbgAQVeL (ORCPT + 99 others); Fri, 17 Jan 2020 16:34:11 -0500 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:59947 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726587AbgAQVeK (ORCPT ); Fri, 17 Jan 2020 16:34:10 -0500 Received: from callcc.thunk.org (guestnat-104-133-0-111.corp.google.com [104.133.0.111] (may be forged)) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 00HLXq7b017717 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 17 Jan 2020 16:33:53 -0500 Received: by callcc.thunk.org (Postfix, from userid 15806) id 696124207DF; Fri, 17 Jan 2020 16:33:52 -0500 (EST) Date: Fri, 17 Jan 2020 16:33:52 -0500 From: "Theodore Y. Ts'o" To: Jan Stancek Cc: Naresh Kamboju , adilger@dilger.ca, LTP List , Daniel Lezcano , Arnd Bergmann , open list , lkft-triage@lists.linaro.org, chrubis , linux-ext4@vger.kernel.org Subject: Re: LTP: statx06: FAIL: Birth time < before time Message-ID: <20200117213352.GA481935@mit.edu> References: <1555311261.2497849.1579281887353.JavaMail.zimbra@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1555311261.2497849.1579281887353.JavaMail.zimbra@redhat.com> Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Fri, Jan 17, 2020 at 12:24:47PM -0500, Jan Stancek wrote: > > LTP syscalls statx06 test case getting failed from linux next 20200115 > > tag onwards on all x86_64, i386, arm and arm64 devices > > > > Test output: > > statx06.c:152: FAIL: Birth time < before time > > [CC Theo & linux-ext4] > > It's returning '0' in stx_btime for STATX_ALL or STATX_BTIME. > > Looking at changes, I suspect: > commit 927353987d503b24e1813245563cde0c6167af6e > Author: Theodore Ts'o > Date: Thu Nov 28 22:26:51 2019 -0500 > ext4: avoid fetching btime in ext4_getattr() unless requested > > and that perhaps it should be instead... > > diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c > index c8355f022e6e..6d76eb6d2e7f 100644 > --- a/fs/ext4/inode.c > +++ b/fs/ext4/inode.c > @@ -5398,7 +5398,7 @@ int ext4_getattr(const struct path *path, struct kstat *stat, > struct ext4_inode_info *ei = EXT4_I(inode); > unsigned int flags; > > - if ((query_flags & STATX_BTIME) && > + if ((request_mask & STATX_BTIME) && > EXT4_FITS_IN_INODE(raw_inode, ei, i_crtime)) { > stat->result_mask |= STATX_BTIME; > stat->btime.tv_sec = ei->i_crtime.tv_sec; Yep, nice catch! Unfortunately we don't have a test like this in xfstests, or I would have caught this sooner. I've fixed this in the dev branch, so it will hopefully be fixed in the future linux-next tgs. - Ted