mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Song Chen <chensong_2000@126.com>
To: dsterba@suse.com, mason@kernel.org, akinobu.mita@gmail.com,
	corbet@lwn.net, skhan@linuxfoundation.org, rdunlap@infradead.org,
	arnd@arndb.de, akpm@linux-foundation.org, ees@kernel.org
Cc: linux-doc@vger.kernel.org, linux-arch@vger.kernel.org,
	linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org,
	Song Chen <chensong_2000@126.com>
Subject: [PATCH v3 0/2] btrfs: add error injection support for checksum verification
Date: Tue, 13 Oct 2026 05:29:08 +0800	[thread overview]
Message-ID: <20261012212910.54623-1-chensong_2000@126.com> (raw)

This patchset adds fault injection support for btrfs_data_csum_ok,
enabling controlled simulation of checksum mismatches to test btrfs
silent data corruption detection and reporting paths.

The first patch extends the error injection framework with a new type,
EI_ETYPE_FALSE, which allows bool-returning functions to be overridden
with a false return value directly.

The second patch marks btrfs_data_csum_ok with ALLOW_ERROR_INJECTION
using this new type.


Song Chen (2):
  error-injection: Introduce EI_ETYPE_FALSE for fail_function
  btrfs: Allow error injection on btrfs_data_csum_ok

 Documentation/fault-injection/fault-injection.rst | 3 +++
 fs/btrfs/inode.c                                  | 1 +
 include/asm-generic/error-injection.h             | 1 +
 kernel/fail_function.c                            | 2 ++
 lib/error-inject.c                                | 2 ++
 5 files changed, 9 insertions(+)

---
changelog:
v1 --- v2:
Add a parent field to struct fei_attr.

v2 --- v3
1, Withdraw adding parent field in fet_attr in v2.
2, Update commit message of second patch regarding sashiko-bot's
   suggestion in [1].
3, Add EI_ETYPE_FALSE in error_type_string regarding sashiko-bot's
   suggestion in [2].
4, Add EI_ETYPE_FALSE in Documentation/fault-injection/fault-injection.rst
   regarding sashiko-bot's suggestion in [2].

[1] https://lore.kernel.org/all/20260724022150.D2D811F000E9@smtp.kernel.org/
[2] https://lore.kernel.org/all/20260724022044.F31F11F000E9@smtp.kernel.org/
-- 
2.43.0


             reply	other threads:[~2026-10-12 13:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-12 21:29 Song Chen [this message]
2026-10-12 21:29 ` [PATCH v3 1/2] error-injection: Introduce EI_ETYPE_FALSE for fail_function Song Chen
2026-10-12 21:29 ` [PATCH v3 2/2] btrfs: Allow error injection on btrfs_data_csum_ok Song Chen

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=20261012212910.54623-1-chensong_2000@126.com \
    --to=chensong_2000@126.com \
    --cc=akinobu.mita@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=corbet@lwn.net \
    --cc=dsterba@suse.com \
    --cc=ees@kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mason@kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=skhan@linuxfoundation.org \
    /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®