All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Y. Ts'o" <tytso@mit.edu>
To: Jan Stancek <jstancek@redhat.com>
Cc: Naresh Kamboju <naresh.kamboju@linaro.org>,
	adilger@dilger.ca, LTP List <ltp@lists.linux.it>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Arnd Bergmann <arnd@arndb.de>,
	open list <linux-kernel@vger.kernel.org>,
	lkft-triage@lists.linaro.org, chrubis <chrubis@suse.cz>,
	linux-ext4@vger.kernel.org
Subject: Re: LTP: statx06: FAIL: Birth time < before time
Date: Fri, 17 Jan 2020 16:33:52 -0500	[thread overview]
Message-ID: <20200117213352.GA481935@mit.edu> (raw)
In-Reply-To: <1555311261.2497849.1579281887353.JavaMail.zimbra@redhat.com>

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 <tytso@mit.edu>
>   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

WARNING: multiple messages have this Message-ID (diff)
From: Theodore Y. Ts'o <tytso@mit.edu>
To: ltp@lists.linux.it
Subject: [LTP] LTP: statx06: FAIL: Birth time < before time
Date: Fri, 17 Jan 2020 16:33:52 -0500	[thread overview]
Message-ID: <20200117213352.GA481935@mit.edu> (raw)
In-Reply-To: <1555311261.2497849.1579281887353.JavaMail.zimbra@redhat.com>

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 <tytso@mit.edu>
>   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

  reply	other threads:[~2020-01-17 21:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-16 17:32 [LTP] LTP: statx06: FAIL: Birth time < before time Naresh Kamboju
2020-01-16 17:32 ` Naresh Kamboju
2020-01-17 17:24 ` Jan Stancek
2020-01-17 17:24   ` [LTP] " Jan Stancek
2020-01-17 21:33   ` Theodore Y. Ts'o [this message]
2020-01-17 21:33     ` Theodore Y. Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200117213352.GA481935@mit.edu \
    --to=tytso@mit.edu \
    --cc=adilger@dilger.ca \
    --cc=arnd@arndb.de \
    --cc=chrubis@suse.cz \
    --cc=daniel.lezcano@linaro.org \
    --cc=jstancek@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkft-triage@lists.linaro.org \
    --cc=ltp@lists.linux.it \
    --cc=naresh.kamboju@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.