From owner-freebsd-fs Sun Feb 28 3: 8:45 1999 Delivered-To: freebsd-fs@freebsd.org Received: from relay1.mail.uk.psi.net (relay1.mail.uk.psi.net [154.32.105.6]) by hub.freebsd.org (Postfix) with ESMTP id A8F33151E8 for ; Sun, 28 Feb 1999 03:07:48 -0800 (PST) (envelope-from smcintyr@allstor-sw.co.uk) Received: from mail.plasmon.co.uk ([193.115.5.217]) by relay1.mail.uk.psi.net with smtp (Exim 2.02 #3) id 10H44G-0004zH-00; Sun, 28 Feb 1999 11:07:28 +0000 Received: from virgo.software.plasmon ([193.115.4.42]) by mail.plasmon.co.uk (Lotus SMTP MTA v4.6.2 (693.3 8-11-1998)) with SMTP id 80256726.003CD319; Sun, 28 Feb 1999 11:04:22 +0000 Date: Sun, 28 Feb 1999 11:08:22 +0000 (GMT) From: Steve McIntyre X-Sender: steve@virgo.software.plasmon To: Assar Westerlund Cc: freebsd-fs@FreeBSD.ORG, Erez Zadok Subject: Re: KLD filesystems in 3.0? In-Reply-To: <45ACF83541E9435280256725008140D2.008140F380256725@plasmon.co.uk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Sat, 27 Feb 1999, Assar Westerlund wrote: >Steve McIntyre 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 My home page "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