GNOME Bugzilla – Bug 313639
unmounting a removable device should spawn a progess bar
Last modified: 2007-03-14 22:48:51 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.
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.
Oops. Sorry. I forgot that libgnome-vfs doesn't (can't) depend on GTK.
*** Bug 321192 has been marked as a duplicate of this bug. ***
*** Bug 321390 has been marked as a duplicate of this bug. ***
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.
*** Bug 324953 has been marked as a duplicate of this bug. ***
*** Bug 325505 has been marked as a duplicate of this bug. ***
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.
Raising severity/priority.
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.
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.
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.
Crikey! This one fell off my radar when it changed products.
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.
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
*** Bug 337591 has been marked as a duplicate of this bug. ***
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...
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.
For the records: With the advent of gnome-mount this is largely obsolete, since gnome-mount already creates a notification for this purpose.
Ubuntu seems to be happy. Christian. will you apply the Ubuntu patch?
I think this bug can be closed, can't it?
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?
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.