Re: File System Filter and Disk Eject
Re: File System Filter and Disk Eject
- Subject: Re: File System Filter and Disk Eject
- From: Dan Markarian <email@hidden>
- Date: Thu, 26 Jul 2007 13:44:58 -0400
Hey Duane,
For various reasons, the kext keeps an open connection (using
open()) to
it's provider. If that connection is closed then the disk can be
ejected. Clearly I'm at fault here, so I am looking for suggestions.
You must not keep the provider open when you have no clients that have
you open in Storage Family. It is a lazy open scheme. We realize
that someone has it open at the block storage driver and deny the
ejection there.
Dan
On 26 Jul 2007, at 1:34 PM, Duane Murphy wrote:
Hell Folks,
I'm working on a file system filter kext. The kext fails to unload and
the disk it is attached to fails to completely eject. By completely
eject, I mean that the volume is removed from the Finders desktop, but
disk utility still shows the disk and the volume grayed out. (The
volume
can even be remounted.) Selecting the disk in disk utility and
selecting
Eject gives an error message indicating open resources.
For various reasons, the kext keeps an open connection (using
open()) to
it's provider. If that connection is closed then the disk can be
ejected. Clearly I'm at fault here, so I am looking for suggestions.
Note that if the disk is removed (ie a flash drive), the kext cleans
up
and is removed because I override willTerminate() to clean up. Clearly
this is too late.
I'd like to find out what I can do to determine that the disk is
trying
to be ejected so that I can clean up and remove my connection. I
have no
problem removing the connection, I just need to know when.
I've looked at the terminate chain (terminate, requestTerminate,
willTerminate, terminateClient) but those are too late. They seem to
be
called when the media is removed and you have no choice.
Thanks for your suggestions.
...Duane
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
@apple.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden