Subject: Re: detachable device: stuck in biowait
To: None <>
From: Ferry Sutanto <>
List: tech-kern
Date: 01/28/2002 18:59:34
Thank you for all the information. I have done all
that in normal cases. Right now, I am trying to put a
support in the kernel in a case where the
device/compact flash is pulled out during ftp write
session. FTP will call write to write to the flash and
write will call vn_write and eventuall access the
device driver. The problem I have now is that I
mounted the compact flash with MNT_SYNCHRONOUS so
bwrite (in vfs_bio.c) will call biowait to wait for
"write completion" interrupt from the device. Since
the device is already gone, no interrupt will come,
hence, the kernel hangs because it is waiting for
somebody to wake the buffer it puts to sleep (using
tsleep). I haven't solved this problem yet, but I
encountered another one. 

If the kernel calls bdwrite (delayed write), how does
it work. I see that somebody calls the bwrite and it
will eventual do the work. What is the condition that
the actual write will occur ?

Question on VOP_LEASE macro. It is not really obvious
which function will get executed for FFS. Can anybody
point it out to me ?

Man, this is just complicated stuff ...



--- gabriel rosenkoetter <> wrote:
> On Mon, Jan 28, 2002 at 11:41:15PM +0100, Jaromir
> Dolecek wrote:
> > Yes, I think this might be appropriate. Does it?
> How does the flash
> > device know it's going to be detached?
> USB and PCMCIA provide this kind notification, do
> they not?
> I know nothing of flash media standards, but one
> might hope for a
> little sanity...
> -- 
> gabriel rosenkoetter

> ATTACHMENT part 2 application/pgp-signature 

Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions!