https://bugs.kde.org/show_bug.cgi?id=452924
Kenneth So <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #37 from Kenneth So <[email protected]> --- (In reply to kde.b341l from comment #35) > (In reply to Matt from comment #28) > > Inspired by Alex's patch, but not wanting to re-compile kio after every > > update, I wrote a temporary fix for this issue using LD_PRELOAD, which only > > requires a single compilation and should work as kio/Dolphin updates. It > > simply intercepts statfs() syscalls and returns a fake filesystem type of > > "ext4" for NFS filesystems. KFileItemPrivate::isSlow() calls > > KFileSystemType::fileSystemType() which calls statfs(). > > > > https://gist.github.com/DownrightNifty/fbfdf50cac60c6d973ebef10438d7ee5 > > > > It seems this could be resolved upstream by allowing the user to choose > > which remote filesystems are designated as "slow". > > This patch was working well for me for the passed year but seems to have > stopped working with a recent update. > I genuinely can't understand how this isn't a bigger issue for people, but > maybe it's only happening on certain systems/configurations? > Wish I had something to offer beyond a plea, but If anyone happens to know > how to get Matts patch working again, or some other solution, I'd greatly > appreciate it. Matt's patch no longer works due to this MR: https://invent.kde.org/frameworks/kcoreaddons/-/merge_requests/548 The MR changed kio to use util-linux's libmount instead of statfs when available, therefore, patching statfs no longer works with recent update. However, in the MR, mnt_table_parse_mtab(table, nullptr) is called. When we have a look at the util-linux's source, we can see that the mnt_table_parse_mtab actually parses /proc/self/mountinfo. Therefore, we can "override" the file system types by having a script that continuously monitors /proc/self/mountinfo and outputs the modification to another file, say /tmp/mountinfo, and uses LD_PRELOAD to force that libmount function to use /tmp/mountinfo instead of /proc/self/mountinfo. Here's the gist: https://gist.github.com/kennethso168/eed0be7824cb1438b946cc4f7679068d Disclosure: I'm not a kernel nor C dev, so the code in the above gist is AI-assisted. -- You are receiving this mail because: You are watching all bug changes.
