Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package e2fsprogs for openSUSE:Factory 
checked in at 2026-11-07 23:32:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/e2fsprogs (Old)
 and      /work/SRC/openSUSE:Factory/.e2fsprogs.new.3759290 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "e2fsprogs"

Sat Nov  7 23:32:06 2026 rev:136 rq:1395604 version:1.47.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/e2fsprogs/e2fsprogs.changes      2026-10-22 
15:47:28.988035847 +0200
+++ /work/SRC/openSUSE:Factory/.e2fsprogs.new.3759290/e2fsprogs.changes 
2026-11-07 23:32:10.135446104 +0100
@@ -1,0 +2,14 @@
+Tue Nov  3 18:24:03 UTC 2026 - Avinesh Kumar <[email protected]>
+
+- Fix mke2fs creating wrongly sized orphan files since 1.47.4: the
+  kernel refused to mount e.g. a 1G filesystem made with 1k blocks
+  ("orphan file too big"), and filesystems with 2097152 blocks or
+  more (8G with the default 4k blocks) only got a 2 block orphan
+  file. Add two upstream patches:
+  * Revert-libext2fs-fix-orphan-file-size-kernel-limit.patch
+    (reverts the faulty orphan file sizing change of 1.47.4)
+  * libext2fs-cap-orphan-file-size-at-kernel-limit.patch (limits an
+    explicitly requested orphan file size to the kernel limit of
+    512 blocks)
+
+-------------------------------------------------------------------

New:
----
  Revert-libext2fs-fix-orphan-file-size-kernel-limit.patch
  libext2fs-cap-orphan-file-size-at-kernel-limit.patch

