Re: Eject problem with optical disk
Re: Eject problem with optical disk
- Subject: Re: Eject problem with optical disk
- From: Terry Lambert <email@hidden>
- Date: Mon, 8 May 2006 15:01:20 -0700
On May 7, 2006, at 10:02 PM, Jeremy Pereira wrote:
Apologies if this is the wrong list, I'm not sure exactly where the
problem lies, so I thought I would start here.
I have written a VFS driver for a proprietary optical disk format
and it is mostly working fine. However, when I attempt to eject the
disk from the Finder, if there are more than about 500 files in the
trash, the disk fails to eject.
I've turned on debugging in diskarbitrationd and it appears that
several programs attempt to enumerate the contents of the .Trashes/
501 folder (501 is the uid of my user) by calling the readdir vnode
operation. diskarbitrationd is making the unmount system call, but
I think EBUSY is being returned before it gets to the VFS unmount
call in my code (I put a call to panic() in as the very first line
of the function and no panic happened).
Having checked the kernel code, I think one of the readdirs is
overrunning some time-out and is still holding a reference to
the .Trashes/501 vnode when the unmount checks if any are still in
use.
Am I on the right track with the above analysis? Am I doing
something wrong and can anybody suggest some areas I might look in
to resolve this?
OS is OS X 10.4.6
The best thing for this is two machine debugging and the command
"showallstacks". This will tell you exactly who has things open, and
why.
But it's most likely that you just need to support the forced unmount
option in your VFS's unmount vfsop.
Basically, this will cause the vnodes to be ripped out from under
whoever is trying to use them, and cause further operations to be
invalid.
-- Terry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden