gunixmounts: Use libmnt_monitor API for monitoring
The GUnixMountMonitor
object implements monitoring on its own currently.
Only the /proc/mounts
file changes are monitored. It is not aware of the
/run/mount/utab
file changes. This file contains the userspace mount
options (e.g. x-gvfs-notrash
, x-gvfs-hide
) among others. There is a
problem when /sbin/mount.<type>
(e.g. mount.nfs
) helper programs are
used. In that case, the /run/mount/utab
file is updated later than the
/proc/mounts
file and thus the GUnixMountMonitor
clients (e.g.
gvfs-udisks2-volume-monitor
, gvfsd-trash
) don't see the userspace
options until the next mount-changed
signal. Let's use the libmnt_monitor
API for monitoring instead and emit the mount-changed
signal also when the
/run/mount/utab
file is changed.
Related: https://issues.redhat.com/browse/RHEL-14607 Related: https://github.com/util-linux/util-linux/pull/2607