Date: Sun, 28 Feb 1999 11:08:22 +0000 (GMT) From: Steve McIntyre <smcintyr@allstor-sw.co.uk> To: Assar Westerlund <assar@sics.se> Cc: freebsd-fs@FreeBSD.ORG, Erez Zadok <ezk@cs.columbia.edu> Subject: Re: KLD filesystems in 3.0? Message-ID: <Pine.LNX.3.95.990228110325.404H-100000@virgo.software.plasmon> In-Reply-To: <45ACF83541E9435280256725008140D2.008140F380256725@plasmon.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 27 Feb 1999, Assar Westerlund wrote: >Steve McIntyre <smcintyr@allstor-sw.co.uk> writes: >> I'm having some problems trying to write a filesystem (pfs) as a KLD. I >> load the pfs module, and the startup code seems to work OK. I can mount >> the filesystem, and still all seems OK. But the first time I try to do >any >> vnode ops in the FS all falls down - vn_stat tries to call pfsop_getattr >> and fails, apparently trying to call a function at 0x0b instead of the >> real address. My guess is that somehow the vnodeop entries are not being >> registered properly; I've had a look through some of the other >filesystems >> and I can't see anything obvious that I'm missing. >> >> Does anybody out there have any ideas for things to check? > >Do you do an VNODEOP_SET on your `struct vnodeopv_desc'? I do, yes. In fact, I've found my problem now - in pfs_lookup I was calling getnewvnode with a wrong parameter: ret = getnewvnode(VT_VFS, vfsp, pfs_vnodeops, &pnode->vnode); when it should have been ret = getnewvnode(VT_VFS, vfsp, pfs_vnodeop_p, &pnode->vnode); The change appears to have fixed things. It took me a while to find this - I was assuming the list of vnodeops had to be registered into the system like on Solaris and AIX, so I spent a long time checking on the semantics of my vnode code... Thanks for the suggestions, both of you that responded - they were very helpful... -- Steve McIntyre, Allstor Software smcintyr@allstor-sw.co.uk <a href=http://www.chiark.greenend.org.uk/~stevem/>My home page</a> "Can't keep my eyes from the circling sky, "Tongue-tied & twisted, Just an earth-bound misfit, I..." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.3.95.990228110325.404H-100000>