meven added a comment.
We might want to use Solid instead since it is capable of sending signals when mnttab is updated, rather than like here having a mount point list updated every 5 seconds. With this code we might have issues with potential run condition : when there is a mount within the 5 seconds cache refresh window and this function is called, it will return incorrect data by default mount point for / . If this filesystem becomes unresponsive right away, this will cause a freeze because the slowness state would be incorrect. And a great thing I learned more about at Fosdem, there is a new upcoming Linux API io_uring https://lwn.net/Articles/810414/ that will allow us to make asynchronous statx calls with timeout (linux 5.6+), making dealing with unresponsive file system that much easier. In the meantime this works. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D26407 To: meven, #frameworks, ngraham, broulik, dfaure Cc: anthonyfieroni, kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham, bruns