Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/2234993/?format=api
{ "id": 2234993, "url": "http://patchwork.ozlabs.org/api/1.2/patches/2234993/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260508121539.4174601-15-libaokun@linux.alibaba.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": "<20260508121539.4174601-15-libaokun@linux.alibaba.com>", "list_archive_url": null, "date": "2026-05-08T12:15:36", "name": "[RFC,14/17] ext4: rename ino to bit in __ext4_new_inode()", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "a80b30c31988922bea6f2d6711b4c232220f7861", "submitter": { "id": 92757, "url": "http://patchwork.ozlabs.org/api/1.2/people/92757/?format=api", "name": "Baokun Li", "email": "libaokun@linux.alibaba.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260508121539.4174601-15-libaokun@linux.alibaba.com/mbox/", "series": [ { "id": 503377, "url": "http://patchwork.ozlabs.org/api/1.2/series/503377/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/list/?series=503377", "date": "2026-05-08T12:15:22", "name": "ext4/lib-crc: LBS performance part 1 - incremental CRC32c for bitmap checksums", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/503377/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2234993/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2234993/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <SRS0=vux4=DF=vger.kernel.org=linux-ext4+bounces-16371-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 (1024-bit key;\n unprotected) header.d=linux.alibaba.com header.i=@linux.alibaba.com\n header.a=rsa-sha256 header.s=default header.b=tjBAtfru;\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=vux4=df=vger.kernel.org=linux-ext4+bounces-16371-patchwork-incoming=ozlabs.org@ozlabs.org;\n receiver=patchwork.ozlabs.org)", "gandalf.ozlabs.org;\n arc=pass smtp.remote-ip=\"2600:3c0a:e001:db::12fc:5321\"\n arc.chain=subspace.kernel.org", "gandalf.ozlabs.org;\n dmarc=pass (p=none dis=none) header.from=linux.alibaba.com", "gandalf.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=linux.alibaba.com header.i=@linux.alibaba.com\n header.a=rsa-sha256 header.s=default header.b=tjBAtfru;\n\tdkim-atps=neutral", "gandalf.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-ext4+bounces-16371-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (1024-bit key) header.d=linux.alibaba.com\n header.i=@linux.alibaba.com header.b=\"tjBAtfru\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=115.124.30.119", "smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=linux.alibaba.com", "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=linux.alibaba.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 4gBpC72jlVz1yKd\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 08 May 2026 22:21:55 +1000 (AEST)", "from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])\n\tby gandalf.ozlabs.org (Postfix) with ESMTP id 4gBpC71kxvz4wJS\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 08 May 2026 22:21:55 +1000 (AEST)", "by gandalf.ozlabs.org (Postfix)\n\tid 4gBpC71fVCz4wJg; Fri, 08 May 2026 22:21:55 +1000 (AEST)", "from sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::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 4gBpC34CRJz4wJS\n\tfor <patchwork-incoming@ozlabs.org>; Fri, 08 May 2026 22:21:51 +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 B566030AD717\n\tfor <patchwork-incoming@ozlabs.org>; Fri, 8 May 2026 12:16:18 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 9F3563DCD99;\n\tFri, 8 May 2026 12:16:17 +0000 (UTC)", "from out30-119.freemail.mail.aliyun.com\n (out30-119.freemail.mail.aliyun.com [115.124.30.119])\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 4BC6D37FF76;\n\tFri, 8 May 2026 12:16:13 +0000 (UTC)", "from\n x31h02109.sqa.na131.tbsite.net(mailfrom:libaokun@linux.alibaba.com\n fp:SMTPD_---0X2XQgrD_1778242570 cluster:ay36)\n by smtp.aliyun-inc.com;\n Fri, 08 May 2026 20:16:10 +0800" ], "ARC-Seal": [ "i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1778242915; cv=pass;\n\tb=lNjui1QduAFckOGe8GRNqadCFFkar1GW2iMHDDt/pORQVJ7OjA70EYkvXzo1b3tBTDG+vFHdX4J+bb4aIc45H/k71e+J2RdCpDuF3e2qp28mA01xanzSbSUVZukhY7kh2yuxWQVeQ0srWgHxXwZnJoiYB6f4E27gMr3NN5NzTdRki4SPxwSGtPMRy26Uabc1sTggsQN/168u9y5NcyY2Y97CymHVJ+XJm4SreWvHAds4Bb+BF5tW9MacXOK6aLDZq7ET3Trdr6bBDFyLYQBCEQqeFav9yG2hraFr4SuArA/ELbRLHEsnGiBRaYQqq6s3Gyz7BQelVZSjTu02uEMfMg==", "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1778242577; cv=none;\n b=fiyEqN1/9z291DgOCUuB1qG3Lu2fJbIOMPviehhv7OCTEVVUrTz3SUehe3jWRzHOOgbTQw8Fnp8PM4FrP7j1h6tnxddYCYyojiT9wozJUj4VM3EJNmPAUujLu+avc20YUKKpyklUo8pLRsBz3NHqGRZFkwNdQ9340tSigejnNHA=" ], "ARC-Message-Signature": [ "i=2; a=rsa-sha256; d=ozlabs.org; s=201707;\n\tt=1778242915; c=relaxed/relaxed;\n\tbh=q0EU33Gl1z9PKYUpXatr0Zn8reHluIfgGtFLoTGtpFE=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=GMfEskZ6qfEoypT9ds+j2Hxs5lr1eBRwDH6/7OtOhw2SgQbrrb3RUl+u3Uz2OJ9DLqfTA0k93Fx52p9xRgQMHWZ8ZiGgCiGhb50d1RyBLmiKIFnQKDu7eRdwXRdqzqcIJzn+1d+XTvpb9lXzzT6wrvIWWQ0rGGBg/VrIFJZMnVwiwVrQDuzSgusHJi2ckGRGjTONF+lU77PuPgss+8EqyjMXjx6p9fphRPWj1wt6oTTn2sx9SQaKSUOoKNhoiBUw9xaonclFYkjTSycLtS7/SHbEQ9vq73qW86Mku60+6Lh4vIjkNYIUGLU1r7pN/za4ua173/BkqaEnw0oNYNKzlw==", "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1778242577; c=relaxed/simple;\n\tbh=bL9xtueRMZB/tnx1HdmUpFIAF37PXXsQarl8C+rIlAU=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=HL93BV8UDj+JEzlHrQlk3aPAPOSOX0Fo0e5ehLdw4okjzhfSCIhiDYkWtdnX9QvVjkz4o0elcTq1K9QGNBMelGPtQt6swQ+IYzq2pr7vrTtCt7NKCDyH0x0OMGX/Xz7OG0E9E6YQrrCQjZNAT8kfFPASGHIuToB/ULCVC4R0+sk=" ], "ARC-Authentication-Results": [ "i=2; gandalf.ozlabs.org;\n dmarc=pass (p=none dis=none) header.from=linux.alibaba.com;\n dkim=pass (1024-bit key;\n unprotected) header.d=linux.alibaba.com header.i=@linux.alibaba.com\n header.a=rsa-sha256 header.s=default header.b=tjBAtfru; dkim-atps=neutral;\n spf=pass (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-ext4+bounces-16371-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=linux.alibaba.com;\n spf=pass smtp.mailfrom=linux.alibaba.com;\n dkim=pass (1024-bit key) header.d=linux.alibaba.com\n header.i=@linux.alibaba.com header.b=tjBAtfru;\n arc=none smtp.client-ip=115.124.30.119" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linux.alibaba.com; s=default;\n\tt=1778242571; h=From:To:Subject:Date:Message-ID:MIME-Version;\n\tbh=q0EU33Gl1z9PKYUpXatr0Zn8reHluIfgGtFLoTGtpFE=;\n\tb=tjBAtfru7/JKOCEYgFtIo709DtoMlYLGnAmK6G0S2diDZLAMAWiOuEt2l9zN2qkoJeXY0gSSfQ3A8yzjz/Yi14A18puoO/SSRHG2s1STSPDGH/SWZengzCXISNQAOExJtob7W/yXhXKt8YSYH9nBk/1AsVhrap7e6zJcS+bDWh8=", "X-Alimail-AntiSpam": "\n AC=PASS;BC=-1|-1;BR=01201311R171e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033037033178;MF=libaokun@linux.alibaba.com;NM=1;PH=DS;RN=11;SR=0;TI=SMTPD_---0X2XQgrD_1778242570;", "From": "Baokun Li <libaokun@linux.alibaba.com>", "To": "linux-ext4@vger.kernel.org", "Cc": "linux-crypto@vger.kernel.org,\n\tebiggers@kernel.org,\n\tardb@kernel.org,\n\ttytso@mit.edu,\n\tadilger.kernel@dilger.ca,\n\tjack@suse.cz,\n\tyi.zhang@huawei.com,\n\tojaswin@linux.ibm.com,\n\tritesh.list@gmail.com,\n\tBaokun Li <libaokun@linux.alibaba.com>", "Subject": "[PATCH RFC 14/17] ext4: rename ino to bit in __ext4_new_inode()", "Date": "Fri, 8 May 2026 20:15:36 +0800", "Message-ID": "<20260508121539.4174601-15-libaokun@linux.alibaba.com>", "X-Mailer": "git-send-email 2.43.7", "In-Reply-To": "<20260508121539.4174601-1-libaokun@linux.alibaba.com>", "References": "<20260508121539.4174601-1-libaokun@linux.alibaba.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-Spam-Status": "No, score=-8.7 required=5.0 tests=ARC_SIGNED,ARC_VALID,\n\tDKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DMARC_PASS,\n\tHEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,\n\tSPF_PASS,UNPARSEABLE_RELAY,USER_IN_DEF_DKIM_WL autolearn=disabled\n\tversion=4.0.1", "X-Spam-Checker-Version": "SpamAssassin 4.0.1 (2024-03-25) on gandalf.ozlabs.org" }, "content": "In __ext4_new_inode(), the variable 'ino' actually holds a zero-based\nbit position within the inode bitmap, not an absolute inode number.\nRename it to 'bit' to better reflect its semantics and avoid confusion\nwith inode->i_ino.\n\nWith this rename, the previous 'ino++' before calculating i_ino is no\nlonger needed; instead compute i_ino directly as 'bit + 1'.\n\nSigned-off-by: Baokun Li <libaokun@linux.alibaba.com>\n---\n fs/ext4/ialloc.c | 26 +++++++++++++-------------\n 1 file changed, 13 insertions(+), 13 deletions(-)", "diff": "diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c\nindex e209e27f827f..8b75b331b26e 100644\n--- a/fs/ext4/ialloc.c\n+++ b/fs/ext4/ialloc.c\n@@ -974,7 +974,7 @@ struct inode *__ext4_new_inode(struct mnt_idmap *idmap,\n \tstruct buffer_head *inode_bitmap_bh = NULL;\n \tstruct buffer_head *group_desc_bh;\n \text4_group_t ngroups, group = 0;\n-\tunsigned long ino = 0;\n+\tunsigned long bit = 0;\n \tstruct inode *inode;\n \tstruct ext4_group_desc *gdp = NULL;\n \tstruct ext4_inode_info *ei;\n@@ -1050,7 +1050,7 @@ struct inode *__ext4_new_inode(struct mnt_idmap *idmap,\n \n \tif (goal && goal <= le32_to_cpu(sbi->s_es->s_inodes_count)) {\n \t\tgroup = (goal - 1) / EXT4_INODES_PER_GROUP(sb);\n-\t\tino = (goal - 1) % EXT4_INODES_PER_GROUP(sb);\n+\t\tbit = (goal - 1) % EXT4_INODES_PER_GROUP(sb);\n \t\tret2 = 0;\n \t\tgoto got_group;\n \t}\n@@ -1071,7 +1071,7 @@ struct inode *__ext4_new_inode(struct mnt_idmap *idmap,\n \t * unless we get unlucky and it turns out the group we selected\n \t * had its last inode grabbed by someone else.\n \t */\n-\tfor (i = 0; i < ngroups; i++, ino = 0) {\n+\tfor (i = 0; i < ngroups; i++, bit = 0) {\n \t\terr = -EIO;\n \n \t\tgdp = ext4_get_group_desc(sb, group, &group_desc_bh);\n@@ -1105,13 +1105,13 @@ struct inode *__ext4_new_inode(struct mnt_idmap *idmap,\n \t\t EXT4_MB_GRP_IBITMAP_CORRUPT(grp))\n \t\t\tgoto next_group;\n \n-\t\tret2 = find_inode_bit(sb, group, inode_bitmap_bh, &ino);\n+\t\tret2 = find_inode_bit(sb, group, inode_bitmap_bh, &bit);\n \t\tif (!ret2)\n \t\t\tgoto next_group;\n \n-\t\tif (group == 0 && (ino + 1) < EXT4_FIRST_INO(sb)) {\n+\t\tif (group == 0 && (bit + 1) < EXT4_FIRST_INO(sb)) {\n \t\t\text4_error(sb, \"reserved inode found cleared - \"\n-\t\t\t\t \"inode=%lu\", ino + 1);\n+\t\t\t\t \"inode=%lu\", bit + 1);\n \t\t\text4_mark_group_bitmap_corrupted(sb, group,\n \t\t\t\t\tEXT4_GROUP_INFO_IBITMAP_CORRUPT);\n \t\t\tgoto next_group;\n@@ -1136,21 +1136,20 @@ struct inode *__ext4_new_inode(struct mnt_idmap *idmap,\n \t\t\tgoto out;\n \t\t}\n \t\text4_lock_group(sb, group);\n-\t\tret2 = ext4_test_and_set_bit(ino, inode_bitmap_bh->b_data);\n+\t\tret2 = ext4_test_and_set_bit(bit, inode_bitmap_bh->b_data);\n \t\tif (ret2) {\n \t\t\t/* Someone already took the bit. Repeat the search\n \t\t\t * with lock held.\n \t\t\t */\n-\t\t\tret2 = find_inode_bit(sb, group, inode_bitmap_bh, &ino);\n+\t\t\tret2 = find_inode_bit(sb, group, inode_bitmap_bh, &bit);\n \t\t\tif (ret2) {\n-\t\t\t\text4_set_bit(ino, inode_bitmap_bh->b_data);\n+\t\t\t\text4_set_bit(bit, inode_bitmap_bh->b_data);\n \t\t\t\tret2 = 0;\n \t\t\t} else {\n \t\t\t\tret2 = 1; /* we didn't grab the inode */\n \t\t\t}\n \t\t}\n \t\text4_unlock_group(sb, group);\n-\t\tino++;\t\t/* the inode bitmap is zero-based */\n \t\tif (!ret2)\n \t\t\tgoto got; /* we grabbed the inode! */\n \n@@ -1210,9 +1209,9 @@ struct inode *__ext4_new_inode(struct mnt_idmap *idmap,\n \t\t * relative inode number in this group. if it is greater\n \t\t * we need to update the bg_itable_unused count\n \t\t */\n-\t\tif (ino > free)\n+\t\tif (bit >= free)\n \t\t\text4_itable_unused_set(sb, gdp,\n-\t\t\t\t\t(EXT4_INODES_PER_GROUP(sb) - ino));\n+\t\t\t\t\t(EXT4_INODES_PER_GROUP(sb) - bit - 1));\n \t\tif (!(sbi->s_mount_state & EXT4_FC_REPLAY))\n \t\t\tup_read(&grp->alloc_sem);\n \t} else {\n@@ -1252,7 +1251,8 @@ struct inode *__ext4_new_inode(struct mnt_idmap *idmap,\n \t\t\t\t\t\tflex_group)->free_inodes);\n \t}\n \n-\tinode->i_ino = ino + group * EXT4_INODES_PER_GROUP(sb);\n+\t/* the inode bitmap is zero-based */\n+\tinode->i_ino = bit + 1 + group * EXT4_INODES_PER_GROUP(sb);\n \t/* This is the optimal IO size (for stat), not the fs block size */\n \tinode->i_blocks = 0;\n \tsimple_inode_init_ts(inode);\n", "prefixes": [ "RFC", "14/17" ] }