3 .\" Copyright (c) 2000 Boris Popov
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
14 .\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
15 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17 .\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
18 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 .Dd September 10, 2000
29 .Dt VOP_CREATEVOBJECT 9
31 .Nm VOP_CREATEVOBJECT ,
32 .Nm VOP_DESTROYVOBJECT ,
34 .Nd VM object interaction
39 .Fn VOP_CREATEVOBJECT "struct vnode *vp" "struct ucred *cred" "struct thread *td"
41 .Fn VOP_DESTROYVOBJECT "struct vnode *vp"
43 .Fn VOP_GETVOBJECT "struct vnode *vp" "struct vm_object **objpp"
45 These calls are used to control the association of a VM object
46 with a particular vnode.
48 The arguments specific to these functions are:
51 The vnode of the file.
53 The VM object being returned, or
55 if the caller wants to test for the existence
62 when it needs to create a VM object for the given
64 File system code may pass this call down to the underlying file system.
65 This VOP can be called multiple times,
66 and file system code should ignore any additional calls,
67 exiting with a zero return code.
69 .Fn VOP_DESTROYVOBJECT
75 should be used by all kernel code to get a VM object.
76 .\" XXX What is the next sentence trying to tell people?
77 The returned VM object may belong to a different file system in the case
81 has three functions which perform standard operations by creating
82 and destroying VM objects.
84 .Fn vop_stdcreatevobject ,
85 .Fn vop_stddestroyvobject
87 .Fn vop_stdgetvobject .
92 should be locked on entry and must be left locked on exit.
95 .Fn VOP_CREATEVOBJECT ,
96 .Fn VOP_DESTROYVOBJECT
99 functions return zero on success, or a non-zero value on failure.
100 Zero is returned on success, otherwise an error is returned.
102 .\" XXX Why is this code here when it does not use the functions
103 .\" described in this manual page?
104 By default, file systems leave VM object handling to the
112 This manual page was written by