Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/2223447/?format=api
{ "id": 2223447, "url": "http://patchwork.ozlabs.org/api/1.2/patches/2223447/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260415105505.342358-4-yebin@huaweicloud.com/", "project": { "id": 8, "url": "http://patchwork.ozlabs.org/api/1.2/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": "<20260415105505.342358-4-yebin@huaweicloud.com>", "list_archive_url": null, "date": "2026-04-15T10:55:04", "name": "[v2,3/4] ext4: show inode orphan list detail information", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "9ed8d375f812edb39f28ba8af19de9e090811e3b", "submitter": { "id": 85089, "url": "http://patchwork.ozlabs.org/api/1.2/people/85089/?format=api", "name": "Ye Bin", "email": "yebin@huaweicloud.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260415105505.342358-4-yebin@huaweicloud.com/mbox/", "series": [ { "id": 499966, "url": "http://patchwork.ozlabs.org/api/1.2/series/499966/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/list/?series=499966", "date": "2026-04-15T10:55:03", "name": "show orphan file inode detail info", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/499966/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2223447/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2223447/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <SRS0=MzSY=CO=vger.kernel.org=linux-ext4+bounces-15845-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 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=mzsy=co=vger.kernel.org=linux-ext4+bounces-15845-patchwork-incoming=ozlabs.org@ozlabs.org;\n receiver=patchwork.ozlabs.org)", "gandalf.ozlabs.org;\n arc=pass smtp.remote-ip=172.234.253.10 arc.chain=subspace.kernel.org", "gandalf.ozlabs.org;\n dmarc=none (p=none dis=none) header.from=huaweicloud.com", "gandalf.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.234.253.10; helo=sea.lore.kernel.org;\n envelope-from=linux-ext4+bounces-15845-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org)", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=45.249.212.51", "smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=huaweicloud.com", "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=huaweicloud.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 4fwdSD3kwJz1yHM\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 15 Apr 2026 20:59:08 +1000 (AEST)", "from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])\n\tby gandalf.ozlabs.org (Postfix) with ESMTP id 4fwdSD3DZCz4w1W\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 15 Apr 2026 20:59:08 +1000 (AEST)", "by gandalf.ozlabs.org (Postfix)\n\tid 4fwdSD38Gfz4wCG; Wed, 15 Apr 2026 20:59:08 +1000 (AEST)", "from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])\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 4fwdS9067Zz4w1W\n\tfor <patchwork-incoming@ozlabs.org>; Wed, 15 Apr 2026 20:59:04 +1000 (AEST)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id D3630309B0AC\n\tfor <patchwork-incoming@ozlabs.org>; Wed, 15 Apr 2026 10:57:48 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 7CC6C34BA24;\n\tWed, 15 Apr 2026 10:57:48 +0000 (UTC)", "from dggsgout11.his.huawei.com (dggsgout11.his.huawei.com\n [45.249.212.51])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id AA8933491D0\n\tfor <linux-ext4@vger.kernel.org>; Wed, 15 Apr 2026 10:57:45 +0000 (UTC)", "from mail.maildlp.com (unknown [172.19.163.198])\n\tby dggsgout11.his.huawei.com (SkyGuard) with ESMTPS id 4fwdPb64gCzYQtpY\n\tfor <linux-ext4@vger.kernel.org>; Wed, 15 Apr 2026 18:56:51 +0800 (CST)", "from mail02.huawei.com (unknown [10.116.40.252])\n\tby mail.maildlp.com (Postfix) with ESMTP id BD7DC40577\n\tfor <linux-ext4@vger.kernel.org>; Wed, 15 Apr 2026 18:57:37 +0800 (CST)", "from huaweicloud.com (unknown [10.50.87.132])\n\tby APP3 (Coremail) with SMTP id _Ch0CgAHtL0fb99pbf70AQ--.45727S7;\n\tWed, 15 Apr 2026 18:57:37 +0800 (CST)" ], "ARC-Seal": [ "i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1776250748; cv=pass;\n\tb=oWKjCPQUbhuMUKOktekG6eoK/Mo/cNY9nvxJ9Kdj5xkiaDEmdIvCW4zn3p/HHUBn1xgxSPAYBJJqWZhRHL/zCEzvd/LBleQFubtA07DCT4VbBNneBb/eF1766e/e3xUxvJcQnjjmoIuqJG+tbtYu2qiXTrn9Fa4nZ9yg/qx2phSMhH+ErXBrPZMNRafGlkQ2QDvxTaeGI0vbx4ukWetNakkdua4SbVMt/wr8f03ygdgz7pp5gEdXudAA8JTYX+3k6vyAbCi2Ixsd8faHIwzIIxRpw2FnAUe+M50sTDWmyz7ipWWcKUb6GP0tkd18EYwNJ3dBD/XuFkDIxIAiNFN1PQ==", "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776250668; cv=none;\n b=DK9nv+1qYjKV5Hr+LxSgW6ZWr6WOJaP2kHU84b0uewX8TnxfnaZvKNu6Lkmkmj1tRH6/Va8bhbqboL9cF8wqoxxhcCM/LZEFIPlxvfSC4unBJX6qMOHGOjN8WEkXwx8QQLQKF1lCI8c5ZjR+aLEtod5Mql37yFJAJuzztYcgOuw=" ], "ARC-Message-Signature": [ "i=2; a=rsa-sha256; d=ozlabs.org; s=201707;\n\tt=1776250748; c=relaxed/relaxed;\n\tbh=us3E74Hz8hlSSnlQylWqcLJXbeOIPdGtlIDANAWtuFQ=;\n\th=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:\n\t MIME-Version;\n b=o13XOaii7Qjlxe71Q1yc9A8pkTKPQbpUWzKrdgsOM7EgDKDE0a59RZ97ASq81v4SU9FoNsic2zOxXa/k4znCuNwQMdoy63imLCiaThrVtJxO3De5hG7FvQ6stO/yGEjfQyM+xWlXKoN1RvL64iyBs2tRdLXf+Zd3gKOE7vosVEMjelE0X4viWnrjPmdr5tOHoeacO+B3wNob66PXg0om6H6sItcDrY8QwV2QRu07RphH4kSaxDLxt1X8qbapiOTD/P3WZN4JMC8K0G3tP8NOdujVfJkSwTcAbgBjJse5Gwp2/nsYH8st/7XLoYxypJUN0jqELnxPjWkvKaYgRfPvlg==", "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776250668; c=relaxed/simple;\n\tbh=K3gW/q82FCk0AlfMaNRJQvvnTld23QVn0QVTztoK/M8=;\n\th=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:\n\t MIME-Version;\n b=YNziGiyb9/A/wBxZpFeHCFZuxemIuGdgB8icV8EWkhDnlBA44vquLiaYFbwICS078qVQmrBQIwB6P1dQV/8Nz5yPzLhF8nRirlKA1PiGW+lXy+dGVZmTLGtaBSWU6K6pmRjsQeuGqe5x8a5O05bW2sG4mBHOqhg96iVTWsZHSbo=" ], "ARC-Authentication-Results": [ "i=2; gandalf.ozlabs.org;\n dmarc=none (p=none dis=none) header.from=huaweicloud.com;\n spf=pass (client-ip=172.234.253.10; helo=sea.lore.kernel.org;\n envelope-from=linux-ext4+bounces-15845-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org) smtp.mailfrom=vger.kernel.org", "i=1; smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=huaweicloud.com;\n spf=pass smtp.mailfrom=huaweicloud.com; arc=none smtp.client-ip=45.249.212.51" ], "From": "Ye Bin <yebin@huaweicloud.com>", "To": "tytso@mit.edu,\n\tadilger.kernel@dilger.ca,\n\tlinux-ext4@vger.kernel.org", "Cc": "jack@suse.cz", "Subject": "[PATCH v2 3/4] ext4: show inode orphan list detail information", "Date": "Wed, 15 Apr 2026 18:55:04 +0800", "Message-Id": "<20260415105505.342358-4-yebin@huaweicloud.com>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20260415105505.342358-1-yebin@huaweicloud.com>", "References": "<20260415105505.342358-1-yebin@huaweicloud.com>", "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-CM-TRANSID": "_Ch0CgAHtL0fb99pbf70AQ--.45727S7", "X-Coremail-Antispam": "1UD129KBjvJXoWxJFy3Zr1kur48Jr1DGry5twb_yoWruw1UpF\n\ts8J34rAan8Was3WF4ftF4UXrnay3WxG3y5Jr9I93yFqrW5XryIqF18tw1UZF98ArW8Gr90\n\tqw4jgFW5Kr10grDanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2\n\t9KBjDU0xBIdaVrnRJUUUvlb4IE77IF4wAFF20E14v26ryj6rWUM7CY07I20VC2zVCF04k2\n\t6cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28IrcIa0xkI8VA2jI8067AKxVWUWw\n\tA2048vs2IY020Ec7CjxVAFwI0_Gr0_Xr1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxS\n\tw2x7M28EF7xvwVC0I7IYx2IY67AKxVW7JVWDJwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxV\n\tWxJVW8Jr1l84ACjcxK6I8E87Iv67AKxVW0oVCq3wA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_\n\tGcCE3s1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx\n\t0E2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkEbVWU\n\tJVW8JwACjcxG0xvY0x0EwIxGrwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJV\n\tW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF\n\t1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6x\n\tIIjxv20xvEc7CjxVAFwI0_Gr0_Cr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvE\n\tx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvj\n\tDU0xZFpf9x07jec_-UUUUU=", "X-CM-SenderInfo": "p1hex046kxt4xhlfz01xgou0bp/", "X-Spam-Status": "No, score=-1.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,\n\tDMARC_MISSING,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,\n\tSPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.1", "X-Spam-Checker-Version": "SpamAssassin 4.0.1 (2024-03-25) on gandalf.ozlabs.org" }, "content": "From: Ye Bin <yebin10@huawei.com>\n\nSome inodes added to the orphan list are due to truncation, while others\nare due to deletion.Therefore, we printed the information of inode as\nfollows: inode number/i_nlink/i_size/i_blocks/projid/file path. By using\nthis information, it is possible to quickly identify files that have been\ndeleted but are still being referenced.\n\nSigned-off-by: Ye Bin <yebin10@huawei.com>\n---\n fs/ext4/orphan.c | 128 ++++++++++++++++++++++++++++++++++++++++++++++-\n 1 file changed, 126 insertions(+), 2 deletions(-)", "diff": "diff --git a/fs/ext4/orphan.c b/fs/ext4/orphan.c\nindex a6bffe67ef75..4d6f8c9edaeb 100644\n--- a/fs/ext4/orphan.c\n+++ b/fs/ext4/orphan.c\n@@ -682,23 +682,147 @@ struct ext4_proc_orphan {\n \tstruct ext4_inode_info cursor;\n };\n \n-static void *ext4_orphan_seq_start(struct seq_file *seq, loff_t *pos)\n+static struct inode *ext4_list_next(struct ext4_proc_orphan *s,\n+\t\t\t\t struct list_head *head,\n+\t\t\t\t struct list_head *p)\n {\n+\tlist_for_each_continue(p, head) {\n+\t\tstruct ext4_inode_info *ei;\n+\t\tstruct inode *inode;\n+\n+\t\tei = list_entry(p, typeof(*ei), i_orphan);\n+\t\tinode = &ei->vfs_inode;\n+\n+\t\t/*\n+\t\t * It is safe to insert a cursor into the orphan list\n+\t\t * because ext4_orphan_del() will skip cursor. When the\n+\t\t * orphan list is processed in ext4_put_super(),\n+\t\t * ext4_seq_orphan_release() must have already been called,\n+\t\t * so the cursor must have already been removed from the\n+\t\t * orphan list.Therefore, there will be no access to a\n+\t\t * stale cursor.\n+\t\t */\n+\t\tlist_move(&s->cursor.i_orphan, &ei->i_orphan);\n+\n+\t\t/*\n+\t\t * Because the cursor has moved to the node after the\n+\t\t * current node, the traversal cannot continue from the\n+\t\t * current node. Instead, the traversal should continue\n+\t\t * from the cursor.\n+\t\t */\n+\t\tp = &s->cursor.i_orphan;\n+\n+\t\tif (ext4_is_cursor(inode))\n+\t\t\tcontinue;\n+\n+\t\tif (!igrab(inode))\n+\t\t\tcontinue;\n+\n+\t\treturn inode;\n+\t}\n+\n \treturn NULL;\n }\n \n+static void *ext4_orphan_seq_start(struct seq_file *seq, loff_t *pos)\n+{\n+\tstruct ext4_proc_orphan *s = seq->private;\n+\tstruct super_block *sb = pde_data(file_inode(seq->file));\n+\tstruct ext4_sb_info *sbi = EXT4_SB(sb);\n+\tstruct list_head *prev;\n+\n+\tmutex_lock(&sbi->s_orphan_lock);\n+\n+\tif (!*pos) {\n+\t\tprev = &sbi->s_orphan;\n+\t} else {\n+\t\tprev = &s->cursor.i_orphan;\n+\t\tif (list_empty(prev))\n+\t\t\treturn NULL;\n+\t}\n+\n+\treturn ext4_list_next(s, &sbi->s_orphan, prev);\n+}\n+\n static void *ext4_orphan_seq_next(struct seq_file *seq, void *v, loff_t *pos)\n {\n-\treturn NULL;\n+\tstruct super_block *sb = pde_data(file_inode(seq->file));\n+\tstruct ext4_sb_info *sbi = EXT4_SB(sb);\n+\tstruct ext4_proc_orphan *s = seq->private;\n+\tstruct inode *inode = v;\n+\n+\t++*pos;\n+\n+\t/*\n+\t * To prevent the deadlock caused by orphan node deletion when the\n+\t * last inode reference count is released, the inode reference\n+\t * count needs to be released in the unlocked state.\n+\t */\n+\tmutex_unlock(&sbi->s_orphan_lock);\n+\tiput(inode);\n+\tmutex_lock(&sbi->s_orphan_lock);\n+\n+\treturn ext4_list_next(s, &sbi->s_orphan, &s->cursor.i_orphan);\n+}\n+\n+static void ext4_show_filename(struct seq_file *seq, struct inode *inode)\n+{\n+\tstruct dentry *dentry;\n+\n+\tdentry = d_find_alias(inode);\n+\tif (!dentry)\n+\t\tdentry = d_find_any_alias(inode);\n+\n+\tif (dentry)\n+\t\tseq_dentry(seq, dentry, \" \\t\\n\\\\\");\n+\telse\n+\t\tseq_puts(seq, \"unknown\");\n+\n+\tseq_puts(seq, \"\\\"\\n\");\n+\n+\t/*\n+\t * Since igrab() has already been called in ext4_list_next(), the\n+\t * inode will not be released here, so there will be no deadlock.\n+\t */\n+\tdput(dentry);\n }\n \n static int ext4_orphan_seq_show(struct seq_file *seq, void *v)\n {\n+\tstruct inode *inode = v;\n+\n+\t/*\n+\t * Print the original data without differentiating namespaces.\n+\t */\n+\tseq_printf(seq, \"ino: %llu, link: %u, size: %llu, blocks: %llu, proj: %u, path: \\\"\",\n+\t\t inode->i_ino, inode->i_nlink,\n+\t\t i_size_read(inode), inode->i_blocks,\n+\t\t __kprojid_val(EXT4_I(inode)->i_projid));\n+\n+\text4_show_filename(seq, inode);\n+\n \treturn 0;\n }\n \n static void ext4_orphan_seq_stop(struct seq_file *seq, void *v)\n {\n+\tstruct super_block *sb = pde_data(file_inode(seq->file));\n+\tstruct ext4_sb_info *sbi = EXT4_SB(sb);\n+\tstruct ext4_proc_orphan *s = seq->private;\n+\tstruct inode *inode = v;\n+\n+\t/*\n+\t * stop() is called when the cache is full, so the traversal\n+\t * position needs to be moved back to the front of the current\n+\t * inode.\n+\t */\n+\tif (v)\n+\t\tlist_move_tail(&s->cursor.i_orphan,\n+\t\t\t &EXT4_I(inode)->i_orphan);\n+\n+\tmutex_unlock(&sbi->s_orphan_lock);\n+\n+\tiput(inode);\n }\n \n const struct seq_operations ext4_orphan_seq_ops = {\n", "prefixes": [ "v2", "3/4" ] }