KDE is correcting a long-standing mismatch between file-copy notifications and what has actually reached removable storage. Since a bug report was opened in 2011, Plasma’s progress indicators and completion messages could show a copy to a USB drive as finished once the data had entered the computer’s local cache, even though it was still waiting to be written to the device. This was especially consequential when moving files, because the originals could be deleted while the copies remained only in memory. The issue attracted more than 77 comments and 17 duplicate reports, but proving when data was truly written without slowing every copy took years.
KDE Frameworks 6.32, expected next month, will use Linux’s sync_file_range() call so KIO can wait for the relevant data to be written before reporting completion. Developers identified this call shortly after the original report, but getting it right proved difficult: earlier attempts waited for the wrong writeback window, so they did not actually wait for the data being written. Other efforts included warning users when ejecting a device that it was still writing, and testing cachestat(), which can report dirty data but only for one file at a time. The change resolves a persistent usability problem by making copy notifications correspond more closely to the point at which files are safely on the USB drive.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.