Skip to content

indexer: Keep a GUnixMountMonitor to monitor current mounts

Reading through the glib code, it seems that if glib resorts to /proc/mounts to monitor the currently existing mounts, the g_unix_mount[_entries]_changed_since() API will implicitly rely on someone having created the GUnixMountMonitor singleton in order to reply correctly to this question.

The fallback used by glib is declaring the mount entries to be always changed, which make our recent code trying to cache mounts not quite effective in these paths. This is at least the case locally over toolbx.

In order to make the changed_since() API work as intended and fix caching, also create and cache a GUnixMountMonitor, so that glib internals are satisfied.

Merge request reports

Loading