From: Jan Kara <jack@suse.cz>
To: Dave Chinner <david@fromorbit.com>
Cc: Eric Sandeen <sandeen@redhat.com>, linux-ext4@vger.kernel.org
Subject: Re: [4.7-rc6 ext3 BUG] kernel BUG at fs/ext4/xattr.c:1331
Date: Thu, 28 Jul 2016 15:54:32 +0200 [thread overview]
Message-ID: <20160728135432.GA19398@quack2.suse.cz> (raw)
In-Reply-To: <20160718052447.GE1922@dastard>
On Mon 18-07-16 15:24:47, Dave Chinner wrote:
> On Sun, Jul 17, 2016 at 09:07:16PM -0700, Eric Sandeen wrote:
> > On 7/17/16 8:02 PM, Dave Chinner wrote:
> > > # rm !$
> > > rm /mnt/scratch/fsr_test_file.27768.14.6
> > > #
> > >
> > > And, by removing an attribute, I can successfully remove the file.
> > > So this definitely looks like a corner case xattr handling issue in
> > > ext3/4.
> >
> > I told xfs/227 that it could run on ext3 and ran it, but this
> > didn't reproduce for me.
> >
> > Can you provide a dumpe2fs -h for the root fs, this might depend on
> > inode size etc.
>
> # dumpe2fs -h /dev/sda1
> dumpe2fs 1.43-WIP (18-May-2015)
> Filesystem volume name: <none>
> Last mounted on: /
> Filesystem UUID: b21615e5-fe8a-4ffc-ab80-c24cdc8b740a
> Filesystem magic number: 0xEF53
> Filesystem revision #: 1 (dynamic)
> Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery sparse_super large_file
> Filesystem flags: signed_directory_hash
> Default mount options: (none)
> Filesystem state: clean
> Errors behavior: Continue
> Filesystem OS type: Linux
> Inode count: 624624
> Block count: 2496091
> Reserved block count: 124804
> Free blocks: 567319
> Free inodes: 352653
> First block: 0
> Block size: 4096
> Fragment size: 4096
> Reserved GDT blocks: 609
> Blocks per group: 32768
> Fragments per group: 32768
> Inodes per group: 8112
> Inode blocks per group: 507
> Filesystem created: Thu Mar 25 18:10:55 2010
> Last mount time: Tue Jul 19 01:21:57 2016
> Last write time: Tue Jul 19 01:21:57 2016
> Mount count: 10
> Maximum mount count: 27
> Last checked: Mon Jul 18 21:59:01 2016
> Check interval: 15552000 (6 months)
> Next check after: Sat Jan 14 22:59:01 2017
> Lifetime writes: 13 GB
> Reserved blocks uid: 0 (user root)
> Reserved blocks gid: 0 (group root)
> First inode: 11
> Inode size: 256
> Required extra isize: 28
> Desired extra isize: 28
> Journal inode: 8
> First orphan inode: 219355
> Default directory hash: half_md4
> Directory Hash Seed: 740ffa95-af8d-4e89-b68c-5e768a27ece3
> Journal backup: inode blocks
> Journal features: journal_incompat_revoke
> Journal size: 128M
> Journal length: 32768
> Journal sequence: 0x01c975b5
> Journal start: 12
Thanks for report! So I see at least part of what happened: Your filesystem
was created with 'extra inode size' 28 and likely your inodes were created
with this amount of space reserved in the extended attribute area of the
inode because you still created them with some older kernel (but that means
that it had to be a kernel prior to commit 8b4953e13f4c which landed in
4.4-rc5 because newer kernels would automatically reserve 32-bytes in the
inode, not 28 as specified by the superblock).
The above mentioned commit has added project ID to the inode so new kernels
now ask for 32 bytes in the extended attribute area. So when you tried to
modify the inode with newer kernel, we were trying to shift extended
attributes around to make space for those additional 4 bytes. So that makes
it clear why Eric was not able to reproduce the issue.
I've tried creating file with an old kernel and deleting it with a new one
and the bugon indeed triggers. Going through ext4_expand_extra_isize_ea() I
see so many bugs that it's not nice. I guess we should add some inode size
expansion tests...
Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
next prev parent reply other threads:[~2016-07-28 13:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-18 2:23 [4.7-rc6 ext3 BUG] kernel BUG at fs/ext4/xattr.c:1331 Dave Chinner
2016-07-18 3:02 ` Dave Chinner
2016-07-18 4:07 ` Eric Sandeen
2016-07-18 5:24 ` Dave Chinner
2016-07-28 13:54 ` Jan Kara [this message]
2016-07-29 0:21 ` Dave Chinner
2016-07-29 6:42 ` Jan Kara
2016-08-01 3:09 ` Theodore Ts'o
2016-08-01 12:19 ` Jan Kara
2016-08-01 13:09 ` Theodore Ts'o
2016-08-04 16:18 ` Jan Kara
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=20160728135432.GA19398@quack2.suse.cz \
--to=jack@suse.cz \
--cc=david@fromorbit.com \
--cc=linux-ext4@vger.kernel.org \
--cc=sandeen@redhat.com \
/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).