diff options
Diffstat (limited to 'static/freebsd/man9/VOP_GETPAGES.9 3.html')
| -rw-r--r-- | static/freebsd/man9/VOP_GETPAGES.9 3.html | 160 |
1 files changed, 0 insertions, 160 deletions
diff --git a/static/freebsd/man9/VOP_GETPAGES.9 3.html b/static/freebsd/man9/VOP_GETPAGES.9 3.html deleted file mode 100644 index 80204db4..00000000 --- a/static/freebsd/man9/VOP_GETPAGES.9 3.html +++ /dev/null @@ -1,160 +0,0 @@ -<table class="head"> - <tr> - <td class="head-ltitle">VOP_GETPAGES(9)</td> - <td class="head-vol">Kernel Developer's Manual</td> - <td class="head-rtitle">VOP_GETPAGES(9)</td> - </tr> -</table> -<div class="manual-text"> -<section class="Sh"> -<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1> -<p class="Pp"><code class="Nm">VOP_GETPAGES</code>, - <code class="Nm">VOP_PUTPAGES</code> — <span class="Nd">read or write - VM pages from a file</span></p> -</section> -<section class="Sh"> -<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1> -<p class="Pp"><code class="In">#include - <<a class="In">sys/param.h</a>></code> - <br/> - <code class="In">#include <<a class="In">sys/vnode.h</a>></code> - <br/> - <code class="In">#include <<a class="In">vm/vm.h</a>></code></p> -<p class="Pp"><var class="Ft">int</var> - <br/> - <code class="Fn">VOP_GETPAGES</code>(<var class="Fa">struct vnode *vp</var>, - <var class="Fa">vm_page_t *ma</var>, <var class="Fa">int count</var>, - <var class="Fa">int *rbehind</var>, <var class="Fa">int *rahead</var>);</p> -<p class="Pp"><var class="Ft">int</var> - <br/> - <code class="Fn">VOP_PUTPAGES</code>(<var class="Fa">struct vnode *vp</var>, - <var class="Fa">vm_page_t *ma</var>, <var class="Fa">int bytecount</var>, - <var class="Fa">int flags</var>, <var class="Fa">int *rtvals</var>);</p> -</section> -<section class="Sh"> -<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1> -<p class="Pp">The - <a class="permalink" href="#VOP_GETPAGES"><code class="Fn" id="VOP_GETPAGES">VOP_GETPAGES</code></a>() - method is called to read in pages of virtual memory which are backed by - ordinary files. If other adjacent pages are backed by adjacent regions of - the same file, <code class="Fn">VOP_GETPAGES</code>() is requested to read - those pages as well, although it is not required to do so. The - <code class="Fn">VOP_PUTPAGES</code>() method does the converse; that is to - say, it writes out adjacent dirty pages of virtual memory.</p> -<p class="Pp">On entry, the vnode lock is held but neither the page queue nor VM - object locks are held. Both methods return in the same state on both success - and error returns.</p> -<p class="Pp">The arguments are:</p> -<dl class="Bl-tag"> - <dt><var class="Fa">vp</var></dt> - <dd>The file to access.</dd> - <dt><var class="Fa">ma</var></dt> - <dd>Pointer to the first element of an array of pages representing a - contiguous region of the file to be read or written.</dd> - <dt><var class="Fa">count</var></dt> - <dd>The length of the <var class="Fa">ma</var> array.</dd> - <dt><var class="Fa">bytecount</var></dt> - <dd>The number of bytes that should be written from the pages of the - array.</dd> - <dt><var class="Fa">flags</var></dt> - <dd>A bitfield of flags affecting the function operation. If - <code class="Dv">VM_PAGER_PUT_SYNC</code> is set, the write should be - synchronous; control must not be returned to the caller until after the - write is finished. If <code class="Dv">VM_PAGER_PUT_INVAL</code> is set, - the pages are to be invalidated after being written. If - <code class="Dv">VM_PAGER_PUT_NOREUSE</code> is set, the I/O performed - should set the IO_NOREUSE flag, to indicate to the filesystem that pages - should be marked for fast reuse if needed. This could occur via a call to - <a class="Xr">vm_page_deactivate_noreuse(9)</a>, which puts such pages - onto the head of the inactive queue. If - <code class="Dv">VM_PAGER_CLUSTER_OK</code> is set, writes may be delayed, - so that related writes can be coalesced for efficiency, e.g., using the - clustering mechanism of the buffer cache.</dd> - <dt id="VOP_PUTPAGES"><var class="Fa">rtvals</var></dt> - <dd>An array of VM system result codes indicating the status of each page - written by - <a class="permalink" href="#VOP_PUTPAGES"><code class="Fn">VOP_PUTPAGES</code></a>().</dd> - <dt><var class="Fa">rbehind</var></dt> - <dd>Optional pointer to integer specifying number of pages to be read behind, - if possible. If the filesystem supports that feature, number of actually - read pages is reported back, otherwise zero is returned.</dd> - <dt><var class="Fa">rahead</var></dt> - <dd>Optional pointer to integer specifying number of pages to be read ahead, - if possible. If the filesystem supports that feature, number of actually - read pages is reported back, otherwise zero is returned.</dd> -</dl> -<p class="Pp" id="VOP_PUTPAGES~2">The status of the - <a class="permalink" href="#VOP_PUTPAGES~2"><code class="Fn">VOP_PUTPAGES</code></a>() - method is returned on a page-by-page basis in the array - <var class="Fa">rtvals[]</var>. The possible status values are as - follows:</p> -<dl class="Bl-tag"> - <dt id="VM_PAGER_OK"><a class="permalink" href="#VM_PAGER_OK"><code class="Dv">VM_PAGER_OK</code></a></dt> - <dd>The page was successfully written. The implementation must call - <a class="Xr">vm_page_undirty(9)</a> to mark the page as clean.</dd> - <dt id="VM_PAGER_PEND"><a class="permalink" href="#VM_PAGER_PEND"><code class="Dv">VM_PAGER_PEND</code></a></dt> - <dd>The page was scheduled to be written asynchronously. When the write - completes, the completion callback should call - <a class="Xr">vm_object_pip_wakeup(9)</a> and - <a class="Xr">vm_page_sunbusy(9)</a> to clear the busy flag and awaken any - other threads waiting for this page, in addition to calling - <a class="Xr">vm_page_undirty(9)</a>.</dd> - <dt id="VM_PAGER_BAD"><a class="permalink" href="#VM_PAGER_BAD"><code class="Dv">VM_PAGER_BAD</code></a></dt> - <dd>The page was entirely beyond the end of the backing file. This condition - should not be possible if the vnode's file system is correctly - implemented.</dd> - <dt id="VM_PAGER_ERROR"><a class="permalink" href="#VM_PAGER_ERROR"><code class="Dv">VM_PAGER_ERROR</code></a></dt> - <dd>The page could not be written because of an error on the underlying - storage medium or protocol.</dd> - <dt id="VM_PAGER_FAIL"><a class="permalink" href="#VM_PAGER_FAIL"><code class="Dv">VM_PAGER_FAIL</code></a></dt> - <dd>Treated identically to <code class="Dv">VM_PAGER_ERROR</code>.</dd> - <dt id="VM_PAGER_AGAIN"><a class="permalink" href="#VM_PAGER_AGAIN"><code class="Dv">VM_PAGER_AGAIN</code></a></dt> - <dd>The page was not handled by this request.</dd> -</dl> -<p class="Pp" id="VOP_GETPAGES~2">The - <a class="permalink" href="#VOP_GETPAGES~2"><code class="Fn">VOP_GETPAGES</code></a>() - method must populate and validate all requested pages in order to return - success. It is expected to release any pages in <var class="Fa">ma</var> - that it does not successfully handle, by calling - <a class="Xr">vm_page_free(9)</a>. When it succeeds, - <code class="Fn">VOP_GETPAGES</code>() must set the valid bits - appropriately. Upon entry to <code class="Fn">VOP_GETPAGES</code>(), all - pages in <var class="Fa">ma</var> are busied exclusively. Upon successful - return, the pages must all be busied exclusively as well, but pages may be - unbusied during processing. The filesystem is responsible for activating - paged-out pages, but this does not necessarily need to be done within - <code class="Fn">VOP_GETPAGES</code>() depending on the architecture of the - particular filesystem.</p> -</section> -<section class="Sh"> -<h1 class="Sh" id="RETURN_VALUES"><a class="permalink" href="#RETURN_VALUES">RETURN - VALUES</a></h1> -<p class="Pp">If it successfully reads all pages in <var class="Fa">ma</var>, - <code class="Fn">VOP_GETPAGES</code>() returns - <code class="Dv">VM_PAGER_OK</code>; otherwise, it returns - <code class="Dv">VM_PAGER_ERROR</code>. By convention, the return value of - <code class="Fn">VOP_PUTPAGES</code>() is - <var class="Fa">rtvals[0]</var>.</p> -</section> -<section class="Sh"> -<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE - ALSO</a></h1> -<p class="Pp"><a class="Xr">vm_object_pip_wakeup(9)</a>, - <a class="Xr">vm_page_free(9)</a>, <a class="Xr">vm_page_sunbusy(9)</a>, - <a class="Xr">vm_page_undirty(9)</a>, <a class="Xr">vm_page_xunbusy(9)</a>, - <a class="Xr">vnode(9)</a></p> -</section> -<section class="Sh"> -<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1> -<p class="Pp">This manual page was written by <span class="An">Doug - Rabson</span> and then substantially rewritten by - <br/> - <span class="An">Garrett Wollman</span>.</p> -</section> -</div> -<table class="foot"> - <tr> - <td class="foot-date">June 29, 2019</td> - <td class="foot-os">FreeBSD 15.0</td> - </tr> -</table> |
