218 cred_t *, caller_context_t *);
219 static int nfs3_realvp(vnode_t *, vnode_t **, caller_context_t *);
220 static int nfs3_delmap(vnode_t *, offset_t, struct as *, caddr_t, size_t,
221 uint_t, uint_t, uint_t, cred_t *, caller_context_t *);
222 static int nfs3_pathconf(vnode_t *, int, ulong_t *, cred_t *,
223 caller_context_t *);
224 static int nfs3_pageio(vnode_t *, page_t *, u_offset_t, size_t, int,
225 cred_t *, caller_context_t *);
226 static void nfs3_dispose(vnode_t *, page_t *, int, int, cred_t *,
227 caller_context_t *);
228 static int nfs3_setsecattr(vnode_t *, vsecattr_t *, int, cred_t *,
229 caller_context_t *);
230 static int nfs3_getsecattr(vnode_t *, vsecattr_t *, int, cred_t *,
231 caller_context_t *);
232 static int nfs3_shrlock(vnode_t *, int, struct shrlock *, int, cred_t *,
233 caller_context_t *);
234
235 struct vnodeops *nfs3_vnodeops;
236
237 const fs_operation_def_t nfs3_vnodeops_template[] = {
238 VOPNAME_OPEN, { .vop_open = nfs3_open },
239 VOPNAME_CLOSE, { .vop_close = nfs3_close },
240 VOPNAME_READ, { .vop_read = nfs3_read },
241 VOPNAME_WRITE, { .vop_write = nfs3_write },
242 VOPNAME_IOCTL, { .vop_ioctl = nfs3_ioctl },
243 VOPNAME_GETATTR, { .vop_getattr = nfs3_getattr },
244 VOPNAME_SETATTR, { .vop_setattr = nfs3_setattr },
245 VOPNAME_ACCESS, { .vop_access = nfs3_access },
246 VOPNAME_LOOKUP, { .vop_lookup = nfs3_lookup },
247 VOPNAME_CREATE, { .vop_create = nfs3_create },
248 VOPNAME_REMOVE, { .vop_remove = nfs3_remove },
249 VOPNAME_LINK, { .vop_link = nfs3_link },
250 VOPNAME_RENAME, { .vop_rename = nfs3_rename },
251 VOPNAME_MKDIR, { .vop_mkdir = nfs3_mkdir },
252 VOPNAME_RMDIR, { .vop_rmdir = nfs3_rmdir },
253 VOPNAME_READDIR, { .vop_readdir = nfs3_readdir },
254 VOPNAME_SYMLINK, { .vop_symlink = nfs3_symlink },
255 VOPNAME_READLINK, { .vop_readlink = nfs3_readlink },
256 VOPNAME_FSYNC, { .vop_fsync = nfs3_fsync },
257 VOPNAME_INACTIVE, { .vop_inactive = nfs3_inactive },
258 VOPNAME_FID, { .vop_fid = nfs3_fid },
259 VOPNAME_RWLOCK, { .vop_rwlock = nfs3_rwlock },
260 VOPNAME_RWUNLOCK, { .vop_rwunlock = nfs3_rwunlock },
261 VOPNAME_SEEK, { .vop_seek = nfs3_seek },
262 VOPNAME_FRLOCK, { .vop_frlock = nfs3_frlock },
263 VOPNAME_SPACE, { .vop_space = nfs3_space },
264 VOPNAME_REALVP, { .vop_realvp = nfs3_realvp },
265 VOPNAME_GETPAGE, { .vop_getpage = nfs3_getpage },
266 VOPNAME_PUTPAGE, { .vop_putpage = nfs3_putpage },
267 VOPNAME_MAP, { .vop_map = nfs3_map },
268 VOPNAME_ADDMAP, { .vop_addmap = nfs3_addmap },
269 VOPNAME_DELMAP, { .vop_delmap = nfs3_delmap },
270 /* no separate nfs3_dump */
271 VOPNAME_DUMP, { .vop_dump = nfs_dump },
272 VOPNAME_PATHCONF, { .vop_pathconf = nfs3_pathconf },
273 VOPNAME_PAGEIO, { .vop_pageio = nfs3_pageio },
274 VOPNAME_DISPOSE, { .vop_dispose = nfs3_dispose },
275 VOPNAME_SETSECATTR, { .vop_setsecattr = nfs3_setsecattr },
276 VOPNAME_GETSECATTR, { .vop_getsecattr = nfs3_getsecattr },
277 VOPNAME_SHRLOCK, { .vop_shrlock = nfs3_shrlock },
278 VOPNAME_VNEVENT, { .vop_vnevent = fs_vnevent_support },
279 NULL, NULL
280 };
281
282 /*
283 * XXX: This is referenced in modstubs.s
284 */
285 struct vnodeops *
286 nfs3_getvnodeops(void)
287 {
288 return (nfs3_vnodeops);
289 }
290
291 /* ARGSUSED */
292 static int
293 nfs3_open(vnode_t **vpp, int flag, cred_t *cr, caller_context_t *ct)
294 {
295 int error;
296 struct vattr va;
297 rnode_t *rp;
298 vnode_t *vp;
299
|
218 cred_t *, caller_context_t *);
219 static int nfs3_realvp(vnode_t *, vnode_t **, caller_context_t *);
220 static int nfs3_delmap(vnode_t *, offset_t, struct as *, caddr_t, size_t,
221 uint_t, uint_t, uint_t, cred_t *, caller_context_t *);
222 static int nfs3_pathconf(vnode_t *, int, ulong_t *, cred_t *,
223 caller_context_t *);
224 static int nfs3_pageio(vnode_t *, page_t *, u_offset_t, size_t, int,
225 cred_t *, caller_context_t *);
226 static void nfs3_dispose(vnode_t *, page_t *, int, int, cred_t *,
227 caller_context_t *);
228 static int nfs3_setsecattr(vnode_t *, vsecattr_t *, int, cred_t *,
229 caller_context_t *);
230 static int nfs3_getsecattr(vnode_t *, vsecattr_t *, int, cred_t *,
231 caller_context_t *);
232 static int nfs3_shrlock(vnode_t *, int, struct shrlock *, int, cred_t *,
233 caller_context_t *);
234
235 struct vnodeops *nfs3_vnodeops;
236
237 const fs_operation_def_t nfs3_vnodeops_template[] = {
238 { VOPNAME_OPEN, { .vop_open = nfs3_open } },
239 { VOPNAME_CLOSE, { .vop_close = nfs3_close } },
240 { VOPNAME_READ, { .vop_read = nfs3_read } },
241 { VOPNAME_WRITE, { .vop_write = nfs3_write } },
242 { VOPNAME_IOCTL, { .vop_ioctl = nfs3_ioctl } },
243 { VOPNAME_GETATTR, { .vop_getattr = nfs3_getattr } },
244 { VOPNAME_SETATTR, { .vop_setattr = nfs3_setattr } },
245 { VOPNAME_ACCESS, { .vop_access = nfs3_access } },
246 { VOPNAME_LOOKUP, { .vop_lookup = nfs3_lookup } },
247 { VOPNAME_CREATE, { .vop_create = nfs3_create } },
248 { VOPNAME_REMOVE, { .vop_remove = nfs3_remove } },
249 { VOPNAME_LINK, { .vop_link = nfs3_link } },
250 { VOPNAME_RENAME, { .vop_rename = nfs3_rename } },
251 { VOPNAME_MKDIR, { .vop_mkdir = nfs3_mkdir } },
252 { VOPNAME_RMDIR, { .vop_rmdir = nfs3_rmdir } },
253 { VOPNAME_READDIR, { .vop_readdir = nfs3_readdir } },
254 { VOPNAME_SYMLINK, { .vop_symlink = nfs3_symlink } },
255 { VOPNAME_READLINK, { .vop_readlink = nfs3_readlink } },
256 { VOPNAME_FSYNC, { .vop_fsync = nfs3_fsync } },
257 { VOPNAME_INACTIVE, { .vop_inactive = nfs3_inactive } },
258 { VOPNAME_FID, { .vop_fid = nfs3_fid } },
259 { VOPNAME_RWLOCK, { .vop_rwlock = nfs3_rwlock } },
260 { VOPNAME_RWUNLOCK, { .vop_rwunlock = nfs3_rwunlock } },
261 { VOPNAME_SEEK, { .vop_seek = nfs3_seek } },
262 { VOPNAME_FRLOCK, { .vop_frlock = nfs3_frlock } },
263 { VOPNAME_SPACE, { .vop_space = nfs3_space } },
264 { VOPNAME_REALVP, { .vop_realvp = nfs3_realvp } },
265 { VOPNAME_GETPAGE, { .vop_getpage = nfs3_getpage } },
266 { VOPNAME_PUTPAGE, { .vop_putpage = nfs3_putpage } },
267 { VOPNAME_MAP, { .vop_map = nfs3_map } },
268 { VOPNAME_ADDMAP, { .vop_addmap = nfs3_addmap } },
269 { VOPNAME_DELMAP, { .vop_delmap = nfs3_delmap } },
270 /* no separate nfs3_dump */
271 { VOPNAME_DUMP, { .vop_dump = nfs_dump } },
272 { VOPNAME_PATHCONF, { .vop_pathconf = nfs3_pathconf } },
273 { VOPNAME_PAGEIO, { .vop_pageio = nfs3_pageio } },
274 { VOPNAME_DISPOSE, { .vop_dispose = nfs3_dispose } },
275 { VOPNAME_SETSECATTR, { .vop_setsecattr = nfs3_setsecattr } },
276 { VOPNAME_GETSECATTR, { .vop_getsecattr = nfs3_getsecattr } },
277 { VOPNAME_SHRLOCK, { .vop_shrlock = nfs3_shrlock } },
278 { VOPNAME_VNEVENT, { .vop_vnevent = fs_vnevent_support } },
279 { NULL, { NULL } }
280 };
281
282 /*
283 * XXX: This is referenced in modstubs.s
284 */
285 struct vnodeops *
286 nfs3_getvnodeops(void)
287 {
288 return (nfs3_vnodeops);
289 }
290
291 /* ARGSUSED */
292 static int
293 nfs3_open(vnode_t **vpp, int flag, cred_t *cr, caller_context_t *ct)
294 {
295 int error;
296 struct vattr va;
297 rnode_t *rp;
298 vnode_t *vp;
299
|