[RFC PATCH v2 0/3] btrfs: add error injection support for checksum verification

David Sterba dsterba at suse.cz
Mon Sep 7 09:13:30 PDT 2026


On Fri, Jul 24, 2026 at 10:12:26AM +0800, Song Chen wrote:
> 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.
> 
> The third patch adds a parent field to fei_attr to allow fault injection
> on a function only when called from a specific parent function. 
> 
> Song Chen (3):
>   error-injection: Introduce EI_ETYPE_FALSE for fail_function
>   btrfs: Allow error injection on btrfs_data_csum_ok
>   error-injection: Introduce parent in fei_attr

I'm going through my mailbox and found this. No objections to add the
injection point to btrfs, but the rest is generic fault injection code
so I can't take it via btrfs tree without acks.

There are some sashiko comments (as replies in the thread [1]) and there
have been some changes to btrfs code too so the patchset needs a
refresh.

I see maintainers in CC, if somebody could please let us know how to
proceed.

[1] https://lore.kernel.org/all/20260724021229.47302-1-chensong_2000@126.com/

>  arch/arm/lib/error-inject.c           |  6 ++
>  arch/arm64/lib/error-inject.c         |  6 ++
>  arch/csky/lib/error-inject.c          |  6 ++
>  arch/loongarch/lib/error-inject.c     |  6 ++
>  arch/powerpc/lib/error-inject.c       |  6 ++
>  arch/riscv/lib/error-inject.c         |  6 ++
>  arch/s390/lib/error-inject.c          |  6 ++
>  arch/x86/lib/error-inject.c           |  6 ++
>  fs/btrfs/inode.c                      |  1 +
>  include/asm-generic/error-injection.h |  6 ++
>  kernel/fail_function.c                | 98 ++++++++++++++++++++++++++-
>  11 files changed, 152 insertions(+), 1 deletion(-)



More information about the linux-riscv mailing list