From: Jeff Layton <jlayton@kernel.org>
To: Hugh Dickins <hughd@google.com>
Cc: Theodore Ts'o <tytso@mit.edu>,
Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
Andreas Dilger <adilger.kernel@dilger.ca>,
linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: linux-next ext4 inode size 128 corrupted
Date: Tue, 18 Jul 2023 06:32:54 -0400 [thread overview]
Message-ID: <3858cccced2de1b2407d9a03f6628eb4fb2cb0ab.camel@kernel.org> (raw)
In-Reply-To: <26cd770-469-c174-f741-063279cdf7e@google.com>
On Mon, 2023-07-17 at 20:43 -0700, Hugh Dickins wrote:
> Hi Jeff,
>
> I've been unable to run my kernel builds on ext4 on loop0 on tmpfs
> swapping load on linux-next recently, on one machine: various kinds
> of havoc, most common symptoms being ext4_find_dest_de:2107 errors,
> systemd-journald errors, segfaults. But no problem observed running
> on a more recent installation.
>
> Bisected yesterday to 979492850abd ("ext4: convert to ctime accessor
> functions").
>
> I've mostly averted my eyes from the EXT4_INODE macro changes there,
> but I think that's where the problem lies. Reading the comment in
> fs/ext4/ext4.h above EXT4_FITS_IN_INODE() led me to try "tune2fs -l"
> and look at /etc/mke2fs.conf. It's an old installation, its own
> inodes are 256, but that old mke2fs.conf does default to 128 for small
> FSes, and what I use for the load test is small. Passing -I 256 to the
> mkfs makes the problems go away.
>
Sounds like something is storing timestamp values in the extended part
of the inode when it shouldn't be. The macros look sane to me, but I'll
go over them again.
> (What's most alarming about the corruption is that it appears to extend
> beyond just the throwaway test filesystem: segfaults on bash and libc.so
> from the root filesystem. But no permanent damage done there.)
>
> One oddity I noticed in scrutinizing that commit, didn't help with
> the issues above, but there's a hunk in ext4_rename() which changes
> - old.dir->i_ctime = old.dir->i_mtime = current_time(old.dir);
> + old.dir->i_mtime = inode_set_ctime_current(old.inode);
>
That actually looks fine. We're just setting the in-memory inode
timestamp there. The problem you're having sounds more like something is
going wrong when storing the values to disk. I'll take a closer look.
Thanks!
--
Jeff Layton <jlayton@kernel.org>
next prev parent reply other threads:[~2023-07-18 10:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-18 3:43 linux-next ext4 inode size 128 corrupted Hugh Dickins
2023-07-18 10:32 ` Jeff Layton [this message]
2023-07-18 12:54 ` Jeff Layton
2023-07-18 18:03 ` Hugh Dickins
2023-07-18 18:27 ` Jeff Layton
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=3858cccced2de1b2407d9a03f6628eb4fb2cb0ab.camel@kernel.org \
--to=jlayton@kernel.org \
--cc=adilger.kernel@dilger.ca \
--cc=brauner@kernel.org \
--cc=hughd@google.com \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@mit.edu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).