182 struct flk_callback *, cred_t *, caller_context_t *);
183 static int nfs_space(vnode_t *, int, struct flock64 *, int, offset_t,
184 cred_t *, caller_context_t *);
185 static int nfs_realvp(vnode_t *, vnode_t **, caller_context_t *);
186 static int nfs_delmap(vnode_t *, offset_t, struct as *, caddr_t, size_t,
187 uint_t, uint_t, uint_t, cred_t *, caller_context_t *);
188 static int nfs_pathconf(vnode_t *, int, ulong_t *, cred_t *,
189 caller_context_t *);
190 static int nfs_pageio(vnode_t *, page_t *, u_offset_t, size_t, int,
191 cred_t *, caller_context_t *);
192 static int nfs_setsecattr(vnode_t *, vsecattr_t *, int, cred_t *,
193 caller_context_t *);
194 static int nfs_getsecattr(vnode_t *, vsecattr_t *, int, cred_t *,
195 caller_context_t *);
196 static int nfs_shrlock(vnode_t *, int, struct shrlock *, int, cred_t *,
197 caller_context_t *);
198
199 struct vnodeops *nfs_vnodeops;
200
201 const fs_operation_def_t nfs_vnodeops_template[] = {
202 VOPNAME_OPEN, { .vop_open = nfs_open },
203 VOPNAME_CLOSE, { .vop_close = nfs_close },
204 VOPNAME_READ, { .vop_read = nfs_read },
205 VOPNAME_WRITE, { .vop_write = nfs_write },
206 VOPNAME_IOCTL, { .vop_ioctl = nfs_ioctl },
207 VOPNAME_GETATTR, { .vop_getattr = nfs_getattr },
208 VOPNAME_SETATTR, { .vop_setattr = nfs_setattr },
209 VOPNAME_ACCESS, { .vop_access = nfs_access },
210 VOPNAME_LOOKUP, { .vop_lookup = nfs_lookup },
211 VOPNAME_CREATE, { .vop_create = nfs_create },
212 VOPNAME_REMOVE, { .vop_remove = nfs_remove },
213 VOPNAME_LINK, { .vop_link = nfs_link },
214 VOPNAME_RENAME, { .vop_rename = nfs_rename },
215 VOPNAME_MKDIR, { .vop_mkdir = nfs_mkdir },
216 VOPNAME_RMDIR, { .vop_rmdir = nfs_rmdir },
217 VOPNAME_READDIR, { .vop_readdir = nfs_readdir },
218 VOPNAME_SYMLINK, { .vop_symlink = nfs_symlink },
219 VOPNAME_READLINK, { .vop_readlink = nfs_readlink },
220 VOPNAME_FSYNC, { .vop_fsync = nfs_fsync },
221 VOPNAME_INACTIVE, { .vop_inactive = nfs_inactive },
222 VOPNAME_FID, { .vop_fid = nfs_fid },
223 VOPNAME_RWLOCK, { .vop_rwlock = nfs_rwlock },
224 VOPNAME_RWUNLOCK, { .vop_rwunlock = nfs_rwunlock },
225 VOPNAME_SEEK, { .vop_seek = nfs_seek },
226 VOPNAME_FRLOCK, { .vop_frlock = nfs_frlock },
227 VOPNAME_SPACE, { .vop_space = nfs_space },
228 VOPNAME_REALVP, { .vop_realvp = nfs_realvp },
229 VOPNAME_GETPAGE, { .vop_getpage = nfs_getpage },
230 VOPNAME_PUTPAGE, { .vop_putpage = nfs_putpage },
231 VOPNAME_MAP, { .vop_map = nfs_map },
232 VOPNAME_ADDMAP, { .vop_addmap = nfs_addmap },
233 VOPNAME_DELMAP, { .vop_delmap = nfs_delmap },
234 VOPNAME_DUMP, { .vop_dump = nfs_dump },
235 VOPNAME_PATHCONF, { .vop_pathconf = nfs_pathconf },
236 VOPNAME_PAGEIO, { .vop_pageio = nfs_pageio },
237 VOPNAME_SETSECATTR, { .vop_setsecattr = nfs_setsecattr },
238 VOPNAME_GETSECATTR, { .vop_getsecattr = nfs_getsecattr },
239 VOPNAME_SHRLOCK, { .vop_shrlock = nfs_shrlock },
240 VOPNAME_VNEVENT, { .vop_vnevent = fs_vnevent_support },
241 NULL, NULL
242 };
243
244 /*
245 * XXX: This is referenced in modstubs.s
246 */
247 struct vnodeops *
248 nfs_getvnodeops(void)
249 {
250 return (nfs_vnodeops);
251 }
252
253 /* ARGSUSED */
254 static int
255 nfs_open(vnode_t **vpp, int flag, cred_t *cr, caller_context_t *ct)
256 {
257 int error;
258 struct vattr va;
259 rnode_t *rp;
260 vnode_t *vp;
261
|
182 struct flk_callback *, cred_t *, caller_context_t *);
183 static int nfs_space(vnode_t *, int, struct flock64 *, int, offset_t,
184 cred_t *, caller_context_t *);
185 static int nfs_realvp(vnode_t *, vnode_t **, caller_context_t *);
186 static int nfs_delmap(vnode_t *, offset_t, struct as *, caddr_t, size_t,
187 uint_t, uint_t, uint_t, cred_t *, caller_context_t *);
188 static int nfs_pathconf(vnode_t *, int, ulong_t *, cred_t *,
189 caller_context_t *);
190 static int nfs_pageio(vnode_t *, page_t *, u_offset_t, size_t, int,
191 cred_t *, caller_context_t *);
192 static int nfs_setsecattr(vnode_t *, vsecattr_t *, int, cred_t *,
193 caller_context_t *);
194 static int nfs_getsecattr(vnode_t *, vsecattr_t *, int, cred_t *,
195 caller_context_t *);
196 static int nfs_shrlock(vnode_t *, int, struct shrlock *, int, cred_t *,
197 caller_context_t *);
198
199 struct vnodeops *nfs_vnodeops;
200
201 const fs_operation_def_t nfs_vnodeops_template[] = {
202 { VOPNAME_OPEN, { .vop_open = nfs_open } },
203 { VOPNAME_CLOSE, { .vop_close = nfs_close } },
204 { VOPNAME_READ, { .vop_read = nfs_read } },
205 { VOPNAME_WRITE, { .vop_write = nfs_write } },
206 { VOPNAME_IOCTL, { .vop_ioctl = nfs_ioctl } },
207 { VOPNAME_GETATTR, { .vop_getattr = nfs_getattr } },
208 { VOPNAME_SETATTR, { .vop_setattr = nfs_setattr } },
209 { VOPNAME_ACCESS, { .vop_access = nfs_access } },
210 { VOPNAME_LOOKUP, { .vop_lookup = nfs_lookup } },
211 { VOPNAME_CREATE, { .vop_create = nfs_create } },
212 { VOPNAME_REMOVE, { .vop_remove = nfs_remove } },
213 { VOPNAME_LINK, { .vop_link = nfs_link } },
214 { VOPNAME_RENAME, { .vop_rename = nfs_rename } },
215 { VOPNAME_MKDIR, { .vop_mkdir = nfs_mkdir } },
216 { VOPNAME_RMDIR, { .vop_rmdir = nfs_rmdir } },
217 { VOPNAME_READDIR, { .vop_readdir = nfs_readdir } },
218 { VOPNAME_SYMLINK, { .vop_symlink = nfs_symlink } },
219 { VOPNAME_READLINK, { .vop_readlink = nfs_readlink } },
220 { VOPNAME_FSYNC, { .vop_fsync = nfs_fsync } },
221 { VOPNAME_INACTIVE, { .vop_inactive = nfs_inactive } },
222 { VOPNAME_FID, { .vop_fid = nfs_fid } },
223 { VOPNAME_RWLOCK, { .vop_rwlock = nfs_rwlock } },
224 { VOPNAME_RWUNLOCK, { .vop_rwunlock = nfs_rwunlock } },
225 { VOPNAME_SEEK, { .vop_seek = nfs_seek } },
226 { VOPNAME_FRLOCK, { .vop_frlock = nfs_frlock } },
227 { VOPNAME_SPACE, { .vop_space = nfs_space } },
228 { VOPNAME_REALVP, { .vop_realvp = nfs_realvp } },
229 { VOPNAME_GETPAGE, { .vop_getpage = nfs_getpage } },
230 { VOPNAME_PUTPAGE, { .vop_putpage = nfs_putpage } },
231 { VOPNAME_MAP, { .vop_map = nfs_map } },
232 { VOPNAME_ADDMAP, { .vop_addmap = nfs_addmap } },
233 { VOPNAME_DELMAP, { .vop_delmap = nfs_delmap } },
234 { VOPNAME_DUMP, { .vop_dump = nfs_dump } },
235 { VOPNAME_PATHCONF, { .vop_pathconf = nfs_pathconf } },
236 { VOPNAME_PAGEIO, { .vop_pageio = nfs_pageio } },
237 { VOPNAME_SETSECATTR, { .vop_setsecattr = nfs_setsecattr } },
238 { VOPNAME_GETSECATTR, { .vop_getsecattr = nfs_getsecattr } },
239 { VOPNAME_SHRLOCK, { .vop_shrlock = nfs_shrlock } },
240 { VOPNAME_VNEVENT, { .vop_vnevent = fs_vnevent_support } },
241 { NULL, { NULL } }
242 };
243
244 /*
245 * XXX: This is referenced in modstubs.s
246 */
247 struct vnodeops *
248 nfs_getvnodeops(void)
249 {
250 return (nfs_vnodeops);
251 }
252
253 /* ARGSUSED */
254 static int
255 nfs_open(vnode_t **vpp, int flag, cred_t *cr, caller_context_t *ct)
256 {
257 int error;
258 struct vattr va;
259 rnode_t *rp;
260 vnode_t *vp;
261
|