D23420: Use solid to check if a a KFileItem is located on a network mount
broulik added a comment. What about symlink resolution, though? Maybe this needs to check `linkDest()`, too. This might block but for our usecase in local files you have `UDS_LINK_DEST` populated on the kioslave side already. INLINE COMMENTS > kfileitem.cpp:766 > +const Solid::StorageAccess *storageAccess = > device.as(); > +if (path.startsWith(storageAccess->filePath())) { > +m_slow = Slow; If you have a location `/home/foo/foobar` and a slow mount `/home/foo/foo`, it will consider it slow because "starts with" REPOSITORY R241 KIO BRANCH solid-network-fs-check REVISION DETAIL https://phabricator.kde.org/D23420 To: meven, dfaure, #frameworks Cc: broulik, anthonyfieroni, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
D23420: Use solid to check if a a KFileItem is located on a network mount
meven marked 2 inline comments as done. REPOSITORY R241 KIO BRANCH solid-network-fs-check REVISION DETAIL https://phabricator.kde.org/D23420 To: meven, dfaure, #frameworks Cc: broulik, anthonyfieroni, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
D23420: Use solid to check if a a KFileItem is located on a network mount
meven updated this revision to Diff 64645. meven marked an inline comment as done. meven added a comment. Add a const REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D23420?vs=64538&id=64645 BRANCH solid-network-fs-check REVISION DETAIL https://phabricator.kde.org/D23420 AFFECTED FILES src/core/CMakeLists.txt src/core/kfileitem.cpp To: meven, dfaure, #frameworks Cc: broulik, anthonyfieroni, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
D23420: Use solid to check if a a KFileItem is located on a network mount
broulik added a comment. I'm always hesitant to use Solid but since `KFilePlacesModel` already queries Solid for everything, it has already loaded all its backends and queried everything, so the overhead of this during normal Dolphin use, is surprisingly negligible. +1 good call! :) REPOSITORY R241 KIO BRANCH solid-network-fs-check REVISION DETAIL https://phabricator.kde.org/D23420 To: meven, dfaure, #frameworks Cc: broulik, anthonyfieroni, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
D23420: Use solid to check if a a KFileItem is located on a network mount
anthonyfieroni added inline comments. INLINE COMMENTS > meven wrote in kfileitem.cpp:764 > Can't because of > > Solid::StorageAccess *storageAccess = device.as(); Get it as `const Solid::StorageAccess`, you can use `auto storageAccess = ...` REPOSITORY R241 KIO BRANCH solid-network-fs-check REVISION DETAIL https://phabricator.kde.org/D23420 To: meven, dfaure, #frameworks Cc: anthonyfieroni, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
D23420: Use solid to check if a a KFileItem is located on a network mount
meven marked an inline comment as done. meven added inline comments. INLINE COMMENTS > dfaure wrote in kfileitem.cpp:764 > const & Can't because of Solid::StorageAccess *storageAccess = device.as(); REPOSITORY R241 KIO BRANCH solid-network-fs-check REVISION DETAIL https://phabricator.kde.org/D23420 To: meven, dfaure, #frameworks Cc: anthonyfieroni, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
D23420: Use solid to check if a a KFileItem is located on a network mount
dfaure accepted this revision. dfaure added inline comments. This revision is now accepted and ready to land. INLINE COMMENTS > kfileitem.cpp:764 > +const QList devices = > Solid::Device::listFromType(Solid::DeviceInterface::NetworkShare); > +for (Solid::Device device : devices) { > +Solid::StorageAccess *storageAccess = > device.as(); const & REPOSITORY R241 KIO BRANCH solid-network-fs-check REVISION DETAIL https://phabricator.kde.org/D23420 To: meven, dfaure, #frameworks Cc: anthonyfieroni, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
D23420: Use solid to check if a a KFileItem is located on a network mount
meven marked an inline comment as done. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D23420 To: meven, dfaure, #frameworks Cc: anthonyfieroni, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
D23420: Use solid to check if a a KFileItem is located on a network mount
meven updated this revision to Diff 64538. meven added a comment. Fix logic REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D23420?vs=64537&id=64538 BRANCH solid-network-fs-check REVISION DETAIL https://phabricator.kde.org/D23420 AFFECTED FILES src/core/CMakeLists.txt src/core/kfileitem.cpp To: meven, dfaure, #frameworks Cc: anthonyfieroni, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
D23420: Use solid to check if a a KFileItem is located on a network mount
anthonyfieroni added inline comments. INLINE COMMENTS > kfileitem.cpp:767-771 > +m_slow = Slow; > +break; > +} > } > +m_slow = Fast; Wrong logic, when you set it to Slow, after break it will go to line 771 and became Fast again. Set it Fast before loop or check whether you change the m_slow value. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D23420 To: meven, dfaure, #frameworks Cc: anthonyfieroni, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
D23420: Use solid to check if a a KFileItem is located on a network mount
meven created this revision. meven added reviewers: dfaure, Frameworks. Herald added a project: Frameworks. Herald added a subscriber: kde-frameworks-devel. meven requested review of this revision. REVISION SUMMARY KFileSystemType uses statvfs syscall that blocks when a network fs mount becomes unresponsive because of a network disconnect for instance. The patch uses solid mount discovery to determine if the file is on a network mount. REPOSITORY R241 KIO BRANCH solid-network-fs-check REVISION DETAIL https://phabricator.kde.org/D23420 AFFECTED FILES src/core/CMakeLists.txt src/core/kfileitem.cpp To: meven, dfaure, #frameworks Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns