On 4/17/25 10:34 AM, Prasad Singamsetty wrote: > When CONFIG_FAIL_MAKE_REQUEST is not enabled, gcc may optimize out > calls to should_fail_bio() because the content of should_fail_bio() > is empty returning always 'false'. The gcc compiler then detects > the function call to should_fail_bio() being empty and optimizes > out the call to it. This prevents block I/O error injection programs > attached to it from working. The compiler is not aware of the side > effect of calling this probe function. That's working as designed and is what we would want. Rather than patch around that, why not just enable CONFIG_FAIL_MAKE_REQUEST for whatever you're trying to do? -- Jens Axboe