public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@kernel.org
To: linux-ext4@vger.kernel.org
Subject: [Bug 221007] New: Online ext4 defragmentation fails on 'inline' files (feature inline_data_
Date: Fri, 23 Jan 2026 12:13:05 +0000	[thread overview]
Message-ID: <bug-221007-13602@https.bugzilla.kernel.org/> (raw)

https://bugzilla.kernel.org/show_bug.cgi?id=221007

            Bug ID: 221007
           Summary: Online ext4 defragmentation fails on 'inline' files
                    (feature inline_data_
           Product: File System
           Version: 2.5
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: ext4
          Assignee: fs_ext4@kernel-bugs.osdl.org
          Reporter: deknuydt@esat.kuleuven.be
        Regression: No

Hi,

If one has an ext4 filesystem, with enabled feature flag 'inline_data', and
there are effectively inline files, then the e4defrag tool crashes with a
segfault. Bit exotic I admit, but we really use this...

How to reproduce:

----
> cd /tmp
> dd if=/dev/zero of=ext4.ima bs=1M count=10
> mkfs.ext4 ./ext4.ima 
> debugfs -w ./ext4.ima
debugfs 1.47.3 (8-Jul-2025)
debugfs:  feature inline_data
Filesystem features: has_journal ext_attr resize_inode dir_index orphan_file
filetype needs_recovery extent 64bit flex_bg metadata_csum_seed inline_data
sparse_super large_file huge_file dir_nlink extra_isize metadata_csum
orphan_present
debugfs:  q
> mount ./ext4.ima /mnt
> echo 'This is a very small file' > /mnt/smallfile.txt
> lsattr /mnt/smallfile.txt
------------------N--- /mnt/smallfile.txt
> # File is indeed inline
> e4defrag -c /mnt
e4defrag 1.47.3 (8-Jul-2025)
<Fragmented files>                             now/best       size/ext

 Total/best extents                             1/0
 Average size per extent                        0 KB
 Fragmentation score                            inf
 [0-30 no problem: 31-55 a little bit fragmented: 56- needs defrag]
 This directory (/mnt) needs defragmentation.
 Done.
> # Obviously wrong, but not problematic
> e4defrag  /mnt
e4defrag 1.47.3 (8-Jul-2025)
ext4 defragmentation for directory(/mnt)
Segmentation fault         (core dumped) e4defrag /mnt
> # Should not happen; occurs at first encounter of an inline file, always
---

e4defrag should totally ignore inline files, as they cannot be (de)fragmented.

Cheers, B.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

             reply	other threads:[~2026-01-23 12:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-23 12:13 bugzilla-daemon [this message]
2026-01-25 16:48 ` [Bug 221007] Online ext4 defragmentation fails on 'inline' files (feature inline_data_ bugzilla-daemon

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=bug-221007-13602@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@kernel.org \
    --cc=linux-ext4@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