Hi,

On 25/06/2026 16:37, Ali Nasrolahi wrote:
Hello everyone,

I am working on a  problem involving managing some number of filesystem mounts (~1000+) and determining when a mount becomes inactive to do some
Honestly this does not sound like a good/sane setup to start with. Maybe zooming out and solving the overall requirement with a different setup might be smarter.

maintenance.
To be specific, the goal is to detect when a mounted filesystem has no remaining active file usage, and after it remains inactive for some period (e.g. 10 seconds), transition it into a state where new file opens are blocked so that maintenance operations can safely proceed. It must handle concurrent access from arbitrary applications, so correctness under races is quite challenging.

Why do you care about the filesystem level? If this is about device maintendance device activity might be more relevant than fs activity. (Remember there is caching and lots of other abstraction). It might also be easier to track bio requests for a specific device on the device level.

I don't know tools from the top of my head but I'm sure there are files for this in /sys/. There is also iotop and you can see its source code where it gets its info from. I'd also recommend reading brendan greggs System Performance book. It has 2 chapters on disks and block I/O, I'm sure you'll find good diagnostic tools there.

Best,
-- Richard

_______________________________________________
Kernelnewbies mailing list
[email protected]
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Reply via email to