Re: [PATCH] ext4: convert inline data to extents when truncate exceeds inline size

From: Deepanshu Kartikey

Date: Wed Feb 11 2026 - 20:18:29 EST


On Wed, Feb 11, 2026 at 9:16 PM Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:
>
> On Sat, Feb 07, 2026 at 10:06:07AM +0530, Deepanshu Kartikey wrote:
> > Without this fix, the following sequence causes a kernel BUG_ON():
> >
> > 1. Mount filesystem with inode that has inline flag set and small size
> > 2. truncate(file, 50MB) - grows size but inline flag remains set
> > 3. sendfile() attempts to write data
> > 4. ext4_write_inline_data() hits BUG_ON(write_size > inline_capacity)
>
> Can you wirte this up in an xfstests test, please?
>
I will write the test case and share the patch shortly.