Linux EXT4 FS development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Ojaswin Mujoo" <ojaswin@linux.ibm.com>
Cc: linux-ext4@vger.kernel.org, tytso@mit.edu
Subject: Re: [PATCH v2 04/13] ext4: add es helper to convert unwrit to convert pending without changing i_es_seq
Date: Fri, 27 Nov 2026 16:46:19 +0000	[thread overview]
Message-ID: <sashiko-outbox-237922@kernel.org> (raw)
In-Reply-To: <20261127-ext4-endio-zero-bug-v2-4-4106968e4d15@linux.ibm.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] ext4: unused static ext4_map_mark_convert_pending() breaks
  build at this commit
--

commit 80a3192297d6fe076d14d5912fca2f3312352549
Author: Ojaswin Mujoo <ojaswin@linux.ibm.com>

ext4: add es helper to convert unwrit to convert pending without changing i_es_seq

This commit adds helpers to mark an unwritten extent as
EXTENT_STATUS_CONVERT_PENDING in the extent status tree without
incrementing i_es_seq.

> diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
> index 9368a68db2894..f7fc5fb7e8197 100644
> --- a/fs/ext4/inode.c
> +++ b/fs/ext4/inode.c
> @@ -757,6 +757,29 @@ int ext4_map_create_blocks(handle_t *handle, struct inode *inode,
>  	return retval;
>  }
>  
> +/*
> + * Mark the unwritten range in @map as convert pending in the extent status
> + * tree. This is used by the zeroout code to ensure we don't write zeroes on
> + * such unwritten ranges and hence must be serialized against endio conversion /
> + * extent zeroout, which hold i_data_sem excl.
> + *
> + * Returns false if the extent status tree changed since @map was looked up, in
> + * which case the caller must redo the lookup.
> + */
> +static bool ext4_map_mark_convert_pending(struct inode *inode,
> +					  struct ext4_map_blocks *map)
> +{
> +	bool ok;
> +
> +	down_read(&EXT4_I(inode)->i_data_sem);
> +	ok = map->m_seq == READ_ONCE(EXT4_I(inode)->i_es_seq);
> +	if (ok)
> +		ext4_es_mark_convert_pending(inode, map->m_lblk, map->m_len,
> +					     map->m_pblk);
> +	up_read(&EXT4_I(inode)->i_data_sem);
> +	return ok;
> +}

[Severity: Medium]
Does defining ext4_map_mark_convert_pending() here without callers or
__maybe_unused break the build at this commit?  Its callers in
ext4_map_blocks() are not added until commit "ext4: add support to track
convert pending ranges in ext4_map_blocks()", so compiling at this point
in the series triggers a -Wunused-function warning (and a build failure
with CONFIG_WERROR=y), breaking bisection.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261127-ext4-endio-zero-bug-v2-0-4106968e4d15@linux.ibm.com?part=4

  reply	other threads:[~2026-11-27 16:46 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27 15:10 [PATCH v2 00/13] ext4: fix endio zeroout corruption by tracking to-be-converted unwritten IOs Ojaswin Mujoo
2026-11-27 15:10 ` [PATCH v2 01/13] ext4: disable zeroout fallback in ext4_split_extent() Ojaswin Mujoo
2026-11-27 15:10 ` [PATCH v2 02/13] ext4: introduce CONVERT_PENDING extent status type Ojaswin Mujoo
2026-11-27 15:58   ` sashiko-bot
2026-11-27 15:10 ` [PATCH v2 03/13] ext4: preserve convert pending extents when adding unwrit extents to es cache Ojaswin Mujoo
2026-11-27 15:10 ` [PATCH v2 04/13] ext4: add es helper to convert unwrit to convert pending without changing i_es_seq Ojaswin Mujoo
2026-11-27 16:46   ` sashiko-bot [this message]
2026-11-27 15:10 ` [PATCH v2 05/13] ext4: add support to track convert pending ranges in ext4_map_blocks() Ojaswin Mujoo
2026-11-27 17:19   ` sashiko-bot
2026-11-27 15:10 ` [PATCH v2 06/13] ext4: add tracking for unwritten to-be-converted ranges in dio write path Ojaswin Mujoo
2026-11-27 17:48   ` sashiko-bot
2026-11-27 15:10 ` [PATCH v2 07/13] ext4: add tracking for unwritten to-be-converted ranges in non iomap buffered path Ojaswin Mujoo
2026-11-27 15:10 ` [PATCH v2 08/13] ext4: add tracking for unwritten to-be-converted ranges in " Ojaswin Mujoo
2026-11-27 15:10 ` [PATCH v2 09/13] ext4: don't zeroout if conv pending ranges are present Ojaswin Mujoo
2026-11-27 15:10 ` [PATCH v2 10/13] ext4: add tracepoints for extent split and convert Ojaswin Mujoo
2026-11-27 15:10 ` [PATCH v2 11/13] ext4: update extent status cache when zeroing extents Ojaswin Mujoo
2026-11-27 15:10 ` [PATCH v2 12/13] ext4: don't drop the extents in case extent split fails Ojaswin Mujoo
2026-11-27 15:11 ` [PATCH v2 13/13] ext4: re-enable zeroout fallback Ojaswin Mujoo

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=sashiko-outbox-237922@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=ojaswin@linux.ibm.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox