mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan <3164729207@qq.com>
To: tytso@mit.edu
Cc: adilger.kernel@dilger.ca, libaokun@linux.alibaba.com,
	jack@suse.cz, ojaswin@linux.ibm.com, ritesh.list@gmail.com,
	yi.zhang@huawei.com, harshadshirwadkar@gmail.com,
	linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH] ext4: reserve inode write access before unlinking entry
Date: Mon, 16 Nov 2026 15:35:19 +0800	[thread overview]
Message-ID: <tencent_69B311F4356254E166A5EFDC981AA138D80A@qq.com> (raw)
In-Reply-To: <tencent_D60E766CE07D3A1847B81DE9BC37B4466908@qq.com>

Hi Ted, Jan and ext4 reviewers,

A gentle ping on this patch from October 27. Are there any comments on the
approach?

I have additional validation from November 2 using QEMU blkdebug to fail an
actual guest block READ. These results supplement the source-derived fault
injection described in the original mail.

On the unpatched Linux 6.12.1 test kernel, with errors=continue, the failed
read was at sector 2312, in the parent inode-table block (block 289, parent
inode 13). The kernel reported:

  I/O error, dev vda, sector 2312 op 0x0:(READ)
  ext4_get_inode_loc:4554: inode #13: block 289: unable to read itable block
  __ext4_unlink:3469: inode #13: mark_inode_dirty error

unlink returned EIO. After normal unmount, /p/file was absent, but raw
inode 2064 still had Links: 1. e2fsck -fn reported:

  Unattached inode 2064

In this case the inode-table read fails in ext4_get_inode_loc(), before the
journal write-access call. A separate run of the same block-read failure
traced JBD2 through unlink, sync and normal unmount:

  jbd2_journal_abort() probe hits: 0
  unlink handle at jbd2_journal_stop(): TID 7, T_RUNNING
  h_err=0, h_aborted=0, j_errno=0, journal JBD2_ABORT flag clear
  jbd2_journal_stop() return value: 0
  jbd2_start_commit: transaction 7
  jbd2_end_commit: transaction 7

The offline filesystem check still reported the unattached inode. This
demonstrates that this read-error path can commit the directory change
without a journal abort when mounted with errors=continue.

With the fix, the same clean input and block-read error failed before the
directory entry was removed. After normal unmount, /p/file remained present,
inode 2064 still had Links: 1, and e2fsck -fn completed without diagnostics.

Thanks,
Alan


       reply	other threads:[~2026-11-16  7:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <tencent_D60E766CE07D3A1847B81DE9BC37B4466908@qq.com>
2026-11-16  7:35 ` Alan [this message]
2026-11-16 12:48   ` Jan Kara
2026-11-17  3:39     ` [PATCH v2] " Alan
2026-11-18 12:02       ` Jan Kara
2026-11-18 14:19         ` [PATCH v3] " Alan

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=tencent_69B311F4356254E166A5EFDC981AA138D80A@qq.com \
    --to=3164729207@qq.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=harshadshirwadkar@gmail.com \
    --cc=jack@suse.cz \
    --cc=libaokun@linux.alibaba.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ojaswin@linux.ibm.com \
    --cc=ritesh.list@gmail.com \
    --cc=stable@vger.kernel.org \
    --cc=tytso@mit.edu \
    --cc=yi.zhang@huawei.com \
    /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

all inboxes | Powered by JetHome®