> On Apr 17, 2025, at 10:50 AM, Jens Axboe <axboe@xxxxxxxxx> wrote: > > 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? We do not have CONFIG_FAIL_MAKE_REQUEST enabled on the production (UEK) Kernels. We have a bpf program that was working before we switched to gcc version 14 compiler. We tried with asm(“”) option to establish side effect and that also works. We can use that option as Miguel suggested. Thanks, —Prasad