Panther VFS unmount gotcha
Panther VFS unmount gotcha
- Subject: Panther VFS unmount gotcha
- From: Quinn <email@hidden>
- Date: Thu, 25 Sep 2003 17:14:36 +0100
Greetings All
If you're developing a VFS plug-in and you have problems unmounting
your volumes on Panther, you should read the following.
We've made changes in Panther that cause the VFS layer to hold extra
references to your volume's root vnode. Depending on how your
xxx_unmount VOP is implemented, you may find that an attempt to
unmount your volume fails with the error EBUSY. Specifically, you
xxx_unmount VOP should call vflush *before* checking the v_usecount
of the root vnode.
For example, your code might previous have looked like this...
if (rootvp->v_usecount > 1 && !(flags & FORCECLOSE))
{
return (EBUSY);
}
error = vflush(mp, rootvp, flags);
if (error)
{
return (error);
}
You should make sure that it looks like this...
error = vflush(mp, rootvp, flags);
if (error)
{
return (error);
}
if (rootvp->v_usecount > 1 && !(flags & FORCECLOSE))
{
return (EBUSY);
}
S+E
--
Quinn "The Eskimo!" <
http://www.apple.com/developer/>
Apple Developer Technical Support * Networking, Communications, Hardware
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.