| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | .\" $NetBSD: vfsops.9,v 1.39 2009/03/16 16:44:46 uwe Exp $ | | 1 | .\" $NetBSD: vfsops.9,v 1.40 2009/03/16 17:30:33 uwe Exp $ |
2 | .\" | | 2 | .\" |
3 | .\" Copyright (c) 2001 The NetBSD Foundation, Inc. | | 3 | .\" Copyright (c) 2001 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 |
| @@ -87,45 +87,92 @@ All supported file systems in the kernel | | | @@ -87,45 +87,92 @@ All supported file systems in the kernel |
87 | table. | | 87 | table. |
88 | This table is generated by | | 88 | This table is generated by |
89 | .Xr config 1 | | 89 | .Xr config 1 |
90 | and is a | | 90 | and is a |
91 | .Dv NULL Ns No -terminated | | 91 | .Dv NULL Ns No -terminated |
92 | list of | | 92 | list of |
93 | .Vt vfsops | | 93 | .Vt vfsops |
94 | structures. | | 94 | structures. |
95 | The vfsops structure describes the operations that can be done to a | | 95 | The vfsops structure describes the operations that can be done to a |
96 | specific file system type. | | 96 | specific file system type. |
97 | The following table lists the elements of the vfsops vector, the | | 97 | The following table lists the elements of the vfsops vector, the |
98 | corresponding invocation macro, and a description of the element. | | 98 | corresponding invocation macro, and a description of the element. |
99 | .Pp | | 99 | .Pp |
100 | .Bl -column "void (*vfs_suspendctl)()" "VFS_SUSPENDCTL" \ | | 100 | .Bl -column "void (*vfs_suspendctl)()" "VFS_SUSPENDCTL" -compact |
101 | "NFS file handle to vnode lookup" -compact | | | |
102 | .It Sy Vector element Ta Sy Macro Ta Sy Description | | 101 | .It Sy Vector element Ta Sy Macro Ta Sy Description |
103 | .It int (*vfs_mount)() Ta Dv VFS_MOUNT Ta Mount a file system | | 102 | .\" |
104 | .It int (*vfs_start)() Ta Dv VFS_START Ta Make operational | | 103 | .It int (*vfs_mount)() \ |
105 | .It int (*vfs_unmount)() Ta Dv VFS_UNMOUNT Ta Unmount a file system | | 104 | Ta Dv VFS_MOUNT \ |
106 | .It int (*vfs_root)() Ta Dv VFS_ROOT Ta Get the file system root vnode | | 105 | Ta Mount a file system |
107 | .It int (*vfs_quotactl)() Ta Dv VFS_QUOTACTL Ta Query/modify space quotas | | 106 | .\" |
108 | .It int (*vfs_statvfs)() Ta Dv VFS_STATVFS Ta Get file system statistics | | 107 | .It int (*vfs_start)() \ |
109 | .It int (*vfs_sync)() Ta Dv VFS_SYNC Ta Flush file system buffers | | 108 | Ta Dv VFS_START \ |
110 | .It int (*vfs_vget)() Ta Dv VFS_VGET Ta Get vnode from file id | | 109 | Ta Make operational |
111 | .It int (*vfs_fhtovp)() Ta Dv VFS_FHTOVP Ta NFS file handle to vnode lookup | | 110 | .\" |
112 | .It int (*vfs_vptofh)() Ta Dv VFS_VPTOFH Ta Vnode to NFS file handle lookup | | 111 | .It int (*vfs_unmount)() \ |
113 | .It void (*vfs_init)() Ta - Ta Initialize file system | | 112 | Ta Dv VFS_UNMOUNT \ |
114 | .It void (*vfs_reinit)() Ta - Ta Reinitialize file system | | 113 | Ta Unmount a file system |
115 | .It void (*vfs_done)() Ta - Ta Cleanup unmounted file system | | 114 | .\" |
116 | .It int (*vfs_mountroot)() Ta - Ta Mount the root file system | | 115 | .It int (*vfs_root)() \ |
117 | .It int (*vfs_snapshot)() Ta Dv VFS_SNAPSHOT Ta Take a snapshot | | 116 | Ta Dv VFS_ROOT \ |
118 | .It int (*vfs_suspendctl)() Ta Dv VFS_SUSPENDCTL Ta Suspend or resume | | 117 | Ta Get the file system root vnode |
| | | 118 | .\" |
| | | 119 | .It int (*vfs_quotactl)() \ |
| | | 120 | Ta Dv VFS_QUOTACTL \ |
| | | 121 | Ta Query/modify space quotas |
| | | 122 | .\" |
| | | 123 | .It int (*vfs_statvfs)() \ |
| | | 124 | Ta Dv VFS_STATVFS \ |
| | | 125 | Ta Get file system statistics |
| | | 126 | .\" |
| | | 127 | .It int (*vfs_sync)() \ |
| | | 128 | Ta Dv VFS_SYNC \ |
| | | 129 | Ta Flush file system buffers |
| | | 130 | .\" |
| | | 131 | .It int (*vfs_vget)() \ |
| | | 132 | Ta Dv VFS_VGET \ |
| | | 133 | Ta Get vnode from file id |
| | | 134 | .\" |
| | | 135 | .It int (*vfs_fhtovp)() \ |
| | | 136 | Ta Dv VFS_FHTOVP \ |
| | | 137 | Ta NFS file handle to vnode lookup |
| | | 138 | .\" |
| | | 139 | .It int (*vfs_vptofh)() \ |
| | | 140 | Ta Dv VFS_VPTOFH \ |
| | | 141 | Ta Vnode to NFS file handle lookup |
| | | 142 | .\" |
| | | 143 | .It void (*vfs_init)() \ |
| | | 144 | Ta \- \ |
| | | 145 | Ta Initialize file system |
| | | 146 | .\" |
| | | 147 | .It void (*vfs_reinit)() \ |
| | | 148 | Ta \- \ |
| | | 149 | Ta Reinitialize file system |
| | | 150 | .\" |
| | | 151 | .It void (*vfs_done)() \ |
| | | 152 | Ta \- \ |
| | | 153 | Ta Cleanup unmounted file system |
| | | 154 | .\" |
| | | 155 | .It int (*vfs_mountroot)() \ |
| | | 156 | Ta \- \ |
| | | 157 | Ta Mount the root file system |
| | | 158 | .\" |
| | | 159 | .It int (*vfs_snapshot)() \ |
| | | 160 | Ta Dv VFS_SNAPSHOT \ |
| | | 161 | Ta Take a snapshot |
| | | 162 | .\" |
| | | 163 | .It int (*vfs_suspendctl)() \ |
| | | 164 | Ta Dv VFS_SUSPENDCTL \ |
| | | 165 | Ta Suspend or resume |
119 | .El | | 166 | .El |
120 | .Pp | | 167 | .Pp |
121 | Some additional non-function members of the vfsops structure are the | | 168 | Some additional non-function members of the vfsops structure are the |
122 | file system name | | 169 | file system name |
123 | .Fa vfs_name | | 170 | .Fa vfs_name |
124 | and a reference count | | 171 | and a reference count |
125 | .Fa vfs_refcount . | | 172 | .Fa vfs_refcount . |
126 | It is not mandatory for a file system type to support a particular | | 173 | It is not mandatory for a file system type to support a particular |
127 | operation, but it must assign each member function pointer to a | | 174 | operation, but it must assign each member function pointer to a |
128 | suitable function to do the minimum required of it. | | 175 | suitable function to do the minimum required of it. |
129 | In most cases, such functions either do nothing or return an error | | 176 | In most cases, such functions either do nothing or return an error |
130 | value to the effect that it is not supported. | | 177 | value to the effect that it is not supported. |
131 | .Fa vfs_reinit , | | 178 | .Fa vfs_reinit , |