From owner-freebsd-hackers Thu Feb 18 1:41:41 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from herring.nlsystems.com (nlsys.demon.co.uk [158.152.125.33]) by hub.freebsd.org (Postfix) with ESMTP id E6660115F4 for ; Thu, 18 Feb 1999 01:41:00 -0800 (PST) (envelope-from dfr@nlsystems.com) Received: from localhost (dfr@localhost) by herring.nlsystems.com (8.9.2/8.8.8) with ESMTP id JAA63680; Thu, 18 Feb 1999 09:40:50 GMT (envelope-from dfr@nlsystems.com) Date: Thu, 18 Feb 1999 09:40:50 +0000 (GMT) From: Doug Rabson To: AARON MARKS Cc: freebsd-hackers@freebsd.org, Matthew Dillon Subject: Re: Memory-Based VFS Question In-Reply-To: <36CB1C9B.77725962@sarnoff.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 17 Feb 1999, AARON MARKS wrote: > I appologize for the ignorance, but: > > Terry Lambert wrote: > > > > The generic code assumes a vnode as a backing store. If he does not > > have a vnode as a backing store, he can not use the generic code. > > What do you mean using a vnode as a backing store? A file in my MFS has > a vnode allocated to it. > > > > > Basically, if he could use it, since that's the default that's > > inherited from the default ops vector, it'd already be working, > > and he wouldn't be asking the question. > > > > He's asking, so ipso facto, he's not using a vnode as backing store. > > > > This makes sense, since he said he's writing a new MFS; he's probably > > managing the page allocation himself from the KVA space. > > I think so. I allocate blocks of 8k memory and grow as necessary. > > > > > To answer the question: pattern your code after the code in the file > > /sys/vm/device_pager.c's dev_pager_getpages()/dev_pager_putpages() > > code, and you should be OK. > > Great. I'll take a look-see. > > I have another question, though: I mapped my _{get,put}pages functions > (they're empty, just print to console and return 0) to the vop functions > but when I do a system file copy (via cp), the OS never calls my > {get,put}pages functions. Strange. Are they in the table of vnode ops for your filesystem? Try setting a breakpoint in the vm code where it is about to call VOP_GETPAGES and single step to see where it goes. -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 442 9037 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message