GNOME Bugzilla – Bug 563793
unmount shares when host is unreachable
Last modified: 2018-09-21 16:32:23 UTC
GVFS should have a common API so that backends can easily subscribe to network connections and will all automatically dismount shares when a network connection has been lost.
any progress on this? Can this happen during 2.25 cycle still?
We have GNetworkMonitor in gio now
Created attachment 290509 [details] [review] sftp: unmount if host unreachable It isn't unusual backends hang/crash when network is changed (e.g. after suspend) therefor we should to use network monitor in backends. I think it affects all backends in different manners. Those hangs could freeze applications or whole desktop (e.g when using sync calls). Some of those situations are reported (especially for smb): https://bugzilla.gnome.org/show_bug.cgi?id=725572 https://bugzilla.redhat.com/show_bug.cgi?id=1049867 https://bugzilla.redhat.com/show_bug.cgi?id=909682 There is implementation for sftp backend. Other backends will follow if you like it...
The patch itself mostly looks OK (although the default port for sftp is 22, not 115, and 0 *is* a valid port number). However, it is a feature of TCP that various networks can come and go while the connection remains up. For example, if I've got an sftp mount open, I close the lid of my laptop and walk to the next room and carry on working, this patch would unmount the backend (due to suspend) even though the connection is still up and valid. We need to think carefully about how to apply these changes in a way that they are useful without breaking existing workflows. Also, any backend which crashes at any point should be fixed :-) And applications waiting on sync calls should probably also be fixed...
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gvfs/issues/76.