Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F139430208
D10579.id27997.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D10579.id27997.diff
View Options
Index: share/man/man9/VOP_GETPAGES.9
===================================================================
--- share/man/man9/VOP_GETPAGES.9
+++ share/man/man9/VOP_GETPAGES.9
@@ -29,7 +29,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd December 16, 2015
+.Dd May 3, 2017
.Dt VOP_GETPAGES 9
.Os
.Sh NAME
@@ -41,9 +41,21 @@
.In sys/vnode.h
.In vm/vm.h
.Ft int
-.Fn VOP_GETPAGES "struct vnode *vp" "vm_page_t *ma" "int count" "int *rbehind" "int *rahead"
+.Fo VOP_GETPAGES
+.Fa "struct vnode *vp"
+.Fa "vm_page_t *ma"
+.Fa "int count"
+.Fa "int *rbehind"
+.Fa "int *rahead"
+.Fc
.Ft int
-.Fn VOP_PUTPAGES "struct vnode *vp" "vm_page_t *ma" "int count" "int sync" "int *rtvals"
+.Fo VOP_PUTPAGES
+.Fa "struct vnode *vp"
+.Fa "vm_page_t *ma"
+.Fa "int bytecount"
+.Fa "int flags"
+.Fa "int *rtvals"
+.Fc
.Sh DESCRIPTION
The
.Fn VOP_GETPAGES
@@ -70,10 +82,26 @@
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 bytes that should be read into the pages of the array.
-.It Fa sync
+The length of the
+.Fa ma
+array.
+.It Fa bytecount
+The number of bytes that should be written from the pages of the array.
+.It Fa flags
+A bitfield of flags affecting the function operation.
+If
.Dv VM_PAGER_PUT_SYNC
-if the write should be synchronous.
+is set, the write should be synchronous.
+If
+.Dv VM_PAGER_PUT_INVAL
+is set, the pages are to be invalidated after being written.
+If
+.Dv VM_PAGER_PUT_NOREUSE
+is set, release the buffer pages after use.
+If
+.Dv VM_PAGER_CLUSTER_OK
+is set, writes may be performed asynchronously, so that clusters
+of related writes can be coalesced for efficiency.
.It Fa rtvals
An array of VM system result codes indicating the status of each
page written by
@@ -127,32 +155,32 @@
.Pp
The
.Fn VOP_GETPAGES
-method is expected to release any pages in
+method must populate and validate all requested pages in order to
+return success.
+It is expected to release any pages in
.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.
+Upon entry to
+.Fn VOP_GETPAGES ,
+all pages in
+.Fa ma
+are busied exclusively.
+Upon successful return, the pages must all be busied exclusively
+as well, but pages may be unbusied during processing.
.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_xunbusy 9
-to arouse any threads currently waiting for the page to be faulted in.
+or deactivate it (otherwise).
.Sh RETURN VALUES
-If it successfully reads
-.Fa ma[reqpage] ,
+If it successfully reads all pages in
+.Fa ma ,
.Fn VOP_GETPAGES
returns
.Dv VM_PAGER_OK ;
-otherwise,
+otherwise, it returns
.Dv VM_PAGER_ERROR .
By convention, the return value of
.Fn VOP_PUTPAGES
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 13, 12:18 AM (22 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26916332
Default Alt Text
D10579.id27997.diff (2 KB)
Attached To
Mode
D10579: Updates to VOP_GETPAGES.9
Attached
Detach File
Event Timeline
Log In to Comment