Bug 1209989 - g_unix_mounts_get() ignores btrfs subvolumes
Summary: g_unix_mounts_get() ignores btrfs subvolumes
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: glib2
Version: 21
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Matthias Clasen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-08 15:27 UTC by Takehiko Abe
Modified: 2015-04-09 01:25 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-04-09 01:25:22 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Takehiko Abe 2015-04-08 15:27:44 UTC
g_unix_mounts_get() ignores btrfs subvolumes

This causes some misbehaviors like nautilus or 'gvfs-ls trash://' fails to list
trashed files. (e.g. http://askubuntu.com/questions/537055/ )

I think the culprit is the following portion of _g_get_unix_mounts() from
gio/gunixmounts.c:

|      /* ignore any mnt_fsname that is repeated and begins with a '/'
|       *
|       * We do this to avoid being fooled by --bind mounts, since
|       * these have the same device as the location they bind to.
|       * It's not an ideal solution to the problem, but it's likely that
|       * the most important mountpoint is first and the --bind ones after
|       * that aren't as important. So it should work.
|       *
|       * The '/' is to handle procfs, tmpfs and other no device mounts.
|       */
|      if (mntent->mnt_fsname != NULL &&
|         mntent->mnt_fsname[0] == '/' &&
|         g_hash_table_lookup (mounts_hash, mntent->mnt_fsname))
|        continue;

https://git.gnome.org/browse/glib/tree/gio/gunixmounts.c#n392

The code is not aware of the btrfs subvolumes.

Comment 1 Matthias Clasen 2015-04-09 01:25:22 UTC
I've filed an upstream bug for this here: https://bugzilla.gnome.org/show_bug.cgi?id=747540
Lets continue the discussion there.


Note You need to log in before you can comment on or make changes to this bug.