What's required to make removal of a mounted USB stick safe?

Dmitry Sivachenko demon at FreeBSD.org
Thu May 7 10:12:32 UTC 2015


> On 7 мая 2015 г., at 9:23, Edward Tomasz Napierała <trasz at FreeBSD.org> wrote:
> 
> 
> Dnia 6 maj 2015 o godz. 22:49 Ryan Stone <rysto32 at gmail.com> napisał(a):
> 
>> Currently FreeBSD stands a fair chance at panicking if a mounted USB drive
>> is removed while I/O is in flight.  Does anybody know what work is involved
>> to have the kernel safely recover from this case?  Losing data from the
>> drive is expected of course but there's no reason that the entire kernel
>> has to crash.
> 
> I've spent some time on this few years ago, and got it to work, except for one case: UFS with softupdates.  It's possible that some regressions have been introduced since then.  What's the filesystem?  Do you have a backtrace?


Recently I forgot to unmount a partition on failed disk (UFS+SU), and after disk was removed it was a kernel panic (something related to SU but I did not save the trace).

stable/10


More information about the freebsd-hackers mailing list