----------(New B)----------
  New:  file. Add two upstream patches:
  * Revert-libext2fs-fix-orphan-file-size-kernel-limit.patch
    (reverts the faulty orphan file sizing change of 1.47.4)
  New:    (reverts the faulty orphan file sizing change of 1.47.4)
  * libext2fs-cap-orphan-file-size-at-kernel-limit.patch (limits an
    explicitly requested orphan file size to the kernel limit of
----------(New E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ e2fsprogs.spec ++++++
--- /var/tmp/diff_new_pack.Rz94Mo/_old  2026-11-07 23:32:11.286493664 +0100
+++ /var/tmp/diff_new_pack.Rz94Mo/_new  2026-11-07 23:32:11.288493747 +0100
@@ -52,6 +52,10 @@
 Patch7:         harden_e2scrub_all.service.patch
 Patch8:         [email protected]
 Patch9:         harden_e2scrub_reap.service.patch
+# PATCH-FIX-UPSTREAM Revert-libext2fs-fix-orphan-file-size-kernel-limit.patch 
-- 782f43e3
+Patch10:        Revert-libext2fs-fix-orphan-file-size-kernel-limit.patch
+# PATCH-FIX-UPSTREAM libext2fs-cap-orphan-file-size-at-kernel-limit.patch -- 
a9f482e5
+Patch11:        libext2fs-cap-orphan-file-size-at-kernel-limit.patch
 BuildRequires:  pkgconfig
 BuildRequires:  xz
 BuildRequires:  pkgconfig(blkid)
@@ -212,6 +216,8 @@
 %patch -P 7 -p1
 %patch -P 8 -p1
 %patch -P 9 -p1
+%patch -P 10 -p1
+%patch -P 11 -p1
 
 %build
 %global _lto_cflags %{_lto_cflags} -ffat-lto-objects

++++++ Revert-libext2fs-fix-orphan-file-size-kernel-limit.patch ++++++
>From 782f43e32b58b37277f0ec6af405d5c45245b8c1 Mon Sep 17 00:00:00 2001
From: Theodore Ts'o <[email protected]>
Date: Thu, 12 Mar 2026 15:35:05 -0400
Subject: [PATCH] Revert "libext2fs: fix orphan file size > kernel limit with
 large blocksize"

This reverts commit 6f03c698ef53bb9d0cd42c9bd0b68e8ce72f8345.

    Due to missing parenthesis around the #defines for
    EXT4_{MAX,DEFAULT}_ORPHAN_FILE_SIZE, the default number of blocks
    assigned to the orphan file was calculated as 2 when the file system
    has more than 2**21 blocks:

       % mke2fs  -t ext4 -Fq /tmp/foo.img 8191M
       /tmp/foo.img contains a ext4 file system
               created on Wed Mar 11 09:54:04 2026
       % debugfs -R "extents <12>" /tmp/foo.img
       debugfs 1.47.4 (6-Mar-2025)
       Level Entries       Logical          Physical Length Flags
        0/ 0   1/  1     0 -   510    9255 -    9765    511

       % mke2fs  -t ext4 -Fq /tmp/foo.img 8192M
       /tmp/foo.img contains a ext4 file system
               created on Wed Mar 11 09:54:11 2026
       % debugfs -R "extents <12>" /tmp/foo.img
       debugfs 1.47.4 (6-Mar-2025)
       Level Entries       Logical          Physical Length Flags
        0/ 0   1/  1     0 -     1    9255 -    9256      2  <======

The problem addressed by the reverted commit will fixed via the next
commit.

Signed-off-by: Theodore Ts'o <[email protected]>

Git-repo: https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
Git-commit: 782f43e32b58b37277f0ec6af405d5c45245b8c1
Patch-mainline: Merged upstream (maint and master branches), not yet released
---
 lib/ext2fs/ext2fs.h |  2 --
 lib/ext2fs/orphan.c | 12 +++++-------
 2 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/lib/ext2fs/ext2fs.h b/lib/ext2fs/ext2fs.h
index d9df007c..bb2170b7 100644
--- a/lib/ext2fs/ext2fs.h
+++ b/lib/ext2fs/ext2fs.h
@@ -1819,8 +1819,6 @@ errcode_t ext2fs_set_data_io(ext2_filsys fs, io_channel 
new_io);
 errcode_t ext2fs_rewrite_to_io(ext2_filsys fs, io_channel new_io);
 
 /* orphan.c */
-#define EXT4_MAX_ORPHAN_FILE_SIZE      8 << 20
-#define EXT4_DEFAULT_ORPHAN_FILE_SIZE  2 << 20
 extern errcode_t ext2fs_create_orphan_file(ext2_filsys fs, blk_t num_blocks);
 extern errcode_t ext2fs_truncate_orphan_file(ext2_filsys fs);
 extern e2_blkcnt_t ext2fs_default_orphan_file_blocks(ext2_filsys fs);
diff --git a/lib/ext2fs/orphan.c b/lib/ext2fs/orphan.c
index 40b1c5c7..14ac3569 100644
--- a/lib/ext2fs/orphan.c
+++ b/lib/ext2fs/orphan.c
@@ -164,8 +164,6 @@ errcode_t ext2fs_create_orphan_file(ext2_filsys fs, blk_t 
num_blocks)
        memset(zerobuf, 0, fs->blocksize);
        ob_tail = ext2fs_orphan_block_tail(fs, buf);
        ob_tail->ob_magic = ext2fs_cpu_to_le32(EXT4_ORPHAN_BLOCK_MAGIC);
-       if (num_blocks * fs->blocksize > EXT4_MAX_ORPHAN_FILE_SIZE)
-               num_blocks = EXT4_MAX_ORPHAN_FILE_SIZE / fs->blocksize;
        oi.num_blocks = num_blocks;
        oi.alloc_blocks = 0;
        oi.last_blk = 0;
@@ -218,18 +216,18 @@ out:
 
 /*
  * Find reasonable size for orphan file. We choose orphan file size to be
- * between 32 filesystem blocks and EXT4_DEFAULT_ORPHAN_FILE_SIZE, and not
- * more than 1/fs->blocksize of the filesystem unless it is really small.
+ * between 32 and 512 filesystem blocks and not more than 1/4096 of the
+ * filesystem unless it is really small.
  */
 e2_blkcnt_t ext2fs_default_orphan_file_blocks(ext2_filsys fs)
 {
        __u64 num_blocks = ext2fs_blocks_count(fs->super);
-       e2_blkcnt_t blks = EXT4_DEFAULT_ORPHAN_FILE_SIZE / fs->blocksize;
+       e2_blkcnt_t blks = 512;
 
        if (num_blocks < 128 * 1024)
                blks = 32;
-       else if (num_blocks < EXT4_DEFAULT_ORPHAN_FILE_SIZE)
-               blks = num_blocks / fs->blocksize;
+       else if (num_blocks < 2 * 1024 * 1024)
+               blks = num_blocks / 4096;
        return (blks + EXT2FS_CLUSTER_MASK(fs)) & ~EXT2FS_CLUSTER_MASK(fs);
 }
 
-- 
2.55.0




++++++ libext2fs-cap-orphan-file-size-at-kernel-limit.patch ++++++
>From a9f482e55f3ca384226e76fceb15f274698cce93 Mon Sep 17 00:00:00 2001
From: Baokun Li <[email protected]>
Date: Thu, 20 Nov 2025 21:55:14 +0800
Subject: [PATCH] libext2fs: fix orphan file size > kernel limit with large
 blocksize
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Kernel commit 0a6ce20c1564 ("ext4: verify orphan file size is not too big")
limits the maximum supported orphan file size to 8 << 20.

However, in e2fsprogs, the orphan file size is set to 32–512 filesystem
blocks when creating a filesystem.

With 64k block size, formatting an ext4 fs >32G gives an orphan file bigger
than the kernel allows, so mount prints an error and fails:

    EXT4-fs (vdb): orphan file too big: 8650752
    EXT4-fs (vdb): mount failed

Thus, orphan file size is capped at 512 filesystem blocks in both e2fsprogs
and the kernel.

Signed-off-by: Baokun Li <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Signed-off-by: Theodore Ts'o <[email protected]>
Message-ID: <[email protected]>
Signed-off-by: Theodore Ts'o <[email protected]>

Git-repo: https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
Git-commit: a9f482e55f3ca384226e76fceb15f274698cce93
Patch-mainline: Merged upstream (maint and master branches), not yet released
---
 lib/ext2fs/orphan.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/ext2fs/orphan.c b/lib/ext2fs/orphan.c
index 14ac3569..0f1889cb 100644
--- a/lib/ext2fs/orphan.c
+++ b/lib/ext2fs/orphan.c
@@ -15,6 +15,8 @@
 #include "ext2_fs.h"
 #include "ext2fsP.h"
 
+#define EXT4_MAX_ORPHAN_FILE_BLOCKS 512
+
 errcode_t ext2fs_truncate_orphan_file(ext2_filsys fs)
 {
        struct ext2_inode inode;
@@ -129,6 +131,9 @@ errcode_t ext2fs_create_orphan_file(ext2_filsys fs, blk_t 
num_blocks)
        struct ext4_orphan_block_tail *ob_tail;
        time_t now;
 
+       if (num_blocks > EXT4_MAX_ORPHAN_FILE_BLOCKS)
+               num_blocks = EXT4_MAX_ORPHAN_FILE_BLOCKS;
+
        if (ino) {
                err = ext2fs_read_inode(fs, ino, &inode);
                if (err)
-- 
2.55.0

Reply via email to