Linux EXT4 FS development
 help / color / mirror / Atom feed
From: Arbab Haider <arbabhaider649@gmail.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, yebin10@huawei.com,
	linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v4 1/5] ext4: stub the nonatomic buffer lookup in inode KUnit tests
Date: Thu, 26 Nov 2026 12:07:45 +0500	[thread overview]
Message-ID: <20261126070748.272109-3-arbabhaider649@gmail.com> (raw)
In-Reply-To: <20261126070748.272109-2-arbabhaider649@gmail.com>

ext4_get_inode_loc_noio() uses ext4_sb_find_get_block_nonatomic(),
but the inode test fixture only stubs the atomic buffer lookup.
The real lookup cannot find the fixture's synthetic inode table
buffers, so it returns -EAGAIN even for the cached test buffer.
ext4_sync_inode_metadata() then treats the same cache miss as success
and never observes the synthetic buffer's write error.

Register the existing fake-cache lookup stub for the nonatomic
helper as well.

Signed-off-by: Arbab Haider <arbabhaider649@gmail.com>
---
 fs/ext4/inode-test.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/ext4/inode-test.c b/fs/ext4/inode-test.c
index ab1ca5982..529cab24d 100644
--- a/fs/ext4/inode-test.c
+++ b/fs/ext4/inode-test.c
@@ -1149,6 +1149,8 @@ static struct inode_test_ctx *inode_test_setup(struct kunit *test)
 				   inode_test_sb_getblk_stub);
 	kunit_activate_static_stub(test, ext4_sb_find_get_block,
 				   inode_test_sb_find_get_block_stub);
+	kunit_activate_static_stub(test, ext4_sb_find_get_block_nonatomic,
+				   inode_test_sb_find_get_block_stub);
 	kunit_activate_static_stub(test, ext4_sb_getblk_unmovable,
 				   inode_test_sb_getblk_unmovable_stub);
 	kunit_activate_static_stub(test, ext4_ext_getblk,
-- 
2.53.0


  reply	other threads:[~2026-11-26  7:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-26  7:07 [PATCH v4 0/5] ext4: fix inline data conversion races Arbab Haider
2026-11-26  7:07 ` Arbab Haider [this message]
2026-11-26  7:07 ` [PATCH v4 2/5] ext4: fix delayed-allocation " Arbab Haider
2026-11-26  7:07 ` [PATCH v4 3/5] ext4: keep EXT4_STATE_MAY_INLINE_DATA set during inline conversion Arbab Haider
2026-11-26  7:07 ` [PATCH v4 4/5] ext4: re-check inline data under filemap_invalidate_lock in swap_inode_boot_loader Arbab Haider
2026-11-26  7:07 ` [PATCH v4 5/5] ext4: serialize inode migration against concurrent inline data conversion Arbab Haider
2026-11-26  7:32 ` [PATCH v4 0/5] ext4: fix inline data conversion races 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=20261126070748.272109-3-arbabhaider649@gmail.com \
    --to=arbabhaider649@gmail.com \
    --cc=adilger.kernel@dilger.ca \
    --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=tytso@mit.edu \
    --cc=yebin10@huawei.com \
    --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