[e2fsprogs] resize2fs 1.47.0 creates unclean orphan file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux