linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthias Reichl <hias@horus.com>
To: Theodore Ts'o <tytso@mit.edu>
Cc: linux-ext4@vger.kernel.org, hias@horus.com
Subject: [e2fsprogs] resize2fs 1.47.0 creates unclean orphan file
Date: Wed, 17 Jan 2024 14:34:35 +0100	[thread overview]
Message-ID: <ZafXawnqlO7OvG1k@camel3.lan> (raw)

When resizing a 32 MiB ext4 filesystem that was created with the
orphan_file option to something larger than 32GiB the resulting
filesystem has an unclean orphan file block.

I initially ran into this issue with e2fsprogs 1.47.0 on aarch64
but could also reproduce it with current e2fsprogs master
(githash 260dfea450e387cbd2c8de79a7c2eeacc26f74e9) and e2fsprogs
1.47.0 from Debian Bookworm (the latter needs -O orphan_file as
Debian disabled that option by default) on x86_64.

resize2fs works fine if the target filesystem size is smaller than
32GiB (tested with 30GiB) or if the ext4 filesystem was created without
the orphan_file option.

Steps to reproduce:

$ ./configure --with-root-prefix=/usr/local
$ make
$ truncate -s 32MiB fs
$ ./misc/mke2fs -t ext4 -m 0 fs
$ truncate -s 33GiB fs
$ ./e2fsck/e2fsck -f -n fs
e2fsck 1.47.0 (5-Feb-2023)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
fs: 12/8192 files (0.0% non-contiguous), 6970/32768 blocks
$ ./resize/resize2fs fs
resize2fs 1.47.0 (5-Feb-2023)
Resizing the filesystem on fs to 34603008 (1k) blocks.
The filesystem on fs is now 34603008 (1k) blocks long.

$ ./e2fsck/e2fsck -f -n fs
e2fsck 1.47.0 (5-Feb-2023)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Orphan file (inode 12) block 2 is not clean.
Clear? no

Failed to initialize orphan file.
Recreate? no


fs: ********** WARNING: Filesystem still has errors **********

fs: 12/8650752 files (16.7% non-contiguous), 2180049/34603008 blocks


so long,

Hias

                 reply	other threads:[~2024-01-17 13:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=ZafXawnqlO7OvG1k@camel3.lan \
    --to=hias@horus.com \
    --cc=linux-ext4@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).