136 int, cred_t *, zone_t *);
137
138 /*
139 * Initialize the vfs structure
140 */
141
142 static int nfs3fstyp;
143 vfsops_t *nfs3_vfsops;
144
145 /*
146 * Debug variable to check for rdma based
147 * transport startup and cleanup. Controlled
148 * through /etc/system. Off by default.
149 */
150 extern int rdma_debug;
151
152 int
153 nfs3init(int fstyp, char *name)
154 {
155 static const fs_operation_def_t nfs3_vfsops_template[] = {
156 VFSNAME_MOUNT, { .vfs_mount = nfs3_mount },
157 VFSNAME_UNMOUNT, { .vfs_unmount = nfs3_unmount },
158 VFSNAME_ROOT, { .vfs_root = nfs3_root },
159 VFSNAME_STATVFS, { .vfs_statvfs = nfs3_statvfs },
160 VFSNAME_SYNC, { .vfs_sync = nfs3_sync },
161 VFSNAME_VGET, { .vfs_vget = nfs3_vget },
162 VFSNAME_MOUNTROOT, { .vfs_mountroot = nfs3_mountroot },
163 VFSNAME_FREEVFS, { .vfs_freevfs = nfs3_freevfs },
164 NULL, NULL
165 };
166 int error;
167
168 error = vfs_setfsops(fstyp, nfs3_vfsops_template, &nfs3_vfsops);
169 if (error != 0) {
170 zcmn_err(GLOBAL_ZONEID, CE_WARN,
171 "nfs3init: bad vfs ops template");
172 return (error);
173 }
174
175 error = vn_make_ops(name, nfs3_vnodeops_template, &nfs3_vnodeops);
176 if (error != 0) {
177 (void) vfs_freevfsops_by_type(fstyp);
178 zcmn_err(GLOBAL_ZONEID, CE_WARN,
179 "nfs3init: bad vnode ops template");
180 return (error);
181 }
182
183 nfs3fstyp = fstyp;
184
|
136 int, cred_t *, zone_t *);
137
138 /*
139 * Initialize the vfs structure
140 */
141
142 static int nfs3fstyp;
143 vfsops_t *nfs3_vfsops;
144
145 /*
146 * Debug variable to check for rdma based
147 * transport startup and cleanup. Controlled
148 * through /etc/system. Off by default.
149 */
150 extern int rdma_debug;
151
152 int
153 nfs3init(int fstyp, char *name)
154 {
155 static const fs_operation_def_t nfs3_vfsops_template[] = {
156 { VFSNAME_MOUNT, { .vfs_mount = nfs3_mount } },
157 { VFSNAME_UNMOUNT, { .vfs_unmount = nfs3_unmount } },
158 { VFSNAME_ROOT, { .vfs_root = nfs3_root } },
159 { VFSNAME_STATVFS, { .vfs_statvfs = nfs3_statvfs } },
160 { VFSNAME_SYNC, { .vfs_sync = nfs3_sync } },
161 { VFSNAME_VGET, { .vfs_vget = nfs3_vget } },
162 { VFSNAME_MOUNTROOT, { .vfs_mountroot = nfs3_mountroot } },
163 { VFSNAME_FREEVFS, { .vfs_freevfs = nfs3_freevfs } },
164 { NULL, { NULL } }
165 };
166 int error;
167
168 error = vfs_setfsops(fstyp, nfs3_vfsops_template, &nfs3_vfsops);
169 if (error != 0) {
170 zcmn_err(GLOBAL_ZONEID, CE_WARN,
171 "nfs3init: bad vfs ops template");
172 return (error);
173 }
174
175 error = vn_make_ops(name, nfs3_vnodeops_template, &nfs3_vnodeops);
176 if (error != 0) {
177 (void) vfs_freevfsops_by_type(fstyp);
178 zcmn_err(GLOBAL_ZONEID, CE_WARN,
179 "nfs3init: bad vnode ops template");
180 return (error);
181 }
182
183 nfs3fstyp = fstyp;
184
|