SD-Card bug, eject without umount

Lee D embaudarm at gmail.com
Sun Nov 20 18:46:11 UTC 2016


I am running 10.3 on Xilinx Zynq.

I've noticed an SD-Card bug.  If I am writing to an SD-Card, and then eject
the SD-Card without unmounting, everything appears to be fine.  However if
I then try to umount the SD-Card, the umount program hangs.  The  rest of
the system keeps running.

If I eject the SD-Card while NOT writing, but mounted, then I can later
umount OK.

This is a problem because the user can eject the card at any time, even
while the application is writing to it.  It's OK to lose data, but the
situation needs to be recoverable, and apparently it is not.

I noticed a post on FreeBSD.org here:

http://freebsdfoundation.blogspot.com/2009/08/safe-removal-of-active-disk-devices.html

They talk about fixing the kernel so that SD-Cards may be ejected while
mounted without causing a kernel panic.  However they don't say anything
about what happens if you interrupt a write operation.

Does anybody know if there is anything I can do to make it so that umount
doesn't hang in this situation?

Thanks.


More information about the freebsd-arm mailing list