From: "Theodore Tso" <tytso@mit.edu>
To: Daniel Tang <danielzgtg.opensource@gmail.com>
Cc: linux-ext4@vger.kernel.org, "Darrick J. Wong" <djwong@kernel.org>
Subject: Re: [PATCH e2fsprogs] e2fsck: preen inline data no attr
Date: Fri, 6 Mar 2026 10:51:08 -0500 [thread overview]
Message-ID: <20260306155108.GA19348@macsyma.local> (raw)
In-Reply-To: <3188418.mvXUDI8C0e@daniel-desktop3>
On Wed, Mar 04, 2026 at 08:56:37AM -0500, Daniel Tang wrote:
> I don't like being forcibly dropped into an emergency shell to truncate
> pidfiles and other temporary files every time my tablet uncleanly shuts
> down.
What version of the kernel and e2fsprogs are you running on your
tablet? And can you send us the output of running "dumpe2fs -h
/dev/DEVICE" on the file system in question?
This really shouldn't be happening; if the extended attribute is
missing while the inline data flag is set, that sounds like either a
kernel bug, or perhaps a problem with the storage device where writes
are not being properly persisted.
Is there anything about these inodes that you need to manually remove
or truncate? What are the inode timestamps, so we can see if they are
freshly created right about the time of the unclean shutdown? Or are
they files that might might have been much longer lived, in which case
this might be a sign of actual data loss.
Finally, it's interesting that you're getting dropped into an
emergency shell after every unclean shutdown. If that's because the
file system had some kind of file system inconsistency marked, then
there may be something else weird going on.
If it's just because there is a deleted inline_data file on the orphan
list, that shouldn't be an issue, and in fact, we can easily verify that:
kvm-xfstests shell
root@kvm-xfstests:~# mke2fs -t ext4 -Fq -O inline_data /dev/vdc 8M
root@kvm-xfstests:~# mount /dev/vdc /mnt
root@kvm-xfstests:~# echo foo > /mnt/foo
root@kvm-xfstests:~# cat >> /mnt/foo
^Z
[1]+ Stopped cat >> /mnt/foo
root@kvm-xfstests:~# rm /mnt/foo
root@kvm-xfstests:~# sync
root@kvm-xfstests:~# <Control-A> x
QEMU: terminated
We then restart the kernel, and take a quick look:
root@kvm-xfstests:~# dd if=/dev/vdc of=/tmp/test.img bs=1M count=8
8+0 records in
8+0 records out
8388608 bytes (8.4 MB, 8.0 MiB) copied, 0.0614913 s, 136 MB/s
root@kvm-xfstests:~# e2fsck /tmp/test.img
e2fsck 1.47.4-WIP (11-Nov-2025)
/tmp/test.img: recovering journal
Clearing orphaned inode 13 (uid=0, gid=0, mode=0100644, size=4)
Setting free inodes count to 2036 (was 2037)
/tmp/test.img: clean, 12/2048 files, 1649/8192 blocks
root@kvm-xfstests:~# debugfs /dev/vdc
debugfs 1.47.4-WIP (11-Nov-2025)
debugfs: stat <13>
Inode: 13 Type: regular Mode: 0644 Flags: 0x10000000
Generation: 2671039161 Version: 0x00000000:00000001
User: 0 Group: 0 Project: 0 Size: 4
File ACL: 0
Links: 0 Blockcount: 0
Fragment: Address: 0 Number: 0 Size: 0
ctime: 0x69aaf6ce:a04cc190 -- Fri Mar 6 10:46:22 2026
atime: 0x69aaf6ca:0edd508c -- Fri Mar 6 10:46:18 2026
mtime: 0x69aaf6ca:0edd508c -- Fri Mar 6 10:46:18 2026
crtime: 0x69aaf6ca:0edd508c -- Fri Mar 6 10:46:18 2026
Size of extra inode fields: 32
Extended attributes:
system.data (0)
Inode checksum: 0x14853e18
Size of inline data: 60
debugfs:
So this is how things *should* work. I'm curious why it's apparently
not working this way on your tablet.
- Ted
next prev parent reply other threads:[~2026-03-06 15:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-04 13:56 [PATCH e2fsprogs] e2fsck: preen inline data no attr Daniel Tang
2026-03-06 11:16 ` Andreas Dilger
2026-03-06 15:51 ` Theodore Tso [this message]
2026-03-06 18:03 ` Daniel Tang
2026-03-06 22:23 ` Theodore Tso
2026-03-08 1:42 ` Daniel Tang
2026-03-08 5:04 ` Theodore Tso
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=20260306155108.GA19348@macsyma.local \
--to=tytso@mit.edu \
--cc=danielzgtg.opensource@gmail.com \
--cc=djwong@kernel.org \
--cc=linux-ext4@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox