All of lore.kernel.org
 help / color / mirror / Atom feed
* [e2fsprogs] resize2fs 1.47.0 creates unclean orphan file
@ 2024-01-17 13:34 Matthias Reichl
  0 siblings, 0 replies; only message in thread
From: Matthias Reichl @ 2024-01-17 13:34 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: linux-ext4, hias

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-17 13:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-17 13:34 [e2fsprogs] resize2fs 1.47.0 creates unclean orphan file Matthias Reichl

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.