Seeking guidance on detecting mount point inactivity

Raka Gunarto rakagunarto at gmail.com
Sun Jul 5 12:34:23 EDT 2026


On Sun, Jul 5, 2026 at 6:04 AM Ali Nasrolahi <a.nasrolahi01 at gmail.com> wrote:
> For example, a workload may repeatedly open a file, perform a small
> amount of work, close it, sleep for a short time, and then repeat. If I
> immediately started draining the mount every time the reference count
> reached zero, the system would constantly interrupt some workload.

Are your workloads okay to wait indefinitely on a call to open()? I
believe you can use the fanotify permission events (FAN_OPEN_PERM) to
queue the call and then poll for active handles until they close.
After the maintenance operations then respond FAN_ALLOW to the
requests in the queue.

Raka



More information about the Kernelnewbies mailing list