public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: Alexander Coffin <alex.coffin@maticrobots.com>
Cc: Jan Kara <jack@suse.com>,
	linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: PROBLEM: ext4 resize2fs on-line resizing panic
Date: Mon, 24 Jun 2024 11:26:58 -0400	[thread overview]
Message-ID: <20240624152658.GC280025@mit.edu> (raw)
In-Reply-To: <CA+hUFcuGs04JHZ_WzA1zGN57+ehL2qmHOt5a7RMpo+rv6Vyxtw@mail.gmail.com>

On Sun, Jun 23, 2024 at 06:57:13PM -0700, Alexander Coffin wrote:
> [1.] One line summary of the problem:
> Using resize2fs on-line resizing on a specific ext4 partition is
> causing an Oops.
> 
> 
> [6.] Output of Oops.. message (if applicable) with symbolic information
>      resolved (see Documentation/admin-guide/bug-hunting.rst)
> 
> ```
> [  445.552287] ------------[ cut here ]------------
> [  445.552300] kernel BUG at fs/jbd2/journal.c:846!

Thanks for the bug report.  The BUG_ON is from the following assert in
jbd2_journal_next_log_block:

	J_ASSERT(journal->j_free > 1);

and it indicates that we ran out of space in the journal.  There are
mechanisms to make sure that this should never happen, and if the
journal is too small and the transaction couldn't be broken up, then
the operation (whether it is a resize or a file truncate or some other
operation) should have errored out, and not triggered a BUG.

We'll need to investigate further how to address this, but a
short-term workaround is to simply to make the journal size larger.
It looks like this is a very small file system, and so mke2fs will by
default use a smaller journal so that the overhead of the journal
doesn't overwhelm the usuable space for that small file system.  This
can result in a performance degredation, but that was considered an
acceptable tradeoff rather than users getting annoyed that there very
small file system had an unaccepted file system overhead of say, 75%
of the usable space.  Very often these small file systems was on
crapola devices such as USB thumb drives, where performance was going
to be a diaster anyway.  :-)

In practice, people have generally not tried to resize small file
systems like this, which is why we hadn't run into this situation
earlier.

Cheers,

					- Ted

  parent reply	other threads:[~2024-06-24 15:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-24  1:57 PROBLEM: ext4 resize2fs on-line resizing panic Alexander Coffin
2024-06-24  2:03 ` Alexander Coffin
2024-06-24 15:26 ` Theodore Ts'o [this message]
2024-06-24 16:53   ` Jan Kara
2024-06-24 17:38     ` 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=20240624152658.GC280025@mit.edu \
    --to=tytso@mit.edu \
    --cc=alex.coffin@maticrobots.com \
    --cc=jack@suse.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@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