After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 518675 - No purging of SMB shares
No purging of SMB shares
Status: RESOLVED OBSOLETE
Product: gvfs
Classification: Core
Component: smb backend
git master
Other Linux
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2008-02-25 18:55 UTC by Michael Monreal
Modified: 2018-09-21 16:18 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22



Description Michael Monreal 2008-02-25 18:55:25 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?
Comment 1 Alexander Larsson 2008-02-28 15:20:28 UTC
Well, for performance reasons we have to cache this, but the caches should time out eventually... Not sure what is happening for you.
Comment 2 Michael Monreal 2008-02-28 15:27:45 UTC
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?
Comment 3 Bastien Nocera 2008-03-05 20:40:54 UTC
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.
Comment 4 orbisvicis 2011-05-05 06:49:36 UTC
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.
Comment 5 Tomas Bzatek 2011-05-05 13:11:48 UTC
(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()
Comment 6 GNOME Infrastructure Team 2018-09-21 16:18:22 UTC
-- 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.