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 758639 - Virtualbox shared folder is unmountable
Virtualbox shared folder is unmountable
Status: RESOLVED OBSOLETE
Product: gvfs
Classification: Core
Component: [obsolete] gdu volume monitor
1.12.x
Other Linux
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2015-11-25 09:52 UTC by dupingping
Modified: 2018-04-13 18:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
virtualbox shared folder support (802 bytes, patch)
2015-11-25 10:22 UTC, dupingping
rejected Details | Review
Styled for git and GNU C coding style. (1.65 KB, patch)
2015-11-25 13:53 UTC, dupingping
rejected Details | Review
virtualbox shared folder patch for udisk2volumemonitor (1.08 KB, patch)
2015-11-25 14:54 UTC, dupingping
needs-work Details | Review

Description dupingping 2015-11-25 09:52:08 UTC
When virtual Box's shared folder was mounted, it shows as "none /media/sf_sharedname" at /proc/mounts.
Now I patched the virtual box to add it's own entry as "sharename /media/sf_sharedname" at /proc/mounts.
After this patch, the gnome-vfs does not support it correctly.
It shows the shared folder as a disk volume that ejectable at the nautilus's left sidebar.
Comment 1 dupingping 2015-11-25 09:53:14 UTC
I already have the patch to commit.
Comment 2 Debarshi Ray 2015-11-25 10:12:23 UTC
Did you forget to attach the patch?
Comment 3 dupingping 2015-11-25 10:14:46 UTC
Yes, let me attach patch now.
Comment 4 dupingping 2015-11-25 10:22:08 UTC
Created attachment 316224 [details] [review]
virtualbox shared folder support

Virtual box is already modified.
It's related to the modification.
Comment 5 dupingping 2015-11-25 10:30:23 UTC
I attached the patch. And I did not know how to set the status.
Please understand about this point.
Comment 6 Ondrej Holy 2015-11-25 10:53:47 UTC
Thanks for your bug report.

I wonder what distribution are you using, because AFAIK recent distributions are using udisks2volumemonitor...

I wonder why it doesn't work correctly after you patched virtualbox... what is difference?

JFYI we don't care about importance field, but importance of this bug isn't really critical.
Comment 7 Ondrej Holy 2015-11-25 11:01:37 UTC
Review of attachment 316224 [details] [review]:

What happens if we unmount the share?

Could you please create the patch using "git format-patch" with some meaningful description? Please see:
https://wiki.gnome.org/Git/Developers#Contributing_patches

Also the coding style is wrong. Declarations should be at the beginning and there are also whitespace mistakes, please see:
https://developer.gnome.org/programming-guidelines/stable/c-coding-style.html#most-important-rule

