172 struct nfs_fsl_info *, char *, int);
173
174 /*
175 * Initialize the vfs structure
176 */
177
178 static int nfs4fstyp;
179
180
181 /*
182 * Debug variable to check for rdma based
183 * transport startup and cleanup. Controlled
184 * through /etc/system. Off by default.
185 */
186 extern int rdma_debug;
187
188 int
189 nfs4init(int fstyp, char *name)
190 {
191 static const fs_operation_def_t nfs4_vfsops_template[] = {
192 VFSNAME_MOUNT, { .vfs_mount = nfs4_mount },
193 VFSNAME_UNMOUNT, { .vfs_unmount = nfs4_unmount },
194 VFSNAME_ROOT, { .vfs_root = nfs4_root },
195 VFSNAME_STATVFS, { .vfs_statvfs = nfs4_statvfs },
196 VFSNAME_SYNC, { .vfs_sync = nfs4_sync },
197 VFSNAME_VGET, { .vfs_vget = nfs4_vget },
198 VFSNAME_MOUNTROOT, { .vfs_mountroot = nfs4_mountroot },
199 VFSNAME_FREEVFS, { .vfs_freevfs = nfs4_freevfs },
200 NULL, NULL
201 };
202 int error;
203
204 nfs4_vfsops = NULL;
205 nfs4_vnodeops = NULL;
206 nfs4_trigger_vnodeops = NULL;
207
208 error = vfs_setfsops(fstyp, nfs4_vfsops_template, &nfs4_vfsops);
209 if (error != 0) {
210 zcmn_err(GLOBAL_ZONEID, CE_WARN,
211 "nfs4init: bad vfs ops template");
212 goto out;
213 }
214
215 error = vn_make_ops(name, nfs4_vnodeops_template, &nfs4_vnodeops);
216 if (error != 0) {
217 zcmn_err(GLOBAL_ZONEID, CE_WARN,
218 "nfs4init: bad vnode ops template");
219 goto out;
220 }
|
172 struct nfs_fsl_info *, char *, int);
173
174 /*
175 * Initialize the vfs structure
176 */
177
178 static int nfs4fstyp;
179
180
181 /*
182 * Debug variable to check for rdma based
183 * transport startup and cleanup. Controlled
184 * through /etc/system. Off by default.
185 */
186 extern int rdma_debug;
187
188 int
189 nfs4init(int fstyp, char *name)
190 {
191 static const fs_operation_def_t nfs4_vfsops_template[] = {
192 { VFSNAME_MOUNT, { .vfs_mount = nfs4_mount } },
193 { VFSNAME_UNMOUNT, { .vfs_unmount = nfs4_unmount } },
194 { VFSNAME_ROOT, { .vfs_root = nfs4_root } },
195 { VFSNAME_STATVFS, { .vfs_statvfs = nfs4_statvfs } },
196 { VFSNAME_SYNC, { .vfs_sync = nfs4_sync } },
197 { VFSNAME_VGET, { .vfs_vget = nfs4_vget } },
198 { VFSNAME_MOUNTROOT, { .vfs_mountroot = nfs4_mountroot } },
199 { VFSNAME_FREEVFS, { .vfs_freevfs = nfs4_freevfs } },
200 { NULL, { NULL } }
201 };
202 int error;
203
204 nfs4_vfsops = NULL;
205 nfs4_vnodeops = NULL;
206 nfs4_trigger_vnodeops = NULL;
207
208 error = vfs_setfsops(fstyp, nfs4_vfsops_template, &nfs4_vfsops);
209 if (error != 0) {
210 zcmn_err(GLOBAL_ZONEID, CE_WARN,
211 "nfs4init: bad vfs ops template");
212 goto out;
213 }
214
215 error = vn_make_ops(name, nfs4_vnodeops_template, &nfs4_vnodeops);
216 if (error != 0) {
217 zcmn_err(GLOBAL_ZONEID, CE_WARN,
218 "nfs4init: bad vnode ops template");
219 goto out;
220 }
|