Re: [v2 for-next 1/3] block: reject unknown status tags in error injection rules
From: Haris Iqbal
Date: Wed Sep 02 2026 - 16:12:24 EST
On 9/2/26 15:58, Christoph Hellwig wrote:
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.
Ah yes. I'll correct it.
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?
My bad. I'll correct it.
- * 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.
True. I'll change it.
I'll wait for your comments for the other patches before sending a v3.