Here you probably want fanotify, not inotify. The later would require setting up a lot of inotify entries, recursing through the filesystem.
https://man7.org/linux/man-pages/man7/fanotify.7.html
I think fanotify does xattrs, but I haven't tested.
https://man7.org/linux/man-pages/man7/fanotify.7.html
I think fanotify does xattrs, but I haven't tested.
Would be interesting to compare the chances of race conditions with inotify vs BPF for this contrived use-case.
Doesn’t take away from the original point that bpf is cool.