All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: lty <781735889@qq.com>
Cc: linux-ext4@vger.kernel.org, tytso@mit.edu
Subject: Re: [PATCH v2] ext4: propagate errors from fast commit i_blocks replay
Date: Mon, 14 Sep 2026 12:22:20 +0000	[thread overview]
Message-ID: <20260914122220.9D05C1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <tencent_BCDA824359279D18963B838B15B01BC1CD06@qq.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Incomplete error propagation in `ext4_ext_replay_set_iblocks` when encountering an empty extent leaf.
--

commit d0296b8bc160aac911c99a12a53e4f06189bb5cd
Author: lty <781735889@qq.com>

ext4: propagate errors from fast commit i_blocks replay

This commit modifies ext4_ext_replay_set_iblocks() to stop calculating
blocks and propagate errors when mapping fails. It ensures failures from
extent lookups abort the fast commit inode replay.

> diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
> --- a/fs/ext4/extents.c
> +++ b/fs/ext4/extents.c

[ ... ]

> @@ -6291,15 +6291,19 @@ int ext4_ext_replay_set_iblocks(struct inode *inode)
>  	numblks += path->p_depth;
>  	while (cur < end) {
>  		path = ext4_find_extent(inode, cur, path, 0);
> -		if (IS_ERR(path))
> -			break;
> +		if (IS_ERR(path)) {
> +			ret = PTR_ERR(path);
> +			goto cleanup;
> +		}
>  		ex = path[path->p_depth].p_ext;
>  		if (!ex)
>  			goto cleanup;

[Severity: High]
Since ret is 0 on a successful extent lookup, does this branch silently return
success when it encounters an empty extent leaf?

If an empty leaf (!ex) represents a corrupted extent tree, should this set an
error code like -EFSCORRUPTED before jumping to cleanup, so the fast commit
replay can properly abort?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/tencent_BCDA824359279D18963B838B15B01BC1CD06@qq.com?part=1

  reply	other threads:[~2026-09-14 12:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-14 12:05 [PATCH v2] ext4: propagate errors from fast commit i_blocks replay lty
2026-09-14 12:22 ` sashiko-bot [this message]
2026-09-14 14:15 ` Jan Kara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260914122220.9D05C1F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=781735889@qq.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.