Filesystem monitoring was added to fanotify in kernel 5.1
and the first HSM feature was added to fanotify in kernel 6.12.
See this Linux Plumbers talk by fanotify maintainer Jan Kara for a
good overview:
https://lpc.events/event/18/contributions/1717/attachments/1648/3404/fanotify.pdfThis talk will present our work towards making those features available inside containers using two different strategies:
1. For filesystems that were mounted inside userns or idmapped into userns, userns admin would be able to use fanotify to monitor those filesystems.
2. For filesystems that were mounted by the host, container users would be able to subscribe to a service on the host to receive filesystem monitoring events contained to the scope of the container.