Hacker News new | past | comments | ask | show | jobs | submit login

You can probably use a BPF return override on fsync and fdatasync and sync_file_range, considering that the main use case of that feature is syscall-level error injection.

edit: Or, even easier, just use the pre-built fail_function infrastructure (with retval = 0 instead of an error): https://docs.kernel.org/fault-injection/fault-injection.html




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: