Linux EXT4 FS development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Lukas Czerner" <lukas@czerner.cz>, linux-ext4@vger.kernel.org
Cc: tytso@mit.edu
Subject: Re: [PATCH 1/2] ext4: fix failed migrate freeing extent tree blocks
Date: Sun, 25 Oct 2026 20:45:28 +0000	[thread overview]
Message-ID: <sashiko-outbox-184440@kernel.org> (raw)
In-Reply-To: <20261025201803.3043712-2-lukas@czerner.cz>

> In case ext4_ext_swap_inode_data() fails it will clean up a failed
> migration by freeing the extent tree in the tmp_inode. However, in
> case we already copied the temporary inode's extent tree root into
> the original inode, the process has been functionally finished.
> The error case clean up calls free_ext_block() which will free those
> extent tree blocks while the original inode already points at them and
> the filesystem ends up with multiply claimed blocks.
> 
> Fix it by resetting the temporary inode's root to an empty tree right
> after copying i_data to the original inode, so free_ext_block() won't
> free the original inode extent tree blocks. Move temporary inode's
> i_blocks as well so eviction won't try to truncate metadata blocks the
> tmp_inode no longer owns.
> 
> Signed-off-by: Lukas Czerner <lukas@czerner.cz>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261025201803.3043712-1-lukas@czerner.cz?part=1


  reply	other threads:[~2026-10-25 20:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-25 20:18 [PATCH 0/2] ext4: fix error handling of failed migration Lukas Czerner
2026-10-25 20:18 ` [PATCH 1/2] ext4: fix failed migrate freeing extent tree blocks Lukas Czerner
2026-10-25 20:45   ` sashiko-bot [this message]
2026-10-25 20:18 ` [PATCH 2/2] ext4: don't lose the error of a failed migration Lukas Czerner
2026-10-25 20:34   ` sashiko-bot

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-184440@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=lukas@czerner.cz \
    --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