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 527682 - Wish for baobab --one-file-system
Wish for baobab --one-file-system
Status: RESOLVED OBSOLETE
Product: baobab
Classification: Core
Component: general
git master
Other All
: Normal enhancement
: ---
Assigned To: Baobab Maintainers
Baobab Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-04-12 10:33 UTC by Sam Morris
Modified: 2013-07-20 09:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add one_filesystem-option-to-preference dialog (4.80 KB, patch)
2008-09-02 22:19 UTC, Stephane Glondu
none Details | Review
Actually implement the one_filesystem option (1.70 KB, patch)
2008-09-02 22:20 UTC, Stephane Glondu
none Details | Review
Add-one_filesystem-option-to-preference-dialog in trunk (4.86 KB, patch)
2008-09-25 16:30 UTC, Stephane Glondu
none Details | Review
Actually-implement-the-one_filesystem-option in trunk (1.95 KB, patch)
2008-09-25 16:31 UTC, Stephane Glondu
none Details | Review
Add one_filesystem option to preference dialog (4.86 KB, patch)
2009-06-11 08:09 UTC, Stephane Glondu
none Details | Review
Actually implement the one_filesystem option (2.18 KB, patch)
2009-06-11 08:11 UTC, Stephane Glondu
none Details | Review

Description Sam Morris 2008-04-12 10:33:02 UTC
[ forwarded from http://bugs.debian.org/475636 ]

The du command has --one-file-system, which allows you to examine the
usage of the / filesystem without uselessly scanning NFS mounts like
/usr and /home.  It would be nice if baobab also made it easy to scan
a SINGLE filesystem.

By default it seems to scan all filesystems, and one must remember to
toggle individual filesystems on/off in Edit > Preferences (which is
tedious).  Furthermore I noticed that a manual mount done with

    sudo mount fs:/srv /srv

could not be disabled in baobab's Edit > Preferences dialog, because
it was not listed as a filesystem.  I had to umount /srv, start baobab
and wait for it to finish collecting data, then remount /srv!
Comment 1 Roumano 2008-07-09 08:02:48 UTC
Yes it's will be great to have this.
It's will be great too, to have this on the "scan remote folder"
Exemple : 
I have to scan the "/" for a machine because this one is full, boabob will display all mounted device ( nfs, /mnt , ... )
Comment 2 Stephane Glondu 2008-09-02 22:19:34 UTC
Created attachment 117884 [details] [review]
Add one_filesystem-option-to-preference dialog
Comment 3 Stephane Glondu 2008-09-02 22:20:08 UTC
Created attachment 117885 [details] [review]
Actually implement the one_filesystem option
Comment 4 Stephane Glondu 2008-09-02 22:22:35 UTC
I've attached two patches of my own that implement the requested feature.

Known issues:
 * Files hidden by mount points are ignored altogether. I don't event know whether it is possible to get any information about them.
 * The mount points themselves are also hidden.
Comment 5 Paolo Borelli 2008-09-03 21:36:46 UTC
interesting... we are feature and ui frozen for 2.24, but we should revisit this for the next version.
Comment 6 Stephane Glondu 2008-09-25 16:30:50 UTC
Created attachment 119379 [details] [review]
Add-one_filesystem-option-to-preference-dialog in trunk

Updated patch against the last trunk
Comment 7 Stephane Glondu 2008-09-25 16:31:20 UTC
Created attachment 119380 [details] [review]
Actually-implement-the-one_filesystem-option in trunk

Updated against last trunk
Comment 8 Stephane Glondu 2008-09-25 16:32:30 UTC
Sorry for the mess, I've obsoleted the wrong patch with my last attachment...
Comment 9 Roumano 2008-10-19 08:59:44 UTC
Paolo, it's can be revisit for the next version ?
Comment 10 Stephane Glondu 2009-04-08 16:26:47 UTC
Any news on this bug?
Comment 11 Stephane Glondu 2009-06-11 08:09:52 UTC
Created attachment 136318 [details] [review]
Add one_filesystem option to preference dialog

Updated patch, known to work with 2.26.0
Comment 12 Stephane Glondu 2009-06-11 08:11:18 UTC
Created attachment 136319 [details] [review]
Actually implement the one_filesystem option

Updated, known to work with 2.26.0
Comment 13 Paolo Borelli 2009-06-11 12:58:41 UTC
Sorry for the big delay :(

The patch makes sense to me, however I do not like very much "_Do not cross filesystem borders" as a string exposed in the UI. The HIG suggest to not use negative, so the checkbox should be somthing like "Restrict to one filesystem" (better suggestion are welcome!) and be off by default.


Comment 14 Paolo Borelli 2009-06-11 13:00:16 UTC
+	if (baobab.bbEnableOneFilesystem && g_file_info_get_attribute_uint32(info, G_FILE_ATTRIBUTE_UNIX_DEVICE) != device)

The patch also need to be robust to the case where the UNIX_DEVICE attribute is not available, so you should check with g_file_info_has_attribute and act accordingly.
Comment 15 Stephane Glondu 2009-06-12 05:39:07 UTC
(In reply to comment #14)
> +       if (baobab.bbEnableOneFilesystem &&
> g_file_info_get_attribute_uint32(info, G_FILE_ATTRIBUTE_UNIX_DEVICE) != device)
> 
> The patch also need to be robust to the case where the UNIX_DEVICE attribute is
> not available, so you should check with g_file_info_has_attribute and act
> accordingly.

What about g_file_info_get_attribute_* calls in baobab_hardlinks_array_{has,add} (in the same file)?

BTW, if we accept a global justification for not checking an attribute presence, one could say that the checks in baobab_hardlinks_array_add are not needed because they have already been done in baobab_hardlinks_array_has... but since there is no way for this check to be performed automatically by the compiler, maybe it's not such a good idea. However, the retrieval of the attributes could be (obviously) factored between both functions.
Comment 16 Franklin PIAT 2010-04-23 09:00:30 UTC
Hello,

Any news on this bug?

Gnome now monitors root filesystem and notifies logged on users when the disk space gets low with:
  "The volume `Filesystem root` has only 123.4 MB disk
   space remaining"

It then offers to "Examine" the situation using Baobab. => Great.

It would have been much more useful (and faster), if baobab where supporting --one-file-system.

BTW, thanks for baobab, it is a great tool.

Franklin
Comment 17 Stefano Facchini 2013-07-20 09:45:41 UTC
Mountpoinst are now excluded by default