::: ggdumount.c.orig
@@ +273,3 @@
+          if (mount->device_file){
+            g_free (mount->name);
+            mount->name = g_strdup (mount->device_file);

Why we can't use mount->mount_entry_name as it is used for all other cases?
Comment 8 dupingping 2015-11-25 11:02:31 UTC
I'm a Ubuntu Member. So I'm using Precise(Ubuntu12.04 LTS) and Trusty(Ubuntu14.04 LTS).
And I'm also a Debian Virtualbox Team member.
And at the virtualbox.org, I'm a contributor.
Virtual box's shared folder is automatically mounted while the system is booting.
And gvfs does not detect it correctly from /proc/mounts.
Current gvfs shows me /media/sf_sharedname as sf_sharedname.
And it is shown as ejectable. But could not ejected.
So I made the patch.
And I applied to become a GNOME member.
I'll be happy if you can support me for this applicant?
Best Regards.
P.S.
It's shown critical? Oh, I think that it's not critical.
I'm a beginner to this. Please understand about this point.
Comment 9 dupingping 2015-11-25 11:06:15 UTC
Yes, we could not use mount->mount_entry_name
It will be <sf_sharedname> rather than <sharedname> because It comes from the function, g_unix_mount_guess_should_display.
sf_sharedname is mountpoint name. And the mountpoint name is can be duplicated.
device name is only one can be identified.
Thank you and best regards.
Comment 10 dupingping 2015-11-25 11:10:26 UTC
Because the virtualbox does not support device node to monitor, once we un-mount the shared folder, we could not find it after un-mount.
And this is mounted by virtualbox automount process while booting, it could not be un-mounted by the gdu.
Best Regards.
Du Pingping.
And i need to remake and upload this patch for the coding style again?
Comment 11 Ondrej Holy 2015-11-25 13:41:43 UTC
BTW Ubuntu Trusty should be using udisks2volumemonitor already, does it work "correctly" with udisks2volumemonitor?

Sorry, but I doubt about we need special hacks for virtualbox share folders. We should be consistent in names, so we should use mount_entry_name as it is used in other cases (even if it can be duplicated).. and also if unmount works I don't see any reason why we should disable unmounting (it is expected that the mount disappears)...
Comment 12 dupingping 2015-11-25 13:53:11 UTC
Created attachment 316241 [details] [review]
Styled for git and GNU C coding style.

I created this patch again for git format-patch HEAD^ and GNU C coding style.
Comment 13 Bastien Nocera 2015-11-25 13:55:00 UTC
Stop changing the statuses of patches.
Comment 14 dupingping 2015-11-25 14:22:53 UTC
I tested it on Ubuntu 12.04 with gvfs 1.12.x.
Precise uses gdu-volume-monitor still.
Comment 15 dupingping 2015-11-25 14:29:47 UTC
14.04 shows it as sf_<sharename> rather than real <sharename>.
When i click eject button at there, it shows me an error message said that "Unable to unmount sf_<sharename>" and "umount: /media/sf_<sharename> is not in the fstab (and you are not root)."
Comment 16 dupingping 2015-11-25 14:54:09 UTC
Created attachment 316248 [details] [review]
virtualbox shared folder patch for udisk2volumemonitor

It's a udisk2volumemonitor.patch for virtualbox shared folder.
Comment 17 dupingping 2015-11-25 14:58:38 UTC
Comment on attachment 316248 [details] [review]
virtualbox shared folder patch for udisk2volumemonitor

It was made on gvfs git master.
Comment 18 Bastien Nocera 2015-11-25 14:58:51 UTC
Will you please stop changing the statuses of patches.
Comment 19 dupingping 2015-11-25 15:12:56 UTC
It's really not needed? It's really a bug when running with virtualbox 5.0.x version's addition iso.
You could not check it with virtualbox latest version.
Comment 20 Ondrej Holy 2015-11-26 11:57:40 UTC
Please do not change bug status either in such way...

I'm reopening the bug, because the _can_unmount flag might be determined in better way probably. I thought that it is possible to unmount the mount successfully from your previous comments, but it seems error is returned as per your recent comments. I don't want to add hacks for specific mounts, such as virtualbox, but we might want to use g_unix_mount_point_is_user_mountable to set _can_unmount flag for all mounts. It seems this function might do exactly what we need, but I have never tried. However it should be carefully tested to be sure we don't break anything...

I'm changing bug title consequently, because virtualbox folder IS supported (i.e. you can see it in Nautilus and you might browse files)...

As I said before, I would like to be consistent with other mounts. So I do not think it is bug that mount is named as "sf_sharename", device name might be better in this case, but it might be nonsense for other mounts... If you really think that the name should be different, then you should modify g_unix_mount_point_guess_name to be sure that same name is used also on other places. But I doubt about that the patch will be accepted.
Comment 21 Ondrej Holy 2015-11-26 11:59:02 UTC
Review of attachment 316248 [details] [review]:

As per previous comment.
Comment 22 Ondrej Holy 2018-04-13 18:14:39 UTC
Gdu volume monitor has been superseded by udisks2 volume monitor long time ago. I am closing this bug because many have been changed since this was reported. If this is still an issue with the recent gvfs releases, please reopen and change component to udisks2 volume monitor.