https://bugs.kde.org/show_bug.cgi?id=395023

--- Comment #8 from fanzhuyi...@gmail.com ---
Did some debugging, and it turns out the issue is rather complicated.

The current code checks for the mount point of a path using two conditions
(https://invent.kde.org/frameworks/kio/-/blob/c43c6a06d25d8281bc898eb0ba3032840bf9d53b/src/core/kmountpoint.cpp#L442)
1. The device id of the mount point (as reported in /proc/self/mountinfo) needs
to match the device id of the path
2. The path needs to start with the path of the mount point.

However, for btrfs, the device id of the mount point reported by stat and in
mountinfo are different (see references).

In my view, this leaves us with the following options:
1. Resolve this as WON'T FIX
2. Revert to the old behavior of not using device id, and only using the
longest matching prefix to find the mount point of a path.
(https://invent.kde.org/frameworks/kio/-/merge_requests/503)
3. Find some other way to find the mount point of a path.

Would other developers/contributors be able to comment on this?

Thanks!

References:
https://bugzilla.redhat.com/show_bug.cgi?id=711881
https://stackoverflow.com/questions/39494077/linux-stat2-call-gives-non-existing-device-id
https://linux-btrfs.vger.kernel.narkive.com/AXOOKc9G/why-does-stat-return-invalid-st-dev-field-for-btrfs

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to