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 625310 - Can't disable NFS mounts
Can't disable NFS mounts
Status: RESOLVED OBSOLETE
Product: baobab
Classification: Core
Component: general
git master
Other All
: Normal normal
: ---
Assigned To: Baobab Maintainers
Baobab Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-07-26 12:40 UTC by Kamil Páral
Modified: 2012-10-24 08:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to expand what are considered virtual filesystems (704 bytes, patch)
2010-08-16 04:12 UTC, Alex Dehnert
none Details | Review
Patch to allow more options for filesystems to exclude (2.25 KB, patch)
2010-08-16 04:13 UTC, Alex Dehnert
none Details | Review

Description Kamil Páral 2010-07-26 12:40:02 UTC
When I open the Preferences dialog, I can disable some mounted disks from root analysis. But NFS mounts are not mentioned there, so I can't disable them. Baobab then analyzes them which takes eternity.

NFS mounts should either be listed in the preferences dialog (so they can be disabled) or they shouldn't be analyzed at all by default (if user needs it, he can use "Scan a remote folder" or "Scan a folder" option).
Comment 1 gnome-bugs 2010-08-07 14:31:26 UTC
I can confirm that baobab treats network mounts ( like /net via autofs ) as local file systems (it doesn't skip them, but it should!)
Comment 2 Alex Dehnert 2010-08-16 04:12:23 UTC
Created attachment 167927 [details] [review]
Patch to expand what are considered virtual filesystems
Comment 3 Alex Dehnert 2010-08-16 04:13:43 UTC
Created attachment 167928 [details] [review]
Patch to allow more options for filesystems to exclude
Comment 4 Alex Dehnert 2010-08-16 04:14:38 UTC
This is also hitting me with /afs (see also https://bugzilla.gnome.org/show_bug.cgi?id=614789 --- I'm commenting here instead of there because while my particular use case matches that better, the specific bug I'm looking at is "Can't disable [some] mounts", not "Add option to exclude specific folders").

One problem is that glibtop_get_mountlist (called around baobab/src/baobab-prefs.c line 242) returns a fairly limited collection of mounts when passed all_fs=0 (all_fs being the second argument) instead of 1.

The all_fs parameter appears to be documented as:
"""The @code{all_fs} parameter specifies whether information about all
filesystems should be returned; this will include filesystem types like
@code{autofs} and @code{procfs}. You should not use this in disk usage
programs, but it can be useful to get a list of all currently mounted
filesystems."""

Despite the claim that all_fs should not be used in disk usage programs, I think it is wrong here. Presumably it means as an option for what to find the disk usage of; as options for what to *exclude* from computations,  being generous seems more reasonable.

Additionally, current code, around line 254, filters out mounts without an existing backing device or file. For things like FUSE filesystems, AFS, and presumably NFS, there are not generally extant files at mountentry->devname, but excluding them from disk usage calculations seems an eminently reasonable thing to do.

I've attached a two patch series (from output of git show) that appears to allow me to exclude /afs, while not cluttering up my options with things like /lib/init/rw, which would probably confuse many users.

Let me know if these patches look reasonable, and/or if there's anything I can do to improve them.
Comment 5 Paolo Borelli 2011-03-07 08:48:35 UTC
Review of attachment 167927 [details] [review]:

First of all sorry for the very late reply. Unfortunately the time available for baobab of all the current maintainers has been pretty limited lately...

This first patch seems unrelated to the main bug report. I have not yet tested it, but it seems wrong: the idea here is that we prevent recursion under /proc and /sys, so I do not see why we need both variants. If your patch is needed it seems to me that we are papering over a bug of the code doing the recursion.
Comment 6 Paolo Borelli 2011-03-07 08:56:18 UTC
Review of attachment 167928 [details] [review]:

Once again I had no time to actually test this: the patch explanation and code look reasonable, though I am bit worried if this lists additional stuff beside nfs etc.

What we really should do imho is to get rid of glibtop and use gio to get the list, maybe checking how palimpsest gets its list of mounted devices.
Comment 7 Christopher J. Madsen 2012-10-24 04:27:31 UTC
The same issue occurs with CIFS (i.e. Samba) mounts.  Baobab tries to scan them, and they don't show up in the device list so you can't exclude them.  The only workaround I could find was to unmount the shares while running baobab, which is hardly ideal.

I haven't had a chance to try the suggested patch and see if it works for CIFS mounts.
Comment 8 Stefano Facchini 2012-10-24 08:58:39 UTC
Since version 3.6 we moved away from glibtop in favor of gio (and gvfs) for obtaining the list of devices/mountpoints. Any problem with mounts not showing in the list should go there.