Skip to content

make KMountPoint::List::findByPath use mnt_id if available

Michael Saxl requested to merge saxlm/kio:btrfs-mountpoint into master

/proc/self/mountinfo does not contain a matchig st_dev entry for btrfs. The proper way to get the mountpoint is to take the mnt_id value from statx instead of st_dev from mountinfo in findByPath. This will work for every filesystem type and is not btrfs specific.

Special handling is required for btrfs when filling st_dev. Instead of using the one from libmount use the one returned from stat on the mountpoint. This is needed because trashimpl uses st_dev as primary key and here we do not want to share the trash for the whole filesystem but have a separate for each mount.

BUG 474680

Edited by Michael Saxl

Merge request reports

Loading