Hello, On Fri, Feb 20, 2026 at 07:15:56PM +0200, Amir Goldstein wrote: ... > > Adding a comment with the above content would probably be useful. It also > > might be worthwhile to note that fanotify recursive monitoring wouldn't work > > reliably as cgroups can go away while inodes are not attached. > > Sigh.. it's a shame to grow more weird semantics.
Yeah, I mean, kernfs *is* weird. > But I take this back to the POV of "remote" vs. "local" vfs notifications. > the IN_DELETE_SELF events added by this change are actually > "local" vfs notifications. > > If we would want to support monitoring cgroups fs super block > for all added/removed cgroups with fanotify, we would be able > to implement this as "remote" notifications and in this case, adding > explicit fsnotify() calls could make sense. Yeah, that can be useful. For cgroupfs, there would probably need to be a way to scope it so that it can be used on delegation boundaries too (which we can require to coincide with cgroup NS boundaries). Would it be possible to make FAN_MNT_ATTACH work for that? Thanks. -- tejun

