Re: [v2 for-next 1/3] block: reject unknown status tags in error injection rules
From: Christoph Hellwig
Date: Wed Sep 02 2026 - 10:13:39 EST
On Sun, Aug 30, 2026 at 03:20:00AM +0200, Md Haris Iqbal wrote:
> tag_to_blk_status() returns BLK_STS_OK both for the "OK" tag and for a
> tag it does not recognise, so a caller cannot tell the two apart.
> match_status() leaves *status at BLK_STS_OK for an unknown tag and relies
> on error_inject_add() rejecting BLK_STS_OK.
There is no *status yet.
> That holds only while a rule without a status is meaningless. The delay
This reads a lot like AI slop. Can you please self-write a short and
descriptive commit message?
> - * Return BLK_STS_OK for mismatches as this function is intended to
> - * parse error status values.
> - */
> - return BLK_STS_OK;
> + return -EINVAL;
No need for an int return here, this can easily be done with a bool.