Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Nov 2016 13:46:09 -0500
From:      Lee D <embaudarm@gmail.com>
To:        freebsd-arm <freebsd-arm@freebsd.org>
Subject:   SD-Card bug, eject without umount
Message-ID:  <CANC_bnMrisfegB6TnD5=8P0ZK5oxkXt2WdWJcx0n7md6VTDzRA@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANC_bnMrisfegB6TnD5=8P0ZK5oxkXt2WdWJcx0n7md6VTDzRA>