Subject: detachable device: stuck in biowait
To: None <tech-kern@NetBSD.ORG>
From: Ferry Sutanto <fsutanto@yahoo.com>
List: tech-kern
Date: 01/25/2002 16:29:27
Netbsd kernel gurus ...

I have hot-swappable compact flash mounted with FFS
with MNT_SYNCHRONOUS flag in my system. If I pull out
the compact flash during FTP session (doing a get),
the NetBSD kernel would do crazy stuff. I have put
some code in and I am down to 1 issue where the write
system call would wait forever because the kernel
calls biowait() function (in kern/vfs_bio.c) and in
that code, it calls for tsleep. And since the device
is gone, no interrupt would come and and wakeup the
sleep. I put some hacked in to wake up the sleep by
calling biodone(), but it doesn't work. 

Does anybody have that experience ?? Is there any
sample code I can look at ?

Thanks!

Ferry

__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com