| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | .\" $NetBSD: vfssubr.9,v 1.21 2014/02/22 10:05:54 hannken Exp $ | | 1 | .\" $NetBSD: vfssubr.9,v 1.22 2014/02/22 11:08:05 wiz Exp $ |
2 | .\" | | 2 | .\" |
3 | .\" Copyright (c) 2003, 2005, 2006 The NetBSD Foundation, Inc. | | 3 | .\" Copyright (c) 2003, 2005, 2006 The NetBSD Foundation, Inc. |
4 | .\" All rights reserved. | | 4 | .\" All rights reserved. |
5 | .\" | | 5 | .\" |
6 | .\" This code is derived from software contributed to The NetBSD Foundation | | 6 | .\" This code is derived from software contributed to The NetBSD Foundation |
7 | .\" by Gregory McGarry. | | 7 | .\" by Gregory McGarry. |
8 | .\" | | 8 | .\" |
9 | .\" Redistribution and use in source and binary forms, with or without | | 9 | .\" Redistribution and use in source and binary forms, with or without |
10 | .\" modification, are permitted provided that the following conditions | | 10 | .\" modification, are permitted provided that the following conditions |
11 | .\" are met: | | 11 | .\" are met: |
12 | .\" 1. Redistributions of source code must retain the above copyright | | 12 | .\" 1. Redistributions of source code must retain the above copyright |
13 | .\" notice, this list of conditions and the following disclaimer. | | 13 | .\" notice, this list of conditions and the following disclaimer. |
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | | 14 | .\" 2. Redistributions in binary form must reproduce the above copyright |
| @@ -128,46 +128,50 @@ by the vnode | | | @@ -128,46 +128,50 @@ by the vnode |
128 | .Fa vp . | | 128 | .Fa vp . |
129 | .It Fn vfs_mountroot "void" | | 129 | .It Fn vfs_mountroot "void" |
130 | Mount the root file system. | | 130 | Mount the root file system. |
131 | .It Fn vfs_unmountall "l" | | 131 | .It Fn vfs_unmountall "l" |
132 | Unmount all file systems. | | 132 | Unmount all file systems. |
133 | .It Fn vfs_busy "mp" "nextp" | | 133 | .It Fn vfs_busy "mp" "nextp" |
134 | Mark the mount point specified by | | 134 | Mark the mount point specified by |
135 | .Fa mp | | 135 | .Fa mp |
136 | as busy and get a reference to it. | | 136 | as busy and get a reference to it. |
137 | This function is used to synchronize access and to delay unmounting. | | 137 | This function is used to synchronize access and to delay unmounting. |
138 | The caller must hold a pre-existing reference to the mount. | | 138 | The caller must hold a pre-existing reference to the mount. |
139 | If | | 139 | If |
140 | .Fa nextp | | 140 | .Fa nextp |
141 | is not NULL, the caller must hold the | | 141 | is not |
| | | 142 | .Dv NULL , |
| | | 143 | the caller must hold the |
142 | .Em mountlist_lock | | 144 | .Em mountlist_lock |
143 | and | | 145 | and |
144 | .Fa nextp | | 146 | .Fa nextp |
145 | will receive the next mount from mount list on error. | | 147 | will receive the next mount from mount list on error. |
146 | The | | 148 | The |
147 | .Em mountlist_lock | | 149 | .Em mountlist_lock |
148 | is released on return. | | 150 | is released on return. |
149 | .It Fn vfs_unbusy "mp" "keepref" "nextp" | | 151 | .It Fn vfs_unbusy "mp" "keepref" "nextp" |
150 | Undo a | | 152 | Undo a |
151 | .Fn vfs_busy | | 153 | .Fn vfs_busy |
152 | on the mount point specified by | | 154 | on the mount point specified by |
153 | .Fa mp . | | 155 | .Fa mp . |
154 | If | | 156 | If |
155 | .Fa keepref | | 157 | .Fa keepref |
156 | is true, preserve the reference added by | | 158 | is true, preserve the reference added by |
157 | .Fn vfs_busy . | | 159 | .Fn vfs_busy . |
158 | If | | 160 | If |
159 | .Fa nextp | | 161 | .Fa nextp |
160 | is not NULL, the | | 162 | is not |
| | | 163 | .Dv NULL , |
| | | 164 | the |
161 | .Em mountlist_lock | | 165 | .Em mountlist_lock |
162 | will be aquired and | | 166 | will be aquired and |
163 | .Fa nextp | | 167 | .Fa nextp |
164 | will receive the next mount from mount list. | | 168 | will receive the next mount from mount list. |
165 | .It Fn vfs_mountalloc "vfsops" "vp" | | 169 | .It Fn vfs_mountalloc "vfsops" "vp" |
166 | Allocate and initialise a mount structure, setting | | 170 | Allocate and initialise a mount structure, setting |
167 | .Em mnt_vnodecovered | | 171 | .Em mnt_vnodecovered |
168 | to | | 172 | to |
169 | .Fa vp | | 173 | .Fa vp |
170 | and | | 174 | and |
171 | .Em mnt_op | | 175 | .Em mnt_op |
172 | to | | 176 | to |
173 | .Fa vfsops . | | 177 | .Fa vfsops . |