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 313639 - unmounting a removable device should spawn a progess bar
unmounting a removable device should spawn a progess bar
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: File and Folder Operations
2.13.x
Other All
: High major
: 2.14.x
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 321192 321390 324953 325505 337591 (view as bug list)
Depends on: 329098
Blocks:
 
 
Reported: 2005-08-16 16:03 UTC by Martin Pitt
Modified: 2007-03-14 22:48 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
Proposed patch (5.71 KB, patch)
2006-01-29 16:48 UTC, Christian Neumair
needs-work Details | Review
Ubuntu patch (5.59 KB, patch)
2006-03-16 17:20 UTC, Martin Pitt
none Details | Review

Description Martin Pitt 2005-08-16 16:03:36 UTC
USB sticks, hard disks, and the like take a while to actually physically write
the write cache after unmounting them. umount (and pumount) block until this is
finished. However, when such a device is unmounted in Gnome, the user does not
have any feedback about when it is safe to physically remove the device.

Unmounting asynchronously mounted devices should spawn a progress bar or at
least an indicator that the user needs to wait.

Other information:
This was reported as Ubuntu bug:
https://bugzilla.ubuntu.com/show_bug.cgi?id=13169

It also has some ideas and a small wrapper "gumount.c" which implements this
progress bar. It needs some polishing, though.
Comment 1 Allison Karlitskaya (desrt) 2005-08-16 17:16:48 UTC
I was thinking about gumount, and it might make sense to encorporate this UI
directly into libgnome-vfs.

Martin: my original idea with gumount.c was that I want to see this fixed in
time for breezy and it's definitely too late for this feature to make it into
libgnome-vfs 2.12.0.
Comment 2 Allison Karlitskaya (desrt) 2005-08-16 17:27:02 UTC
Oops.  Sorry.

I forgot that libgnome-vfs doesn't (can't) depend on GTK.
Comment 3 Sebastien Bacher 2005-11-13 13:21:14 UTC
*** Bug 321192 has been marked as a duplicate of this bug. ***
Comment 4 Sebastien Bacher 2005-11-13 20:23:35 UTC
*** Bug 321390 has been marked as a duplicate of this bug. ***
Comment 5 Spoilerhead 2005-12-07 16:54:14 UTC
i think the severity should be changed to normal or major.
Lot's of users get data loss because they remove their media befor the unmount
is completed. you simply don't know when to unplug the device.
Comment 6 Sebastien Bacher 2005-12-25 11:17:16 UTC
*** Bug 324953 has been marked as a duplicate of this bug. ***
Comment 7 Sebastien Bacher 2006-01-02 13:02:52 UTC
*** Bug 325505 has been marked as a duplicate of this bug. ***
Comment 8 Christian Neumair 2006-01-04 11:30:10 UTC
Reassigning to Nautilus.

If anybody is interested in resolving this and has some time, and an USB stick (I don't have any, else I'd patch Nautilus), check out
src/file-manager/fm-directory-view.c:action_unmount_volume_callback and volume_or_drive_unmounted_callback. You'd have to create a progress dialog and destroy it in volume_or_drive_unmounted_callback. Maybe action_eject_volume_callback also deserves a progress dialog.
Comment 9 Christian Neumair 2006-01-04 11:30:51 UTC
Raising severity/priority.
Comment 10 Josh Lee 2006-01-22 22:54:42 UTC
I think the scariest part of this bug is that the icon disappears from the desktop *before* the unmount is complete. Even without a progress bar to make things clear, users would be *much* less likely to lose data if the icon stayed until the device was actually unmounted.
Comment 11 Christian Neumair 2006-01-29 16:48:12 UTC
Created attachment 58330 [details] [review]
Proposed patch

This patch adds a progress bar dialog when unmounting drives/volumes. However, it turns out that it isn't enough. As Josh pointed out, GnomeVFS emits the "volume-unmounted" signal before the data has been written on the USB device.
Comment 12 Christian Neumair 2006-01-29 17:19:23 UTC
The patch doesn't quite get it when there are multiple volumes associated with a particular drive, because the callback is not invoked exactly once and may break. Marking it as needs-work for now, maybe we have to ref/unref it based on the length of the gnome_vfs_drive_get_mounted_volumes list.
Comment 13 Allison Karlitskaya (desrt) 2006-01-30 01:23:45 UTC
Crikey!  This one fell off my radar when it changed products.
Comment 14 Martin Pitt 2006-03-16 17:20:30 UTC
Created attachment 61374 [details] [review]
Ubuntu patch

FYI, this is the Ubuntu nautilus patch, I shamelessly stole the dialog from Ryan's patch (thanks, Ryan). We definitively want this for our next Ubuntu release, so sorry for diverting from Gnome upstream.
Comment 15 Sergej Kotliar 2006-03-28 21:08:27 UTC
There is another bug on the same topic, that has a suggestion on how to indicate the need for unmounting in nautilus. What do you guys think?

http://bugzilla.gnome.org/show_bug.cgi?id=336392#c3
Comment 16 Sebastien Bacher 2006-04-07 15:00:29 UTC
*** Bug 337591 has been marked as a duplicate of this bug. ***
Comment 17 Sven Rech 2006-04-07 22:21:17 UTC
The Dialog that pops up with the 2 patches proposed, should also show the real progress copying the files (and the copy speed and estimated finish time etc.).
I know this isn't easy, because the kernel doesn't give much information about the dirty buffer, but there must be a possibility...
Comment 18 Christian Kirbach 2006-07-20 13:36:02 UTC
We should do one step at a time ... because I use Ubuntu I saw the Ubuntu patch in action several times. Looks fair enough to me and certainly way better than without.
Comment 19 Martin Pitt 2006-11-01 16:31:08 UTC
For the records:

With the advent of gnome-mount this is largely obsolete, since gnome-mount already creates a notification for this purpose.
Comment 20 Christian Kirbach 2006-11-02 12:27:15 UTC
Ubuntu seems to be happy.
Christian. will you apply the Ubuntu patch?
Comment 21 Raphael Bosshard 2007-03-14 12:18:45 UTC
I think this bug can be closed, can't it?
Comment 22 David Prieto 2007-03-14 12:34:34 UTC
Definitely, the current notification is more than satisfactory.

Only thing I would still whine about is, I seem to recall that if you click on the "hold on, data is being written" bubble to make it disappear, the "ok, you can pull the USB out now" does not appear.

But I'm not even sure of this, could someone please check?
Comment 23 Christian Kirbach 2007-03-14 22:48:51 UTC
since we have a progress bar now, I am closing this report.

David: bubbles are notifications, if I presume correctly. sounds like a different issue not related ot this one. feel free to file a new bug.