From: Theodore Ts'o <tytso@mit.edu>
To: Jan Kara <jack@suse.cz>
Cc: Dave Chinner <david@fromorbit.com>,
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: Sun, 31 Jul 2016 23:09:09 -0400 [thread overview]
Message-ID: <20160801030909.GD12853@thunk.org> (raw)
In-Reply-To: <20160729064210.GA3611@quack2.suse.cz>
On Fri, Jul 29, 2016 at 08:42:10AM +0200, Jan Kara wrote:
>
> I have written some fixes, working on testing them... So hopefully I can
> submit them later today or next week.
How complicated are the fixes? This should work as a temporary
workaround and it going to be very simple to backport.
- Ted
commit e92d5b1cf6af642bc5018562e58044fd771f82bf
Author: Theodore Ts'o <tytso@mit.edu>
Date: Sun Jul 31 23:08:28 2016 -0400
ext4: suppress inode growth for file systems w/o project quota
We have not added a new "extra" inode field in a very long time, and
the code to deal with moving the extended attributes down to make room
for the extra inode fields has bitrotted and can cause kernel BUGS.
Very few people will likely use project quotas (and those that do will
likely be creating a new file system from scratch) so as a temporary
pallative until we are sure the inode expansion code is all sane,
let's not try to expand the inode "extra" fields if the project
feature has not been enabled.
Cc: stable@vger.kernel.org # v4.4+
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index c13a4e4..e2622ba 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -3968,6 +3968,17 @@ no_journal:
if (sbi->s_inode_size > EXT4_GOOD_OLD_INODE_SIZE) {
sbi->s_want_extra_isize = sizeof(struct ext4_inode) -
EXT4_GOOD_OLD_INODE_SIZE;
+ /*
+ * This is a temporary hack; we have not added a new
+ * "extra" inode field in a long time, and the code to
+ * expand the inode structure has bitrotted and can
+ * cause kernel BUG's. If the file system does not
+ * have the project feature, let's not try to expand
+ * the inode's extra size as a temporary pallitive
+ * until we can fix up the inode expansion code.
+ */
+ if (!ext4_has_feature_project(sb))
+ sbi->s_want_extra_isize -= sizeof(__le32);
if (ext4_has_feature_extra_isize(sb)) {
if (sbi->s_want_extra_isize <
le16_to_cpu(es->s_want_extra_isize))
next prev parent reply other threads:[~2016-08-01 3:09 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
2016-07-29 0:21 ` Dave Chinner
2016-07-29 6:42 ` Jan Kara
2016-08-01 3:09 ` Theodore Ts'o [this message]
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=20160801030909.GD12853@thunk.org \
--to=tytso@mit.edu \
--cc=david@fromorbit.com \
--cc=jack@suse.cz \
--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).