GNOME Bugzilla – Bug 518675
No purging of SMB shares
Last modified: 2018-09-21 16:18:22 UTC
If I browse smb:/// I often see shares that are no longer available (personal shares of family members who don't have the PCs running all day long). Even doing a "refresh" won't remove the shares, clicking them will produce an error. Is there no way of telling that a share is no longer available?
Well, for performance reasons we have to cache this, but the caches should time out eventually... Not sure what is happening for you.
Ok, eventually... but, are we talking seconds, minutes or hours? Is there a way to see better what's going on under the hood? Some logfile perhaps?
Michael, there's no cache purging at all currently. Alex, Simo mentioned talking to derrell@samba.org about getting more information on how to use SMBC_remove_unused_server (samba >= 3.2.0), or the remove_unused_server_fn callback (older versions). Simo mentions that we'd need to scan for the specific server, and remove it ourselves if it's not there.
More than three years later and I still run into this problem. Anyway I opened a bug at [https://bugs.archlinux.org/task/23091] and was redirected here. The lack of cache purging means the Samba GVFS backend fails to refresh the network shares domain browse list. It will show two-day old computers from a completely different network, and no computers from the current network. Until restarted.
(In reply to comment #3) > Simo mentions that we'd need to scan for the specific server, and remove it > ourselves if it's not there. That might be the second thing. The first thing is that there actually is an internal cache that expires in #define DEFAULT_CACHE_EXPIRATION_TIME 10 seconds. There's also a hashtable used by smbclient calls. You can try commenting the following calls out in do_mount() to see if it improves things: smbc_setFunctionAddCachedServer() smbc_setFunctionGetCachedServer() smbc_setFunctionRemoveCachedServer() smbc_setFunctionPurgeCachedServers()
-- 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/37.