Opened 14 years ago
Closed 8 years ago
#6683 closed bug (invalid)
KDL when unplugging a mounted USB flash stick
Reported by: | x-ist | Owned by: | axeld |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | System/Kernel | Version: | R1/Development |
Keywords: | Cc: | umccullough, mdisreali@… | |
Blocked By: | Blocking: | #11704 | |
Platform: | All |
Description
After having booted Haiku from an USB flash stick "A" and having plugged in another flash stick "B", mounting "B" and unplugging it afterwards leads to KDL.
One has to unmount the drive first to be able to safely remove the stick!
Attachments (2)
Change History (21)
follow-ups: 2 3 comment:1 by , 14 years ago
Version: | R1/alpha2 → R1/Development |
---|
comment:2 by , 14 years ago
Component: | - General → System/Kernel |
---|---|
Owner: | changed from | to
Replying to Disreali:
Every OS that I've used has the same requirement. That won't change. You answered your own question.
Sure, but usually the result is data loss on the stick in question, not an OS panic. In this case however, the problem actually lies in the block cache, since it considers any failure to write a block back to disk as critical (which would probably bite you if a hard disk had a bad block as well). That should probably be reworked so the error can be propagated back to the originator of the write request, so decisions about how critical the failure is can be made where needed.
follow-up: 12 comment:3 by , 14 years ago
One has to unmount the drive first to be able to safely remove the stick!
Every OS that I've used has the same requirement. That won't change. You answered your own question.
The OSes I used show a message box (at worse), when you pull out the stick. Wrong user behavior must be tolerated at this point.
follow-up: 10 comment:4 by , 14 years ago
The panic is only a debug helper, and should be removed for actual releases (I would remove it once we go beta).
In any case, please keep in mind that you've just corrupted some data on that stick, and the OS can't do anything about it but show you an error alert (or KDL in the case of Haiku ;-)).
follow-up: 6 comment:5 by , 14 years ago
Thanks for clarification about the KDL!
If it's not the Haiku system stick and its idle, i.e. there was no transaction for minutes I don't see a reason why I shouldn't be allowed to remove the stick.
Anyway, if there were transactions which must not be interrupted, an overlay above the drive icon indicating that the stick is "busy" would be really helpful. This way I would obviously see when its safe to unplug the stick.
comment:6 by , 14 years ago
Replying to x-ist:
Anyway, if there were transactions which must not be interrupted, an overlay above the drive icon indicating that the stick is "busy" would be really helpful. This way I would obviously see when its safe to unplug the stick.
There's less guess work if you just right-click, unmount :) That forces all transactions to the stick to be flushed immediately.
follow-up: 9 comment:8 by , 14 years ago
I think somewhere (perhaps it was some Linux distro) I've seen a prompt asking for the stick to be replaced so that writing can be finished. That's a neat solution if it's possible without too much work. Also it's probably worth forcing somewhat regular flushes for removable media. Windows XP offers some option about how much caching to use that is by default set to the option to flush writes instantly IIRC, even though it probably has a transfer speed penalty.
comment:9 by , 14 years ago
Replying to tangobravo:
Also it's probably worth forcing somewhat regular flushes for removable media.
This would be the best way to go in my opinion, i.e. to flush the pending data automatically after a certain period of time, let's say 3 to 5 seconds. Thus entering the "nonbusy" mode.
comment:10 by , 14 years ago
Replying to axeld:
In any case, please keep in mind that you've just corrupted some data on that stick, and the OS can't do anything about it but show you an error alert (or KDL in the case of Haiku ;-)).
I don't believe that's an accurate assertion.
I get a KDL when pulling out a readonly-mounted USB stick as well (usually after copying some files off it to the HD).
Anyway, this is one of the absolutely most annoying KDLs currently - there seems to be no way to recover from it and I always end up rebooting.
comment:11 by , 14 years ago
Cc: | added |
---|
comment:12 by , 14 years ago
Cc: | added |
---|
Replying to x-ist:
One has to unmount the drive first to be able to safely remove the stick!
Every OS that I've used has the same requirement. That won't change. You answered your own question.
The OSes I used show a message box (at worse), when you pull out the stick. Wrong user behavior must be tolerated at this point.
Sorry, you are right. Just ask umccullough.
comment:14 by , 14 years ago
by , 14 years ago
Attachment: | StickUnpludgedKdl.jpg added |
---|
KDL comming up imediatelly after pluggin out
by , 14 years ago
Attachment: | StickUnpludgedKdl_Continue.jpg added |
---|
Next KDL after performing "continue".
comment:17 by , 10 years ago
Blocking: | 11704 added |
---|
comment:19 by , 8 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
The panic should still be active, since we haven't reached the beta yet. That's not a bug, though. The other issues mentioned here should already be fixed.
Replying to x-ist:
Every OS that I've used has the same requirement. That won't change. You answered your own question.