From owner-freebsd-hackers Tue Feb 16 13:45: 3 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from lor.watermarkgroup.com (lor.watermarkgroup.com [207.202.73.33]) by hub.freebsd.org (Postfix) with ESMTP id 484C610FDE for ; Tue, 16 Feb 1999 13:45:00 -0800 (PST) (envelope-from luoqi@watermarkgroup.com) Received: (from luoqi@localhost) by lor.watermarkgroup.com (8.8.8/8.8.8) id QAA23030; Tue, 16 Feb 1999 16:44:28 -0500 (EST) (envelope-from luoqi) Date: Tue, 16 Feb 1999 16:44:28 -0500 (EST) From: Luoqi Chen Message-Id: <199902162144.QAA23030@lor.watermarkgroup.com> To: amarks@sarnoff.com, freebsd-hackers@FreeBSD.ORG Subject: Re: Memory-Based VFS Question Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > I'm implementing a memory-based VFS on 3.0-19981123. I have almost all > of the VOP_* functions implemented but I ran into a slight problem with > file copies. If I copy a file from and to a dir mounted on my fs, the > kernel calls mmap to map the data in (I guess it would call vop_read if > the data was too large). My problem is that the kernel never calls my > vop_mmap (not even sure if it's supposed to) so I never get the > opportunity to copy the data from my fs to kernel space so the data in > the io vector pased to me at vop_write is invalid. Any ideas? > > Thanks, > -A. > > -- > Aaron J. Marks Communications and Computing Systems Lab > Assoc. Member Tech Staff Advanced Networks and Computation Group > amarks@sarnoff.com Sarnoff Corporation > I don't think VOP_MMAP is used any where, you need to implement VOP_GETPAGES and VOP_PUTPAGES instead. The simplest way is to make them wrapper functions calling vnode_pager_generic_{get,put}pages, take a look at vm/vnode_pager.c -lq To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message