Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/2234982/?format=api
{ "id": 2234982, "url": "http://patchwork.ozlabs.org/api/1.2/patches/2234982/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260508121539.4174601-12-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-12-libaokun@linux.alibaba.com>", "list_archive_url": null, "date": "2026-05-08T12:15:33", "name": "[RFC,11/17] ext4: fix missing bg_used_dirs_count update in fast commit replay", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "39e1bfaa37f032bcdcc4e08b5abdfafe045f606a", "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-12-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/2234982/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2234982/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <SRS0=Nz5r=DF=vger.kernel.org=linux-ext4+bounces-16374-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=uwSnD90S;\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=nz5r=df=vger.kernel.org=linux-ext4+bounces-16374-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=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=uwSnD90S;\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-16374-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=\"uwSnD90S\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=115.124.30.100", "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 4gBp5J118tz1yJq\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 08 May 2026 22:16:52 +1000 (AEST)", "from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])\n\tby gandalf.ozlabs.org (Postfix) with ESMTP id 4gBp5J0YCJz4wJg\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 08 May 2026 22:16:52 +1000 (AEST)", "by gandalf.ozlabs.org (Postfix)\n\tid 4gBp5J0TyWz4wCG; Fri, 08 May 2026 22:16:52 +1000 (AEST)", "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 4gBp5D418Pz4wJg\n\tfor <patchwork-incoming@ozlabs.org>; Fri, 08 May 2026 22:16:48 +1000 (AEST)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id 01FFA304CFDC\n\tfor <patchwork-incoming@ozlabs.org>; Fri, 8 May 2026 12:16:21 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 76A3E3DC4CB;\n\tFri, 8 May 2026 12:16:19 +0000 (UTC)", "from out30-100.freemail.mail.aliyun.com\n (out30-100.freemail.mail.aliyun.com [115.124.30.100])\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 DD96D3D5244;\n\tFri, 8 May 2026 12:16:16 +0000 (UTC)", "from\n x31h02109.sqa.na131.tbsite.net(mailfrom:libaokun@linux.alibaba.com\n fp:SMTPD_---0X2XQgqZ_1778242567 cluster:ay36)\n by smtp.aliyun-inc.com;\n Fri, 08 May 2026 20:16:08 +0800" ], "ARC-Seal": [ "i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1778242612; cv=pass;\n\tb=QH+Z1T5vU8bHLlGj5SI/++M1Y33AlhaHfmQRK3jvkfAjxWIJw6IyTl9wYKyUHCujWgLXsh31V+Y30ekwEB96Jf/52GV05Yiw3elgQ9uoq3xu5ZMs8UBshDjV/qruicZt+NEElGTCPN6sr0X4n83HVB8RGYJicrQ3aUc5Jgpfup1fCvtt0WSYSVeq7E7BPVyiK2bMWQFiaQ+f35pp7s38IB9+KR5YSep6gAWL0mtmsVEh+Rs7cAbXQ70raMHiHtfNRt4CdcnuVkOJTOCux8XiGOAPP6Jf63WWfRBXuHPQD0zBV/aOORj1l9cs3420nysNu2pj8JEQRIb/FpgtCnvu4g==", "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1778242579; cv=none;\n b=Q5gxnrtPFlvKV3w8E+RMQPZ1rjr5ndEZh31jIkWpz3tuNazM3mVoSnzAzaBMp//NT0GymRf9D7FGK+KGOf8pYb2pASWexgsSSDQLOMVLU4Bu+0Z/ZSwL5KU473ZUJMFvX8c8x87oQPu+VtXQHcHox0/EV0ICWByokd/GKYU0Ojg=" ], "ARC-Message-Signature": [ "i=2; a=rsa-sha256; d=ozlabs.org; s=201707;\n\tt=1778242612; c=relaxed/relaxed;\n\tbh=j+njTUQuSD4WJzz69aJY/AMPFzUNIY9l1EwDZIOoNNs=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=rLZYDVTFwAMo9sbebV+fCEj8iEddomHkckBAcaJCIbaIy/VAr6OkoDKhk8RBB5DT84ZyFVCKN8j4M8OxW4JE5lb92gYDKfct2LRoFGc9Qh3oIGNmUSDWIT2ZtMnzyi8PtfqkOS4FeAuU7vDtv4XXTe4cU4JF4ahF7QFJfmpfJ/d/SXRZR37UOr0kl2eYxJnKkmqldt98ASPRYbDpadmR0mzNNz2hQVqG48yzswHNGnTk5z0F5aMluX9ug6jwwOURBcW1cVgP85ENB8KZtCZaF1ll6m2hgczro8w+Zj7t2vdY+vHup3qeqJRIHvirns6lhmUDdDid1Ljlj05Ny2NDlQ==", "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1778242579; c=relaxed/simple;\n\tbh=PFc3imtu7npQUjqtdoe3If9Ky6yXQHRgCbyLYFArCkg=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=TV47nrw983DmlqfO1fI1aitfVUnQO2Z7OgHkeDcW27tqeHxZ39V0vpjkag3bFcf9Xnpyy+IrMs9MnFcBXvH8l674DIT6ZoQM9NR1do3Y44PraaH1PLZV3rwc63y8Ml5pm9uzIiA5+9PWmZooP3j1JwK0QjEW8/JYFkRk16hiQ9A=" ], "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=uwSnD90S; 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-16374-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=uwSnD90S;\n arc=none smtp.client-ip=115.124.30.100" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linux.alibaba.com; s=default;\n\tt=1778242568; h=From:To:Subject:Date:Message-ID:MIME-Version;\n\tbh=j+njTUQuSD4WJzz69aJY/AMPFzUNIY9l1EwDZIOoNNs=;\n\tb=uwSnD90SE3fsS0ngCYi214i94sTKNqISGyLTYB7vGKmENuhwTdtEFWCm5boOjy5nYKPsR4n3OQRQLoXgi7XXjsEL8ZAAG0tYx3On9pRuESprzMkBNCeTa4DM730BQUp56bye6iX47/6AmPx8aLIGKi8ZbJQReOYIQkBZ/fSZwJg=", "X-Alimail-AntiSpam": "\n AC=PASS;BC=-1|-1;BR=01201311R191e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam011083073210;MF=libaokun@linux.alibaba.com;NM=1;PH=DS;RN=11;SR=0;TI=SMTPD_---0X2XQgqZ_1778242567;", "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 11/17] ext4: fix missing bg_used_dirs_count update in fast\n commit replay", "Date": "Fri, 8 May 2026 20:15:33 +0800", "Message-ID": "<20260508121539.4174601-12-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": "ext4_mark_inode_used() did not update bg_used_dirs_count for directory\ninodes during fast commit replay because it lacked the inode mode.\nAdd a mode parameter and pass it from both ext4_fc_replay_inode() (from\nraw_fc_inode) and ext4_fc_replay_create() (after ext4_iget).\n\nFixes: 8016e29f4362 (\"ext4: fast commit recovery path\")\nSigned-off-by: Baokun Li <libaokun@linux.alibaba.com>\n---\n fs/ext4/ext4.h | 2 +-\n fs/ext4/fast_commit.c | 13 +++++++------\n fs/ext4/ialloc.c | 13 ++++++++++++-\n 3 files changed, 20 insertions(+), 8 deletions(-)", "diff": "diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h\nindex e6739d5af490..f48cb9d998ab 100644\n--- a/fs/ext4/ext4.h\n+++ b/fs/ext4/ext4.h\n@@ -2941,7 +2941,7 @@ extern int ext4fs_dirhash(const struct inode *dir, const char *name, int len,\n \t\t\t struct dx_hash_info *hinfo);\n \n /* ialloc.c */\n-extern int ext4_mark_inode_used(struct super_block *sb, int ino);\n+extern int ext4_mark_inode_used(struct super_block *sb, int ino, umode_t mode);\n extern struct inode *__ext4_new_inode(struct mnt_idmap *, handle_t *,\n \t\t\t\t struct inode *, umode_t,\n \t\t\t\t const struct qstr *qstr, __u32 goal,\ndiff --git a/fs/ext4/fast_commit.c b/fs/ext4/fast_commit.c\nindex b3c22636251d..f68d7b2eb0db 100644\n--- a/fs/ext4/fast_commit.c\n+++ b/fs/ext4/fast_commit.c\n@@ -1578,7 +1578,7 @@ static int ext4_fc_replay_inode(struct super_block *sb,\n \tret = sync_dirty_buffer(iloc.bh);\n \tif (ret)\n \t\tgoto out_brelse;\n-\tret = ext4_mark_inode_used(sb, ino);\n+\tret = ext4_mark_inode_used(sb, ino, le16_to_cpu(raw_fc_inode->i_mode));\n \tif (ret)\n \t\tgoto out_brelse;\n \n@@ -1635,11 +1635,7 @@ static int ext4_fc_replay_create(struct super_block *sb,\n \ttrace_ext4_fc_replay(sb, EXT4_FC_TAG_CREAT, darg.ino,\n \t\t\tdarg.parent_ino, darg.dname_len);\n \n-\t/* This takes care of update group descriptor and other metadata */\n-\tret = ext4_mark_inode_used(sb, darg.ino);\n-\tif (ret)\n-\t\tgoto out;\n-\n+\t/* Inode already on disk from TAG_INODE replay; iget first for mode. */\n \tinode = ext4_iget(sb, darg.ino, EXT4_IGET_NORMAL);\n \tif (IS_ERR(inode)) {\n \t\text4_debug(\"inode %d not found.\", darg.ino);\n@@ -1648,6 +1644,11 @@ static int ext4_fc_replay_create(struct super_block *sb,\n \t\tgoto out;\n \t}\n \n+\t/* This takes care of update group descriptor and other metadata */\n+\tret = ext4_mark_inode_used(sb, darg.ino, inode->i_mode);\n+\tif (ret)\n+\t\tgoto out;\n+\n \tif (S_ISDIR(inode->i_mode)) {\n \t\t/*\n \t\t * If we are creating a directory, we need to make sure that the\ndiff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c\nindex 55eb69fbb4c9..5896cdfb2ccf 100644\n--- a/fs/ext4/ialloc.c\n+++ b/fs/ext4/ialloc.c\n@@ -756,11 +756,12 @@ static int find_inode_bit(struct super_block *sb, ext4_group_t group,\n \treturn 1;\n }\n \n-int ext4_mark_inode_used(struct super_block *sb, int ino)\n+int ext4_mark_inode_used(struct super_block *sb, int ino, umode_t mode)\n {\n \tunsigned long max_ino = le32_to_cpu(EXT4_SB(sb)->s_es->s_inodes_count);\n \tstruct buffer_head *inode_bitmap_bh = NULL, *group_desc_bh = NULL;\n \tstruct ext4_group_desc *gdp;\n+\tstruct ext4_sb_info *sbi = EXT4_SB(sb);\n \text4_group_t group;\n \tint bit;\n \tint err;\n@@ -858,6 +859,16 @@ int ext4_mark_inode_used(struct super_block *sb, int ino)\n \t}\n \n \text4_free_inodes_set(sb, gdp, ext4_free_inodes_count(sb, gdp) - 1);\n+\tif (S_ISDIR(mode)) {\n+\t\text4_used_dirs_set(sb, gdp, ext4_used_dirs_count(sb, gdp) + 1);\n+\t\tif (sbi->s_log_groups_per_flex) {\n+\t\t\text4_group_t f = ext4_flex_group(sbi, group);\n+\n+\t\t\tatomic_inc(&sbi_array_rcu_deref(sbi, s_flex_groups,\n+\t\t\t\t\t\t\tf)->used_dirs);\n+\t\t}\n+\t}\n+\n \tif (ext4_has_group_desc_csum(sb)) {\n \t\text4_inode_bitmap_csum_set(sb, gdp, inode_bitmap_bh);\n \t\text4_group_desc_csum_set(sb, group, gdp);\n", "prefixes": [ "RFC", "11/17" ] }