|
Lines 40-68
Link Here
|
| 40 |
.In sys/vnode.h |
40 |
.In sys/vnode.h |
| 41 |
.In vm/vm.h |
41 |
.In vm/vm.h |
| 42 |
.Ft int |
42 |
.Ft int |
| 43 |
.Fn VOP_GETPAGES "struct vnode *vp" "vm_page_t *m" "int count" "int reqpage" "vm_ooffset_t offset" |
43 |
.Fn VOP_GETPAGES "struct vnode *vp" "vm_page_t *m" "int bytecount" "int reqpage" "vm_ooffset_t offset" |
| 44 |
.Ft int |
44 |
.Ft int |
| 45 |
.Fn VOP_PUTPAGES "struct vnode *vp" "vm_page_t *m" "int count" "int sync" "int *rtvals" "vm_ooffset_t offset" |
45 |
.Fn VOP_PUTPAGES "struct vnode *vp" "vm_page_t *m" "int bytecount" "int sync" "int *rtvals" "vm_ooffset_t offset" |
| 46 |
.Sh DESCRIPTION |
46 |
.Sh DESCRIPTION |
|
|
47 |
These entry points read and write VM pages from a file respectively. |
| 48 |
.Pp |
| 47 |
The arguments are: |
49 |
The arguments are: |
| 48 |
.Bl -tag -width reqpage |
50 |
.Bl -tag -width reqpage |
| 49 |
.It Ar vp |
51 |
.It Ar vp |
| 50 |
The file to access. |
52 |
The file to access. |
| 51 |
.It Ar m |
53 |
.It Ar m |
| 52 |
A page ??? |
54 |
The array of vm_page_t. |
| 53 |
.It Ar count |
55 |
.It Ar bytecount |
| 54 |
How many pages to access. |
56 |
How many bytes to access (multiple of the page size), should be |
|
|
57 |
divided by the page size to get the number of elements in the array |
| 58 |
.Ar m . |
| 55 |
.It Ar sync |
59 |
.It Ar sync |
| 56 |
Nonzero if the write should be synchronous. |
60 |
Nonzero if the write should be synchronous. |
| 57 |
.It Ar rtvals |
61 |
.It Ar rtvals |
| 58 |
??? |
62 |
The array of return values for corresponding pages in the array |
|
|
63 |
.Ar m . |
| 59 |
.It Ar reqpage |
64 |
.It Ar reqpage |
| 60 |
??? |
65 |
The index of the requested page in the array |
|
|
66 |
.Ar m . |
| 61 |
.It Ar offset |
67 |
.It Ar offset |
| 62 |
Offset in the file to start accessing. |
68 |
Offset in the file to start accessing. |
| 63 |
.El |
69 |
.El |
| 64 |
.Pp |
|
|
| 65 |
Not quite sure about this one. |
| 66 |
.Sh RETURN VALUES |
70 |
.Sh RETURN VALUES |
| 67 |
Zero is returned on success, otherwise an error is returned. |
71 |
Zero is returned on success, otherwise an error is returned. |
| 68 |
.Sh SEE ALSO |
72 |
.Sh SEE ALSO |