From owner-svn-src-stable-8@FreeBSD.ORG Mon Oct 25 07:11:38 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BA80106566C; Mon, 25 Oct 2010 07:11:38 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F4148FC19; Mon, 25 Oct 2010 07:11:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9P7Bci3054406; Mon, 25 Oct 2010 07:11:38 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9P7BcN5054404; Mon, 25 Oct 2010 07:11:38 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201010250711.o9P7BcN5054404@svn.freebsd.org> From: Andriy Gapon Date: Mon, 25 Oct 2010 07:11:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214320 - stable/8/share/man/man9 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Oct 2010 07:11:38 -0000 Author: avg Date: Mon Oct 25 07:11:37 2010 New Revision: 214320 URL: http://svn.freebsd.org/changeset/base/214320 Log: MFC r214096: VOP_GETPAGES.9: clarify and correct description of parameters and requirements Modified: stable/8/share/man/man9/VOP_GETPAGES.9 Directory Properties: stable/8/share/man/man9/ (props changed) Modified: stable/8/share/man/man9/VOP_GETPAGES.9 ============================================================================== --- stable/8/share/man/man9/VOP_GETPAGES.9 Mon Oct 25 07:06:24 2010 (r214319) +++ stable/8/share/man/man9/VOP_GETPAGES.9 Mon Oct 25 07:11:37 2010 (r214320) @@ -41,9 +41,9 @@ .In sys/vnode.h .In vm/vm.h .Ft int -.Fn VOP_GETPAGES "struct vnode *vp" "vm_page_t *m" "int count" "int reqpage" "vm_ooffset_t offset" +.Fn VOP_GETPAGES "struct vnode *vp" "vm_page_t *ma" "int count" "int reqpage" "vm_ooffset_t offset" .Ft int -.Fn VOP_PUTPAGES "struct vnode *vp" "vm_page_t *m" "int count" "int sync" "int *rtvals" "vm_ooffset_t offset" +.Fn VOP_PUTPAGES "struct vnode *vp" "vm_page_t *ma" "int count" "int sync" "int *rtvals" "vm_ooffset_t offset" .Sh DESCRIPTION The .Fn VOP_GETPAGES @@ -66,11 +66,11 @@ The arguments are: .Bl -tag -width reqpage .It Fa vp The file to access. -.It Fa m -Pointer to the first element of an array of contiguous pages representing a +.It Fa ma +Pointer to the first element of an array of pages representing a contiguous region of the file to be read or written. .It Fa count -The number of pages in the array. +The number of bytes that should be read into the pages of the array. .It Fa sync .Dv VM_PAGER_PUT_SYNC if the write should be synchronous. @@ -123,22 +123,27 @@ The page was not handled by this request The .Fn VOP_GETPAGES method is expected to release any pages in -.Fa m +.Fa ma that it does not successfully handle, by calling .Xr vm_page_free 9 . When it succeeds, .Fn VOP_GETPAGES -must set the valid bits appropriately, clear the dirty bit -(using -.Xr vm_page_undirty 9 ) , -either activate the page (if its wanted bit is set) +must set the valid bits appropriately. +.Fn VOP_GETPAGES +must keep +.Fa reqpage +busy. +It must unbusy all other successfully handled pages and put them +on appropriate page queue(s). +For example, +.Fn VOP_GETPAGES +may either activate a page (if its wanted bit is set) or deactivate it (otherwise), and finally call .Xr vm_page_wakeup 9 -to arouse any threads currently waiting for the page to be faulted in, -for each page read. +to arouse any threads currently waiting for the page to be faulted in. .Sh RETURN VALUES If it successfully reads -.Fa m[reqpage] , +.Fa ma[reqpage] , .Fn VOP_GETPAGES returns .Dv VM_PAGER_OK ;