Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2194186/?format=api
{ "id": 2194186, "url": "http://patchwork.ozlabs.org/api/patches/2194186/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260207043607.1175976-1-kartikey406@gmail.com/", "project": { "id": 8, "url": "http://patchwork.ozlabs.org/api/projects/8/?format=api", "name": "Linux ext4 filesystem development", "link_name": "linux-ext4", "list_id": "linux-ext4.vger.kernel.org", "list_email": "linux-ext4@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260207043607.1175976-1-kartikey406@gmail.com>", "list_archive_url": null, "date": "2026-02-07T04:36:07", "name": "ext4: convert inline data to extents when truncate exceeds inline size", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "0e39d1f9b4507dc19d5a5ab12717335681d6eb70", "submitter": { "id": 91725, "url": "http://patchwork.ozlabs.org/api/people/91725/?format=api", "name": "Deepanshu Kartikey", "email": "kartikey406@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260207043607.1175976-1-kartikey406@gmail.com/mbox/", "series": [ { "id": 491361, "url": "http://patchwork.ozlabs.org/api/series/491361/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/list/?series=491361", "date": "2026-02-07T04:36:07", "name": "ext4: convert inline data to extents when truncate exceeds inline size", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/491361/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2194186/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2194186/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <SRS0=kfS3=AL=vger.kernel.org=linux-ext4+bounces-13614-patchwork-incoming=ozlabs.org@ozlabs.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "linux-ext4@vger.kernel.org" ], "Delivered-To": [ "patchwork-incoming@legolas.ozlabs.org", "patchwork-incoming@ozlabs.org" ], "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20230601 header.b=RdD91u52;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.org\n (client-ip=2404:9400:2221:ea00::3; helo=mail.ozlabs.org;\n envelope-from=srs0=kfs3=al=vger.kernel.org=linux-ext4+bounces-13614-patchwork-incoming=ozlabs.org@ozlabs.org;\n receiver=patchwork.ozlabs.org)", "gandalf.ozlabs.org;\n arc=pass smtp.remote-ip=\"2600:3c04:e001:36c::12fc:5321\"\n arc.chain=subspace.kernel.org", "gandalf.ozlabs.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com", "gandalf.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20230601 header.b=RdD91u52;\n\tdkim-atps=neutral", "gandalf.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=linux-ext4+bounces-13614-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=\"RdD91u52\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.216.44", "smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com", "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=gmail.com" ], "Received": [ "from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4f7J7Y3t2Xz1xvD\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 07 Feb 2026 15:36:25 +1100 (AEDT)", "from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])\n\tby gandalf.ozlabs.org (Postfix) with ESMTP id 4f7J7Y3F12z4w0H\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 07 Feb 2026 15:36:25 +1100 (AEDT)", "by gandalf.ozlabs.org (Postfix)\n\tid 4f7J7Y2nKfz4wCx; Sat, 07 Feb 2026 15:36:25 +1100 (AEDT)", "from tor.lore.kernel.org (tor.lore.kernel.org\n [IPv6:2600:3c04:e001:36c::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby gandalf.ozlabs.org (Postfix) with ESMTPS id 4f7J7T08bJz4w0H\n\tfor <patchwork-incoming@ozlabs.org>; Sat, 07 Feb 2026 15:36:20 +1100 (AEDT)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id 230CD30164A4\n\tfor <patchwork-incoming@ozlabs.org>; Sat, 7 Feb 2026 04:36:19 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id CB1D52D7D47;\n\tSat, 7 Feb 2026 04:36:15 +0000 (UTC)", "from mail-pj1-f44.google.com (mail-pj1-f44.google.com\n [209.85.216.44])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 7AF462C3251\n\tfor <linux-ext4@vger.kernel.org>; Sat, 7 Feb 2026 04:36:15 +0000 (UTC)", "by mail-pj1-f44.google.com with SMTP id\n 98e67ed59e1d1-3530e7b3dc2so2379923a91.3\n for <linux-ext4@vger.kernel.org>;\n Fri, 06 Feb 2026 20:36:15 -0800 (PST)", "from deepanshu-kernel-hacker..\n ([2405:201:682f:389d:7e49:7e31:b8c9:621a])\n by smtp.gmail.com with ESMTPSA id\n 98e67ed59e1d1-354c02a7ad6sm1011537a91.2.2026.02.06.20.36.11\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 06 Feb 2026 20:36:14 -0800 (PST)" ], "ARC-Seal": [ "i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1770438985; cv=pass;\n\tb=KS/4N3YaMKBBb3Mm4NIbcOSi+AoORj2tF3naiid4v436kgOYyluMFbJ50zVH7kQzrRvm4IosyLOnBOnk2ZrsEibIVyBqS/VMrtFbJqDxLjxBB8MpHH75WJdtey40ooR58DgBcnSldACu4vLMvxveBmYCykZXCOc5pOHJ6uFOD9yNnDnG5fPVJyw2TirfEaJcPG+SXblBQHAofSQy3tP2vqPlmVrMd4mJt8w7JiAAmkjvrUOWEVvnCUpm2DgyqJ5UG/54GqiWiBAFRCUn8sTnSwiFtOC06dPpCCDbDxyzp0+Mx1f6ghcL13UGjAbi5so3QRQzhDLK6OWbk08vgz66Yg==", "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1770438975; cv=none;\n b=ZwY8iUtuIrfTYehtqJiqkqPG61UZUG2291u92NR4XeO0c9tFFTXB7FfkqxSHx6YY9ENQmu3cG+EZOxbdI5u1OcoByjV8R0lXuVZ5rS8peD8CXld/1ttkB6t9XO/VmGnjGdf/SXwfhmYBFmAZOeHYyNGKeYPz6Ip0b5EFOHePALI=" ], "ARC-Message-Signature": [ "i=2; a=rsa-sha256; d=ozlabs.org; s=201707;\n\tt=1770438985; c=relaxed/relaxed;\n\tbh=u6l+ANQIq478T27+r1YavztrZap8Og8nO5Z+UVtAbxQ=;\n\th=From:To:Cc:Subject:Date:Message-ID:MIME-Version;\n b=qeoZK7KI9t5GCQ06jwSkyoofIKc0TCvToO457uM3Q90INWf2Q0HdhDqC+EK9AH53NH02c6VgUbPoJ0x36ZOaC938tYSx9JfXTThgUPZcWsgV57S4X41gec34feI2oFZ8fhtpTws4kbQrOcStlvJ/uccU4EXHVDzBf4QsB28oCeDs5c0LeAKaYPRywO0kEWsrJAJImXKKnHepRru742Avxgh8FhMrJYH7Mw+16+grCdTSYZpEymsknhJ0VwnKUW2itVVtm8hB7nGLt4DHMw2ELxtqb0dNHFme4nDKoUWoiraepO7MlmSjn+VC7gJMLlaSyVKa72XTWJhRC6066OTO5A==", "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1770438975; c=relaxed/simple;\n\tbh=LOu565aMnPMalQFcSP7BM4GVOKkia4TKLD4EhGhjiTc=;\n\th=From:To:Cc:Subject:Date:Message-ID:MIME-Version;\n b=c5cNY/8Iz7yk4X2zj8RP7jMItrUGBuQS77A8oq9Rg1nKPysm2oXn0a+z+/5rOqX/tJGrCRN23fLrTuCm7TKHca08sCNwJbZ7vEoIe9PohXJ0atf3F6+Mc0pL8V5AMyLOwsS2PLNeaR+dWW13Xm6kbYxwiV5uk0QBWc39hk0jOiM=" ], "ARC-Authentication-Results": [ "i=2; gandalf.ozlabs.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com; dkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20230601 header.b=RdD91u52; dkim-atps=neutral;\n spf=pass (client-ip=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=linux-ext4+bounces-13614-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org) smtp.mailfrom=vger.kernel.org", "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com;\n spf=pass smtp.mailfrom=gmail.com;\n dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=RdD91u52; arc=none smtp.client-ip=209.85.216.44" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20230601; t=1770438975; x=1771043775;\n darn=vger.kernel.org;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:from:to:cc:subject:date:message-id:reply-to;\n bh=u6l+ANQIq478T27+r1YavztrZap8Og8nO5Z+UVtAbxQ=;\n b=RdD91u52+o7laG2vt5S7yErCUvgqEW17oS2gjhdVjgUZms7YRVod3kJ91Lruj3a9xR\n LJmelpPhLgC7fjvQr8XDYjS9EDl+uM26+95mTqOfw2ouzgSQ/gX4R0zrhiXcRVe2b3KN\n CHrScDT9CEw+IwuByYK47W/YbSbdJ9i3VZlBuxzw/sVMbwyRuS+BvlfTiLSgoP7DL7f/\n 31AzXnRoIj8/6GEv3qTl5KAI5K+13iG27o4G1EHdhbUTydOKevmdrHv6WWq0YYq25uLR\n SpkcBfP7N4Wj1P0rvXIFv7ZIxPy/vayV6L7VYQh7u3JRqcnTVD+LIcw94jnfoUxXOCLS\n w2fw==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1770438975; x=1771043775;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to;\n bh=u6l+ANQIq478T27+r1YavztrZap8Og8nO5Z+UVtAbxQ=;\n b=NW6ou1BsbJE5Tsajol1r/t2NOMStob9oDgWe+xTs9Y5qVznZ5yJRqGCGcUxHVDMjdn\n hWfyIUU4Yfs/Pt7PvGlFL7ayTwavV1LijT/8ld+L7J5cyT4799STnWsunS52gfHCr1W7\n zj5MZ728/G4DyBrAs/BTIAwQf25JzptkZ2GsVYFYUFbKT6/cxPXRnze4hiZLf/6IzQIo\n 7/eCicIw4bruGLE+QqI/XSvpfigomQoBCSN/MOgEsTA6vqB53r9y+QeY8Kh1mD9NYzlV\n ybiPv+aOeYvtHB5g9OoLTy8dvnGpq9/RD5E7zCmCIBs5OZqPEQnd/G9AEjInw/+U2vEi\n FOcQ==", "X-Gm-Message-State": "AOJu0YxAMKatVTd6tCJ4AYP5SvzXyCGGRsWZ/061anVO1MKLFB3vsqRi\n\tSRVWYEKt5mbuAd6qqQtyuVi0en46aKg9pvBQOpzcRc/ya2cXivAyAbNr", "X-Gm-Gg": "AZuq6aI2EYaV/scour6xdZTA63fSmEx8CElHBER7l8CCmRgvImKMpsLJQ9Js9NGW7cL\n\tazDZDtWCkpywsa98vScSPseM82O82z0/lFbUy5UTez4sz/PepINvXUSlYsMtmRRhXqscXpSgSFA\n\tsD306pisjiSddg4g1WVsvv1KNf9sayXnibjnAiWWmknOsBivns3HwnSz75fjpjnzdFqT16pU1c1\n\tCMG+hOgVwVrYbq9qSdizGo0O9Tl/h8VWJWCuJ00DXFk06QT6rHESWqoy9QcViuiFk1yelxX7E/U\n\te66qkcU2YxRg1akpEKnQNecudqkm7Bt+EIWFCNde0oe8pa/4c0bdsGN1UBZRMbnut4lNqTwsXv2\n\tVlxU5CRPXHu7HjtpKPlDIhJXZjfR9+H3C/LXLBcCLon3KxYcgkxHQjahhAbz9bhyklgeWY2dElg\n\tZUmBj4e4NRDdn7sXBjVHvbmrG6+M/PTUBLGGGzeTHiGuhRcvhcByVq0wksLNekNI8BxdI=", "X-Received": "by 2002:a17:90b:5348:b0:34a:b4a2:f0c8 with SMTP id\n 98e67ed59e1d1-354b3e5c2f9mr3893129a91.30.1770438974808;\n Fri, 06 Feb 2026 20:36:14 -0800 (PST)", "From": "Deepanshu Kartikey <kartikey406@gmail.com>", "To": "tytso@mit.edu,\n\tadilger.kernel@dilger.ca", "Cc": "linux-ext4@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org,\n\tDeepanshu Kartikey <kartikey406@gmail.com>,\n\tsyzbot+7de5fe447862fc37576f@syzkaller.appspotmail.com,\n\tDeepanshu Kartikey <Kartikey406@gmail.com>", "Subject": "[PATCH] ext4: convert inline data to extents when truncate exceeds\n inline size", "Date": "Sat, 7 Feb 2026 10:06:07 +0530", "Message-ID": "<20260207043607.1175976-1-kartikey406@gmail.com>", "X-Mailer": "git-send-email 2.43.0", "Precedence": "bulk", "X-Mailing-List": "linux-ext4@vger.kernel.org", "List-Id": "<linux-ext4.vger.kernel.org>", "List-Subscribe": "<mailto:linux-ext4+subscribe@vger.kernel.org>", "List-Unsubscribe": "<mailto:linux-ext4+unsubscribe@vger.kernel.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-Spam-Status": "No, score=-1.2 required=5.0 tests=ARC_SIGNED,ARC_VALID,\n\tDKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DMARC_PASS,\n\tFREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,\n\tMAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=disabled\n\tversion=4.0.1", "X-Spam-Checker-Version": "SpamAssassin 4.0.1 (2024-03-25) on gandalf.ozlabs.org" }, "content": "Add a check in ext4_setattr() to convert files from inline data storage\nto extent-based storage when truncate() grows the file size beyond the\ninline capacity. This prevents the filesystem from entering an\ninconsistent state where the inline data flag is set but the file size\nexceeds what can be stored inline.\n\nWithout this fix, the following sequence causes a kernel BUG_ON():\n\n1. Mount filesystem with inode that has inline flag set and small size\n2. truncate(file, 50MB) - grows size but inline flag remains set\n3. sendfile() attempts to write data\n4. ext4_write_inline_data() hits BUG_ON(write_size > inline_capacity)\n\nThe crash occurs because ext4_write_inline_data() expects inline storage\nto accommodate the write, but the actual inline capacity (~60 bytes for\ni_block + ~96 bytes for xattrs) is far smaller than the file size and\nwrite request.\n\nThe fix checks if the new size from setattr exceeds the inode's actual\ninline capacity (EXT4_I(inode)->i_inline_size) and converts the file to\nextent-based storage before proceeding with the size change.\n\nThis addresses the root cause by ensuring the inline data flag and file\nsize remain consistent during truncate operations.\n\nReported-by: syzbot+7de5fe447862fc37576f@syzkaller.appspotmail.com\nCloses: https://syzkaller.appspot.com/bug?extid=7de5fe447862fc37576f\nTested-by: syzbot+7de5fe447862fc37576f@syzkaller.appspotmail.com\nSigned-off-by: Deepanshu Kartikey <Kartikey406@gmail.com>\n---\n fs/ext4/inode.c | 12 ++++++++++++\n 1 file changed, 12 insertions(+)", "diff": "diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c\nindex 0c466ccbed69..c3dc0422ff95 100644\n--- a/fs/ext4/inode.c\n+++ b/fs/ext4/inode.c\n@@ -5901,6 +5901,18 @@ int ext4_setattr(struct mnt_idmap *idmap, struct dentry *dentry,\n \t\tif (attr->ia_size == inode->i_size)\n \t\t\tinc_ivers = false;\n \n+\t\t/*\n+\t\t * If file has inline data but new size exceeds inline capacity,\n+\t\t * convert to extent-based storage first to prevent inconsistent\n+\t\t * state (inline flag set but size exceeds inline capacity).\n+\t\t */\n+\t\tif (ext4_has_inline_data(inode) &&\n+\t\t attr->ia_size > EXT4_I(inode)->i_inline_size) {\n+\t\t\terror = ext4_convert_inline_data(inode);\n+\t\t\tif (error)\n+\t\t\t\tgoto err_out;\n+\t\t}\n+\n \t\tif (shrink) {\n \t\t\tif (ext4_should_order_data(inode)) {\n \t\t\t\terror = ext4_begin_ordered_truncate(inode,\n", "prefixes": [] }