Re: [PATCH] nvme: add opcode filtering for fault injection

From: Keith Busch

Date: Wed Aug 19 2026 - 11:36:04 EST


On Tue, Aug 11, 2026 at 04:11:52PM -0700, Mohamed Khalfella wrote:
> Currently NVMe fault injection applies to every command routed through
> nvme_should_fail(), which makes it hard to target a specific command
> type when reproducing an issue in error-handling paths.
>
> Add an "opcode" debugfs attribute alongside the existing "status" and
> "dont_retry" knobs. It defaults to 0xffff, meaning "match any opcode"
> and preserving the previous behavior. When set to a valid opcode
> (<= 0xff), fault injection is only considered for commands whose opcode
> matches.

Thanks, applied to nvme-7.3.