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

--- Comment #3 from Méven <[email protected]> ---
Git commit bf22fdb72b361273987f37a9dc2001cbf9f07f85 by Méven Car.
Committed on 18/10/2026 at 08:32.
Pushed by meven into branch 'master'.

kmountpoint: read a mount by its unique id with statmount()

On a cache miss, and after any change to the mount table,
currentMountPointForUniqueId() re-read the whole table with
currentMountPoints(), which statx()es every mount point and lists the gvfs FUSE
directory.
A statx() walks the path of the mount point. When a mount point is below a
network mount whose server does not answer, AT_STATX_DONT_SYNC does not stop
that walk from asking the server. The lookup then blocked, even for the id of a
local disk. With a tmpfs mounted inside an NFS hard mount whose server was cut
off, isSlow() of a local item blocked for more than 15 s. It now takes about 1
ms.

statmount() reads one mount from the kernel mount tree without walking a path.
It came with Linux 6.8, like STATX_MNT_ID_UNIQUE. A kernel that does not report
supported_mask keeps the table re-read.
Related: bug 272361

M  +26   -0    autotests/kmountpointtest.cpp
M  +1    -0    autotests/kmountpointtest.h
M  +15   -0    src/core/ConfigureChecks.cmake
M  +1    -0    src/core/config-kmountpoint.h.cmake
M  +107  -5    src/core/kmountpoint.cpp

https://invent.kde.org/frameworks/kio/-/commit/bf22fdb72b361273987f37a9dc2001cbf9f07f85

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

Reply via email to