opening a vnode at mount time?
I'm trying to add additional system-level files to HFS+. I've added code (see below) to the end of hfs_MountHFSPlusVolume() to obtain a vnode for the file. Currently i'm not using the vnode, and i'm releasing it in hfsUnmount() using ReleaseMetaFileVNode(). In console mode, this appears to work except that hfs_unmount() claims a file is remaining open. This is not a primary concern right now, although it suggests perhaps that my vnode may not be considered VSYSTEM. The real problem i'm having is that if i try this out in the GUI, i score a kernel panic as soon as i attempt to open the volume in finder. (note that the mount operation itself is successful.) I ran some basic file operations (ls, cp) in console mode without reproducing the panic. I have yet to attempt to dual-machine debug the panic; thought it saner to ask here first in case i'm doing something visibly stupid in my attempt to open the file.. chris cnid = GetFileInfo(vcb, kRootDirID, ".hfse_backing_file", &cnattr, &cfork); if (cnid) { bzero(&cndesc, sizeof(cndesc)); cndesc.cd_parentcnid = kRootParID; cndesc.cd_flags |= CD_ISMETA; cndesc.cd_nameptr = ".hfse_backing_file"; cndesc.cd_namelen = strlen(".hfse_backing_file"); cndesc.cd_cnid = cnid; retval = hfs_getnewvnode(hfsmp, NULL, &cndesc, 0, &cnattr, &cfork, &vnode); if (retval) { ... } else { VOP_UNLOCK(vnode, 0, p); } } _______________________________________________ darwin-kernel mailing list | darwin-kernel@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel Do not post admin requests to the list. They will be ignored.
participants (1)
-
Chris Bergmann