summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/fs
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/uts/common/fs')
-rw-r--r--usr/src/uts/common/fs/autofs/auto_vfsops.c13
-rw-r--r--usr/src/uts/common/fs/autofs/auto_vnops.c49
-rw-r--r--usr/src/uts/common/fs/cachefs/cachefs_vfsops.c20
-rw-r--r--usr/src/uts/common/fs/cachefs/cachefs_vnops.c86
-rw-r--r--usr/src/uts/common/fs/ctfs/ctfs_all.c26
-rw-r--r--usr/src/uts/common/fs/ctfs/ctfs_cdir.c26
-rw-r--r--usr/src/uts/common/fs/ctfs/ctfs_ctl.c40
-rw-r--r--usr/src/uts/common/fs/ctfs/ctfs_event.c44
-rw-r--r--usr/src/uts/common/fs/ctfs/ctfs_latest.c24
-rw-r--r--usr/src/uts/common/fs/ctfs/ctfs_root.c34
-rw-r--r--usr/src/uts/common/fs/ctfs/ctfs_sym.c26
-rw-r--r--usr/src/uts/common/fs/ctfs/ctfs_tdir.c26
-rw-r--r--usr/src/uts/common/fs/ctfs/ctfs_tmpl.c24
-rw-r--r--usr/src/uts/common/fs/dev/sdev_ptsops.c21
-rw-r--r--usr/src/uts/common/fs/dev/sdev_vfsops.c11
-rw-r--r--usr/src/uts/common/fs/dev/sdev_vnops.c57
-rw-r--r--usr/src/uts/common/fs/devfs/devfs_vfsops.c17
-rw-r--r--usr/src/uts/common/fs/devfs/devfs_vnops.c47
-rw-r--r--usr/src/uts/common/fs/doorfs/door_sys.c8
-rw-r--r--usr/src/uts/common/fs/doorfs/door_vnops.c29
-rw-r--r--usr/src/uts/common/fs/fd/fdops.c44
-rw-r--r--usr/src/uts/common/fs/fem.c220
-rw-r--r--usr/src/uts/common/fs/fifofs/fifosubr.c3
-rw-r--r--usr/src/uts/common/fs/fifofs/fifovnops.c47
-rw-r--r--usr/src/uts/common/fs/hsfs/hsfs_vfsops.c17
-rw-r--r--usr/src/uts/common/fs/hsfs/hsfs_vnops.c43
-rw-r--r--usr/src/uts/common/fs/lofs/lofs_vfsops.c19
-rw-r--r--usr/src/uts/common/fs/lofs/lofs_vnops.c89
-rw-r--r--usr/src/uts/common/fs/mntfs/mntvfsops.c13
-rw-r--r--usr/src/uts/common/fs/mntfs/mntvnops.c34
-rw-r--r--usr/src/uts/common/fs/namefs/namevfs.c21
-rw-r--r--usr/src/uts/common/fs/namefs/namevno.c48
-rw-r--r--usr/src/uts/common/fs/nfs/nfs3_vfsops.c19
-rw-r--r--usr/src/uts/common/fs/nfs/nfs3_vnops.c84
-rw-r--r--usr/src/uts/common/fs/nfs/nfs4_srv.c37
-rw-r--r--usr/src/uts/common/fs/nfs/nfs4_vfsops.c21
-rw-r--r--usr/src/uts/common/fs/nfs/nfs4_vnops.c82
-rw-r--r--usr/src/uts/common/fs/nfs/nfs_common.c5
-rw-r--r--usr/src/uts/common/fs/nfs/nfs_vfsops.c19
-rw-r--r--usr/src/uts/common/fs/nfs/nfs_vnops.c81
-rw-r--r--usr/src/uts/common/fs/objfs/objfs_data.c26
-rw-r--r--usr/src/uts/common/fs/objfs/objfs_odir.c26
-rw-r--r--usr/src/uts/common/fs/objfs/objfs_root.c26
-rw-r--r--usr/src/uts/common/fs/objfs/objfs_vfs.c16
-rw-r--r--usr/src/uts/common/fs/pcfs/pc_vfsops.c19
-rw-r--r--usr/src/uts/common/fs/pcfs/pc_vnops.c81
-rw-r--r--usr/src/uts/common/fs/portfs/port.c1
-rw-r--r--usr/src/uts/common/fs/portfs/port_vnops.c29
-rw-r--r--usr/src/uts/common/fs/proc/prvfsops.c13
-rw-r--r--usr/src/uts/common/fs/proc/prvnops.c45
-rw-r--r--usr/src/uts/common/fs/sockfs/socksctp.c1
-rw-r--r--usr/src/uts/common/fs/sockfs/socksctpsubr.c3
-rw-r--r--usr/src/uts/common/fs/sockfs/socksctpvnops.c33
-rwxr-xr-xusr/src/uts/common/fs/sockfs/socksdp.c1
-rwxr-xr-xusr/src/uts/common/fs/sockfs/socksdpsubr.c1
-rwxr-xr-xusr/src/uts/common/fs/sockfs/socksdpvnops.c33
-rw-r--r--usr/src/uts/common/fs/sockfs/socksubr.c1
-rw-r--r--usr/src/uts/common/fs/sockfs/sockvnops.c35
-rw-r--r--usr/src/uts/common/fs/specfs/specsubr.c3
-rw-r--r--usr/src/uts/common/fs/specfs/specvnops.c55
-rw-r--r--usr/src/uts/common/fs/swapfs/swap_subr.c10
-rw-r--r--usr/src/uts/common/fs/swapfs/swap_vnops.c23
-rw-r--r--usr/src/uts/common/fs/tmpfs/tmp_vfsops.c15
-rw-r--r--usr/src/uts/common/fs/tmpfs/tmp_vnops.c67
-rw-r--r--usr/src/uts/common/fs/udfs/udf_vfsops.c19
-rw-r--r--usr/src/uts/common/fs/udfs/udf_vnops.c78
-rw-r--r--usr/src/uts/common/fs/ufs/ufs_vfsops.c19
-rw-r--r--usr/src/uts/common/fs/ufs/ufs_vnops.c84
-rw-r--r--usr/src/uts/common/fs/vfs.c71
-rw-r--r--usr/src/uts/common/fs/vnode.c1
-rw-r--r--usr/src/uts/common/fs/zfs/zfs_ctldir.c49
-rw-r--r--usr/src/uts/common/fs/zfs/zfs_vfsops.c23
-rw-r--r--usr/src/uts/common/fs/zfs/zfs_vnops.c177
-rw-r--r--usr/src/uts/common/fs/zfs/zfs_znode.c1
74 files changed, 1357 insertions, 1302 deletions
diff --git a/usr/src/uts/common/fs/autofs/auto_vfsops.c b/usr/src/uts/common/fs/autofs/auto_vfsops.c
index 10b40850d8..4b5040bfc4 100644
--- a/usr/src/uts/common/fs/autofs/auto_vfsops.c
+++ b/usr/src/uts/common/fs/autofs/auto_vfsops.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -30,6 +30,7 @@
#include <sys/proc.h>
#include <sys/disp.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/vnode.h>
#include <sys/uio.h>
#include <sys/kmem.h>
@@ -250,11 +251,11 @@ int
autofs_init(int fstype, char *name)
{
static const fs_operation_def_t auto_vfsops_template[] = {
- VFSNAME_MOUNT, auto_mount,
- VFSNAME_UNMOUNT, auto_unmount,
- VFSNAME_ROOT, auto_root,
- VFSNAME_STATVFS, auto_statvfs,
- NULL, NULL
+ VFSNAME_MOUNT, { .vfs_mount = auto_mount },
+ VFSNAME_UNMOUNT, { .vfs_unmount = auto_unmount },
+ VFSNAME_ROOT, { .vfs_root = auto_root },
+ VFSNAME_STATVFS, { .vfs_statvfs = auto_statvfs },
+ NULL, NULL
};
int error;
diff --git a/usr/src/uts/common/fs/autofs/auto_vnops.c b/usr/src/uts/common/fs/autofs/auto_vnops.c
index 16c5a26781..0587ed066e 100644
--- a/usr/src/uts/common/fs/autofs/auto_vnops.c
+++ b/usr/src/uts/common/fs/autofs/auto_vnops.c
@@ -31,6 +31,7 @@
#include <sys/proc.h>
#include <sys/vnode.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/uio.h>
#include <sys/cred.h>
#include <sys/pathname.h>
@@ -81,30 +82,30 @@ static int auto_trigger_mount(vnode_t *, cred_t *, vnode_t **);
vnodeops_t *auto_vnodeops;
const fs_operation_def_t auto_vnodeops_template[] = {
- VOPNAME_OPEN, auto_open,
- VOPNAME_CLOSE, auto_close,
- VOPNAME_GETATTR, auto_getattr,
- VOPNAME_SETATTR, auto_setattr,
- VOPNAME_ACCESS, auto_access,
- VOPNAME_LOOKUP, auto_lookup,
- VOPNAME_CREATE, auto_create,
- VOPNAME_REMOVE, auto_remove,
- VOPNAME_LINK, auto_link,
- VOPNAME_RENAME, auto_rename,
- VOPNAME_MKDIR, auto_mkdir,
- VOPNAME_RMDIR, auto_rmdir,
- VOPNAME_READDIR, auto_readdir,
- VOPNAME_SYMLINK, auto_symlink,
- VOPNAME_READLINK, auto_readlink,
- VOPNAME_FSYNC, auto_fsync,
- VOPNAME_INACTIVE, (fs_generic_func_p) auto_inactive,
- VOPNAME_RWLOCK, auto_rwlock,
- VOPNAME_RWUNLOCK, (fs_generic_func_p) auto_rwunlock,
- VOPNAME_SEEK, auto_seek,
- VOPNAME_FRLOCK, fs_error,
- VOPNAME_DISPOSE, fs_error,
- VOPNAME_SHRLOCK, fs_error,
- NULL, NULL
+ VOPNAME_OPEN, { .vop_open = auto_open },
+ VOPNAME_CLOSE, { .vop_close = auto_close },
+ VOPNAME_GETATTR, { .vop_getattr = auto_getattr },
+ VOPNAME_SETATTR, { .vop_setattr = auto_setattr },
+ VOPNAME_ACCESS, { .vop_access = auto_access },
+ VOPNAME_LOOKUP, { .vop_lookup = auto_lookup },
+ VOPNAME_CREATE, { .vop_create = auto_create },
+ VOPNAME_REMOVE, { .vop_remove = auto_remove },
+ VOPNAME_LINK, { .vop_link = auto_link },
+ VOPNAME_RENAME, { .vop_rename = auto_rename },
+ VOPNAME_MKDIR, { .vop_mkdir = auto_mkdir },
+ VOPNAME_RMDIR, { .vop_rmdir = auto_rmdir },
+ VOPNAME_READDIR, { .vop_readdir = auto_readdir },
+ VOPNAME_SYMLINK, { .vop_symlink = auto_symlink },
+ VOPNAME_READLINK, { .vop_readlink = auto_readlink },
+ VOPNAME_FSYNC, { .vop_fsync = auto_fsync },
+ VOPNAME_INACTIVE, { .vop_inactive = auto_inactive },
+ VOPNAME_RWLOCK, { .vop_rwlock = auto_rwlock },
+ VOPNAME_RWUNLOCK, { .vop_rwunlock = auto_rwunlock },
+ VOPNAME_SEEK, { .vop_seek = auto_seek },
+ VOPNAME_FRLOCK, { .error = fs_error },
+ VOPNAME_DISPOSE, { .error = fs_error },
+ VOPNAME_SHRLOCK, { .error = fs_error },
+ NULL, NULL
};
diff --git a/usr/src/uts/common/fs/cachefs/cachefs_vfsops.c b/usr/src/uts/common/fs/cachefs/cachefs_vfsops.c
index 81be82c033..fd1ee0b4d8 100644
--- a/usr/src/uts/common/fs/cachefs/cachefs_vfsops.c
+++ b/usr/src/uts/common/fs/cachefs/cachefs_vfsops.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -33,6 +32,7 @@
#include <sys/proc.h>
#include <sys/user.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/vnode.h>
#include <sys/pathname.h>
#include <sys/uio.h>
@@ -98,12 +98,12 @@ int
cachefs_init_vfsops(int fstype)
{
static const fs_operation_def_t cachefs_vfsops_template[] = {
- VFSNAME_MOUNT, cachefs_mount,
- VFSNAME_UNMOUNT, cachefs_unmount,
- VFSNAME_ROOT, cachefs_root,
- VFSNAME_STATVFS, cachefs_statvfs,
- VFSNAME_SYNC, (fs_generic_func_p) cachefs_sync,
- NULL, NULL
+ VFSNAME_MOUNT, { .vfs_mount = cachefs_mount },
+ VFSNAME_UNMOUNT, { .vfs_unmount = cachefs_unmount },
+ VFSNAME_ROOT, { .vfs_root = cachefs_root },
+ VFSNAME_STATVFS, { .vfs_statvfs = cachefs_statvfs },
+ VFSNAME_SYNC, { .vfs_sync = cachefs_sync },
+ NULL, NULL
};
int error;
diff --git a/usr/src/uts/common/fs/cachefs/cachefs_vnops.c b/usr/src/uts/common/fs/cachefs/cachefs_vnops.c
index 796d4a7173..5451c20467 100644
--- a/usr/src/uts/common/fs/cachefs/cachefs_vnops.c
+++ b/usr/src/uts/common/fs/cachefs/cachefs_vnops.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -35,6 +34,7 @@
#include <sys/time.h>
#include <sys/vnode.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/file.h>
#include <sys/filio.h>
#include <sys/uio.h>
@@ -246,45 +246,45 @@ static int cachefs_space_backfs_nfsv4(struct vnode *vp, int cmd,
struct vnodeops *cachefs_vnodeops;
static const fs_operation_def_t cachefs_vnodeops_template[] = {
- VOPNAME_OPEN, cachefs_open,
- VOPNAME_CLOSE, cachefs_close,
- VOPNAME_READ, cachefs_read,
- VOPNAME_WRITE, cachefs_write,
- VOPNAME_IOCTL, cachefs_ioctl,
- VOPNAME_GETATTR, cachefs_getattr,
- VOPNAME_SETATTR, cachefs_setattr,
- VOPNAME_ACCESS, cachefs_access,
- VOPNAME_LOOKUP, cachefs_lookup,
- VOPNAME_CREATE, cachefs_create,
- VOPNAME_REMOVE, cachefs_remove,
- VOPNAME_LINK, cachefs_link,
- VOPNAME_RENAME, cachefs_rename,
- VOPNAME_MKDIR, cachefs_mkdir,
- VOPNAME_RMDIR, cachefs_rmdir,
- VOPNAME_READDIR, cachefs_readdir,
- VOPNAME_SYMLINK, cachefs_symlink,
- VOPNAME_READLINK, cachefs_readlink,
- VOPNAME_FSYNC, cachefs_fsync,
- VOPNAME_INACTIVE, (fs_generic_func_p) cachefs_inactive,
- VOPNAME_FID, cachefs_fid,
- VOPNAME_RWLOCK, cachefs_rwlock,
- VOPNAME_RWUNLOCK, (fs_generic_func_p) cachefs_rwunlock,
- VOPNAME_SEEK, cachefs_seek,
- VOPNAME_FRLOCK, cachefs_frlock,
- VOPNAME_SPACE, cachefs_space,
- VOPNAME_REALVP, cachefs_realvp,
- VOPNAME_GETPAGE, cachefs_getpage,
- VOPNAME_PUTPAGE, cachefs_putpage,
- VOPNAME_MAP, (fs_generic_func_p) cachefs_map,
- VOPNAME_ADDMAP, (fs_generic_func_p) cachefs_addmap,
- VOPNAME_DELMAP, cachefs_delmap,
- VOPNAME_DUMP, cachefs_dump,
- VOPNAME_PATHCONF, cachefs_pathconf,
- VOPNAME_PAGEIO, cachefs_pageio,
- VOPNAME_SETSECATTR, cachefs_setsecattr,
- VOPNAME_GETSECATTR, cachefs_getsecattr,
- VOPNAME_SHRLOCK, cachefs_shrlock,
- NULL, NULL
+ VOPNAME_OPEN, { .vop_open = cachefs_open },
+ VOPNAME_CLOSE, { .vop_close = cachefs_close },
+ VOPNAME_READ, { .vop_read = cachefs_read },
+ VOPNAME_WRITE, { .vop_write = cachefs_write },
+ VOPNAME_IOCTL, { .vop_ioctl = cachefs_ioctl },
+ VOPNAME_GETATTR, { .vop_getattr = cachefs_getattr },
+ VOPNAME_SETATTR, { .vop_setattr = cachefs_setattr },
+ VOPNAME_ACCESS, { .vop_access = cachefs_access },
+ VOPNAME_LOOKUP, { .vop_lookup = cachefs_lookup },
+ VOPNAME_CREATE, { .vop_create = cachefs_create },
+ VOPNAME_REMOVE, { .vop_remove = cachefs_remove },
+ VOPNAME_LINK, { .vop_link = cachefs_link },
+ VOPNAME_RENAME, { .vop_rename = cachefs_rename },
+ VOPNAME_MKDIR, { .vop_mkdir = cachefs_mkdir },
+ VOPNAME_RMDIR, { .vop_rmdir = cachefs_rmdir },
+ VOPNAME_READDIR, { .vop_readdir = cachefs_readdir },
+ VOPNAME_SYMLINK, { .vop_symlink = cachefs_symlink },
+ VOPNAME_READLINK, { .vop_readlink = cachefs_readlink },
+ VOPNAME_FSYNC, { .vop_fsync = cachefs_fsync },
+ VOPNAME_INACTIVE, { .vop_inactive = cachefs_inactive },
+ VOPNAME_FID, { .vop_fid = cachefs_fid },
+ VOPNAME_RWLOCK, { .vop_rwlock = cachefs_rwlock },
+ VOPNAME_RWUNLOCK, { .vop_rwunlock = cachefs_rwunlock },
+ VOPNAME_SEEK, { .vop_seek = cachefs_seek },
+ VOPNAME_FRLOCK, { .vop_frlock = cachefs_frlock },
+ VOPNAME_SPACE, { .vop_space = cachefs_space },
+ VOPNAME_REALVP, { .vop_realvp = cachefs_realvp },
+ VOPNAME_GETPAGE, { .vop_getpage = cachefs_getpage },
+ VOPNAME_PUTPAGE, { .vop_putpage = cachefs_putpage },
+ VOPNAME_MAP, { .vop_map = cachefs_map },
+ VOPNAME_ADDMAP, { .vop_addmap = cachefs_addmap },
+ VOPNAME_DELMAP, { .vop_delmap = cachefs_delmap },
+ VOPNAME_DUMP, { .vop_dump = cachefs_dump },
+ VOPNAME_PATHCONF, { .vop_pathconf = cachefs_pathconf },
+ VOPNAME_PAGEIO, { .vop_pageio = cachefs_pageio },
+ VOPNAME_SETSECATTR, { .vop_setsecattr = cachefs_setsecattr },
+ VOPNAME_GETSECATTR, { .vop_getsecattr = cachefs_getsecattr },
+ VOPNAME_SHRLOCK, { .vop_shrlock = cachefs_shrlock },
+ NULL, NULL
};
/* forward declarations of statics */
diff --git a/usr/src/uts/common/fs/ctfs/ctfs_all.c b/usr/src/uts/common/fs/ctfs/ctfs_all.c
index 4933edd960..382f66da8a 100644
--- a/usr/src/uts/common/fs/ctfs/ctfs_all.c
+++ b/usr/src/uts/common/fs/ctfs/ctfs_all.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -31,6 +30,7 @@
#include <sys/time.h>
#include <sys/cred.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/gfs.h>
#include <sys/vnode.h>
#include <sys/systm.h>
@@ -135,14 +135,14 @@ ctfs_adir_do_readdir(vnode_t *vp, struct dirent64 *dp, int *eofp,
}
const fs_operation_def_t ctfs_tops_adir[] = {
- { VOPNAME_OPEN, ctfs_open },
- { VOPNAME_CLOSE, ctfs_close },
- { VOPNAME_IOCTL, fs_inval },
- { VOPNAME_GETATTR, ctfs_adir_getattr },
- { VOPNAME_ACCESS, ctfs_access_dir },
- { VOPNAME_READDIR, gfs_vop_readdir },
- { VOPNAME_LOOKUP, gfs_vop_lookup },
- { VOPNAME_SEEK, fs_seek },
- { VOPNAME_INACTIVE, (fs_generic_func_p) gfs_vop_inactive },
+ { VOPNAME_OPEN, { .vop_open = ctfs_open } },
+ { VOPNAME_CLOSE, { .vop_close = ctfs_close } },
+ { VOPNAME_IOCTL, { .error = fs_inval } },
+ { VOPNAME_GETATTR, { .vop_getattr = ctfs_adir_getattr } },
+ { VOPNAME_ACCESS, { .vop_access = ctfs_access_dir } },
+ { VOPNAME_READDIR, { .vop_readdir = gfs_vop_readdir } },
+ { VOPNAME_LOOKUP, { .vop_lookup = gfs_vop_lookup } },
+ { VOPNAME_SEEK, { .vop_seek = fs_seek } },
+ { VOPNAME_INACTIVE, { .vop_inactive = gfs_vop_inactive } },
{ NULL, NULL }
};
diff --git a/usr/src/uts/common/fs/ctfs/ctfs_cdir.c b/usr/src/uts/common/fs/ctfs/ctfs_cdir.c
index 0f038b8b13..4861f73244 100644
--- a/usr/src/uts/common/fs/ctfs/ctfs_cdir.c
+++ b/usr/src/uts/common/fs/ctfs/ctfs_cdir.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -31,6 +30,7 @@
#include <sys/time.h>
#include <sys/cred.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/gfs.h>
#include <sys/vnode.h>
#include <sys/systm.h>
@@ -149,14 +149,14 @@ ctfs_cdir_inactive(vnode_t *vp, cred_t *cr)
const fs_operation_def_t ctfs_tops_cdir[] = {
- { VOPNAME_OPEN, ctfs_open },
- { VOPNAME_CLOSE, ctfs_close },
- { VOPNAME_IOCTL, fs_inval },
- { VOPNAME_GETATTR, ctfs_cdir_getattr },
- { VOPNAME_ACCESS, ctfs_access_dir },
- { VOPNAME_READDIR, gfs_vop_readdir },
- { VOPNAME_LOOKUP, gfs_vop_lookup },
- { VOPNAME_SEEK, fs_seek },
- { VOPNAME_INACTIVE, (fs_generic_func_p) ctfs_cdir_inactive },
+ { VOPNAME_OPEN, { .vop_open = ctfs_open } },
+ { VOPNAME_CLOSE, { .vop_close = ctfs_close } },
+ { VOPNAME_IOCTL, { .error = fs_inval } },
+ { VOPNAME_GETATTR, { .vop_getattr = ctfs_cdir_getattr } },
+ { VOPNAME_ACCESS, { .vop_access = ctfs_access_dir } },
+ { VOPNAME_READDIR, { .vop_readdir = gfs_vop_readdir } },
+ { VOPNAME_LOOKUP, { .vop_lookup = gfs_vop_lookup } },
+ { VOPNAME_SEEK, { .vop_seek = fs_seek } },
+ { VOPNAME_INACTIVE, { .vop_inactive = ctfs_cdir_inactive } },
{ NULL, NULL }
};
diff --git a/usr/src/uts/common/fs/ctfs/ctfs_ctl.c b/usr/src/uts/common/fs/ctfs/ctfs_ctl.c
index f4980d4a97..43b5813ff1 100644
--- a/usr/src/uts/common/fs/ctfs/ctfs_ctl.c
+++ b/usr/src/uts/common/fs/ctfs/ctfs_ctl.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -31,6 +30,7 @@
#include <sys/time.h>
#include <sys/cred.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/gfs.h>
#include <sys/vnode.h>
#include <sys/systm.h>
@@ -183,14 +183,14 @@ ctfs_ctl_ioctl(vnode_t *vp, int cmd, intptr_t arg, int flag, cred_t *cr,
}
const fs_operation_def_t ctfs_tops_ctl[] = {
- { VOPNAME_OPEN, ctfs_ctl_open },
- { VOPNAME_CLOSE, ctfs_close },
- { VOPNAME_IOCTL, ctfs_ctl_ioctl },
- { VOPNAME_GETATTR, ctfs_ctl_getattr },
- { VOPNAME_ACCESS, ctfs_ctl_access },
- { VOPNAME_READDIR, fs_notdir },
- { VOPNAME_LOOKUP, fs_notdir },
- { VOPNAME_INACTIVE, (fs_generic_func_p) gfs_vop_inactive },
+ { VOPNAME_OPEN, { .vop_open = ctfs_ctl_open } },
+ { VOPNAME_CLOSE, { .vop_close = ctfs_close } },
+ { VOPNAME_IOCTL, { .vop_ioctl = ctfs_ctl_ioctl } },
+ { VOPNAME_GETATTR, { .vop_getattr = ctfs_ctl_getattr } },
+ { VOPNAME_ACCESS, { .vop_access = ctfs_ctl_access } },
+ { VOPNAME_READDIR, { .error = fs_notdir } },
+ { VOPNAME_LOOKUP, { .error = fs_notdir } },
+ { VOPNAME_INACTIVE, { .vop_inactive = gfs_vop_inactive } },
{ NULL, NULL }
};
@@ -276,13 +276,13 @@ ctfs_stat_ioctl(vnode_t *vp, int cmd, intptr_t arg, int flag, cred_t *cr,
}
const fs_operation_def_t ctfs_tops_stat[] = {
- { VOPNAME_OPEN, ctfs_open },
- { VOPNAME_CLOSE, ctfs_close },
- { VOPNAME_IOCTL, ctfs_stat_ioctl },
- { VOPNAME_GETATTR, ctfs_ctl_getattr },
- { VOPNAME_ACCESS, ctfs_access_readonly },
- { VOPNAME_READDIR, fs_notdir },
- { VOPNAME_LOOKUP, fs_notdir },
- { VOPNAME_INACTIVE, (fs_generic_func_p) gfs_vop_inactive },
+ { VOPNAME_OPEN, { .vop_open = ctfs_open } },
+ { VOPNAME_CLOSE, { .vop_close = ctfs_close } },
+ { VOPNAME_IOCTL, { .vop_ioctl = ctfs_stat_ioctl } },
+ { VOPNAME_GETATTR, { .vop_getattr = ctfs_ctl_getattr } },
+ { VOPNAME_ACCESS, { .vop_access = ctfs_access_readonly } },
+ { VOPNAME_READDIR, { .error = fs_notdir } },
+ { VOPNAME_LOOKUP, { .error = fs_notdir } },
+ { VOPNAME_INACTIVE, { .vop_inactive = gfs_vop_inactive } },
{ NULL, NULL }
};
diff --git a/usr/src/uts/common/fs/ctfs/ctfs_event.c b/usr/src/uts/common/fs/ctfs/ctfs_event.c
index 7fa7cfb608..ac4447e493 100644
--- a/usr/src/uts/common/fs/ctfs/ctfs_event.c
+++ b/usr/src/uts/common/fs/ctfs/ctfs_event.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -31,6 +30,7 @@
#include <sys/time.h>
#include <sys/cred.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/gfs.h>
#include <sys/vnode.h>
#include <sys/systm.h>
@@ -304,15 +304,15 @@ ctfs_ev_poll(vnode_t *vp, short events, int anyyet, short *reventsp,
}
const fs_operation_def_t ctfs_tops_event[] = {
- { VOPNAME_OPEN, ctfs_ev_open },
- { VOPNAME_CLOSE, ctfs_close },
- { VOPNAME_IOCTL, ctfs_ev_ioctl },
- { VOPNAME_GETATTR, ctfs_ev_getattr },
- { VOPNAME_ACCESS, ctfs_ev_access },
- { VOPNAME_READDIR, fs_notdir },
- { VOPNAME_LOOKUP, fs_notdir },
- { VOPNAME_INACTIVE, (fs_generic_func_p) ctfs_ev_inactive },
- { VOPNAME_POLL, (fs_generic_func_p) ctfs_ev_poll },
+ { VOPNAME_OPEN, { .vop_open = ctfs_ev_open } },
+ { VOPNAME_CLOSE, { .vop_close = ctfs_close } },
+ { VOPNAME_IOCTL, { .vop_ioctl = ctfs_ev_ioctl } },
+ { VOPNAME_GETATTR, { .vop_getattr = ctfs_ev_getattr } },
+ { VOPNAME_ACCESS, { .vop_access = ctfs_ev_access } },
+ { VOPNAME_READDIR, { .error = fs_notdir } },
+ { VOPNAME_LOOKUP, { .error = fs_notdir } },
+ { VOPNAME_INACTIVE, { .vop_inactive = ctfs_ev_inactive } },
+ { VOPNAME_POLL, { .vop_poll = ctfs_ev_poll } },
{ NULL, NULL }
};
@@ -447,14 +447,14 @@ ctfs_bu_poll(vnode_t *vp, short events, int anyyet, short *reventsp,
}
const fs_operation_def_t ctfs_tops_bundle[] = {
- { VOPNAME_OPEN, ctfs_bu_open },
- { VOPNAME_CLOSE, ctfs_close },
- { VOPNAME_IOCTL, ctfs_bu_ioctl },
- { VOPNAME_GETATTR, ctfs_bu_getattr },
- { VOPNAME_ACCESS, ctfs_access_readonly },
- { VOPNAME_READDIR, fs_notdir },
- { VOPNAME_LOOKUP, fs_notdir },
- { VOPNAME_INACTIVE, (fs_generic_func_p) ctfs_bu_inactive },
- { VOPNAME_POLL, (fs_generic_func_p) ctfs_bu_poll },
+ { VOPNAME_OPEN, { .vop_open = ctfs_bu_open } },
+ { VOPNAME_CLOSE, { .vop_close = ctfs_close } },
+ { VOPNAME_IOCTL, { .vop_ioctl = ctfs_bu_ioctl } },
+ { VOPNAME_GETATTR, { .vop_getattr = ctfs_bu_getattr } },
+ { VOPNAME_ACCESS, { .vop_access = ctfs_access_readonly } },
+ { VOPNAME_READDIR, { .error = fs_notdir } },
+ { VOPNAME_LOOKUP, { .error = fs_notdir } },
+ { VOPNAME_INACTIVE, { .vop_inactive = ctfs_bu_inactive } },
+ { VOPNAME_POLL, { .vop_poll = ctfs_bu_poll } },
{ NULL, NULL }
};
diff --git a/usr/src/uts/common/fs/ctfs/ctfs_latest.c b/usr/src/uts/common/fs/ctfs/ctfs_latest.c
index 27ee75917e..7d15dd494a 100644
--- a/usr/src/uts/common/fs/ctfs/ctfs_latest.c
+++ b/usr/src/uts/common/fs/ctfs/ctfs_latest.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -31,6 +30,7 @@
#include <sys/time.h>
#include <sys/cred.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/gfs.h>
#include <sys/vnode.h>
#include <sys/systm.h>
@@ -162,13 +162,13 @@ ctfs_latest_getattr(vnode_t *vp, vattr_t *vap, int flags, cred_t *cr)
}
const fs_operation_def_t ctfs_tops_latest[] = {
- { VOPNAME_OPEN, ctfs_latest_open },
- { VOPNAME_CLOSE, fs_inval },
- { VOPNAME_IOCTL, fs_inval },
- { VOPNAME_GETATTR, ctfs_latest_getattr },
- { VOPNAME_ACCESS, ctfs_latest_access },
- { VOPNAME_READDIR, fs_notdir },
- { VOPNAME_LOOKUP, fs_notdir },
- { VOPNAME_INACTIVE, (fs_generic_func_p) gfs_vop_inactive },
+ { VOPNAME_OPEN, { .vop_open = ctfs_latest_open } },
+ { VOPNAME_CLOSE, { .error = fs_inval } },
+ { VOPNAME_IOCTL, { .error = fs_inval } },
+ { VOPNAME_GETATTR, { .vop_getattr = ctfs_latest_getattr } },
+ { VOPNAME_ACCESS, { .vop_access = ctfs_latest_access } },
+ { VOPNAME_READDIR, { .error = fs_notdir } },
+ { VOPNAME_LOOKUP, { .error = fs_notdir } },
+ { VOPNAME_INACTIVE, { .vop_inactive = gfs_vop_inactive } },
{ NULL, NULL }
};
diff --git a/usr/src/uts/common/fs/ctfs/ctfs_root.c b/usr/src/uts/common/fs/ctfs/ctfs_root.c
index 92f0e9027d..1616a986cd 100644
--- a/usr/src/uts/common/fs/ctfs/ctfs_root.c
+++ b/usr/src/uts/common/fs/ctfs/ctfs_root.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -32,6 +31,7 @@
#include <sys/time.h>
#include <sys/cred.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/gfs.h>
#include <sys/vnode.h>
#include <sys/systm.h>
@@ -364,10 +364,10 @@ ctfs_statvfs(vfs_t *vfsp, statvfs64_t *sp)
}
static const fs_operation_def_t ctfs_vfstops[] = {
- { VFSNAME_MOUNT, ctfs_mount },
- { VFSNAME_UNMOUNT, ctfs_unmount },
- { VFSNAME_ROOT, ctfs_root },
- { VFSNAME_STATVFS, ctfs_statvfs },
+ { VFSNAME_MOUNT, { .vfs_mount = ctfs_mount } },
+ { VFSNAME_UNMOUNT, { .vfs_unmount = ctfs_unmount } },
+ { VFSNAME_ROOT, { .vfs_root = ctfs_root } },
+ { VFSNAME_STATVFS, { .vfs_statvfs = ctfs_statvfs } },
{ NULL, NULL }
};
@@ -485,14 +485,14 @@ ctfs_root_do_inode(vnode_t *vp, int index)
}
static const fs_operation_def_t ctfs_tops_root[] = {
- { VOPNAME_OPEN, ctfs_open },
- { VOPNAME_CLOSE, ctfs_close },
- { VOPNAME_IOCTL, fs_inval },
- { VOPNAME_GETATTR, ctfs_root_getattr },
- { VOPNAME_ACCESS, ctfs_access_dir },
- { VOPNAME_READDIR, gfs_vop_readdir },
- { VOPNAME_LOOKUP, gfs_vop_lookup },
- { VOPNAME_SEEK, fs_seek },
- { VOPNAME_INACTIVE, (fs_generic_func_p) gfs_vop_inactive },
+ { VOPNAME_OPEN, { .vop_open = ctfs_open } },
+ { VOPNAME_CLOSE, { .vop_close = ctfs_close } },
+ { VOPNAME_IOCTL, { .error = fs_inval } },
+ { VOPNAME_GETATTR, { .vop_getattr = ctfs_root_getattr } },
+ { VOPNAME_ACCESS, { .vop_access = ctfs_access_dir } },
+ { VOPNAME_READDIR, { .vop_readdir = gfs_vop_readdir } },
+ { VOPNAME_LOOKUP, { .vop_lookup = gfs_vop_lookup } },
+ { VOPNAME_SEEK, { .vop_seek = fs_seek } },
+ { VOPNAME_INACTIVE, { .vop_inactive = gfs_vop_inactive } },
{ NULL, NULL }
};
diff --git a/usr/src/uts/common/fs/ctfs/ctfs_sym.c b/usr/src/uts/common/fs/ctfs/ctfs_sym.c
index 14bd5f1694..bf825ab366 100644
--- a/usr/src/uts/common/fs/ctfs/ctfs_sym.c
+++ b/usr/src/uts/common/fs/ctfs/ctfs_sym.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -31,6 +30,7 @@
#include <sys/time.h>
#include <sys/cred.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/gfs.h>
#include <sys/vnode.h>
#include <sys/systm.h>
@@ -129,14 +129,14 @@ ctfs_sym_inactive(vnode_t *vp, cred_t *cr)
}
const fs_operation_def_t ctfs_tops_sym[] = {
- { VOPNAME_OPEN, ctfs_open },
- { VOPNAME_CLOSE, ctfs_close },
- { VOPNAME_IOCTL, fs_inval },
- { VOPNAME_GETATTR, ctfs_sym_getattr },
- { VOPNAME_READLINK, ctfs_sym_readlink },
- { VOPNAME_ACCESS, ctfs_access_readonly },
- { VOPNAME_READDIR, fs_notdir },
- { VOPNAME_LOOKUP, fs_notdir },
- { VOPNAME_INACTIVE, (fs_generic_func_p) ctfs_sym_inactive },
+ { VOPNAME_OPEN, { .vop_open = ctfs_open } },
+ { VOPNAME_CLOSE, { .vop_close = ctfs_close } },
+ { VOPNAME_IOCTL, { .error = fs_inval } },
+ { VOPNAME_GETATTR, { .vop_getattr = ctfs_sym_getattr } },
+ { VOPNAME_READLINK, { .vop_readlink = ctfs_sym_readlink } },
+ { VOPNAME_ACCESS, { .vop_access = ctfs_access_readonly } },
+ { VOPNAME_READDIR, { .error = fs_notdir } },
+ { VOPNAME_LOOKUP, { .error = fs_notdir } },
+ { VOPNAME_INACTIVE, { .vop_inactive = ctfs_sym_inactive } },
{ NULL, NULL }
};
diff --git a/usr/src/uts/common/fs/ctfs/ctfs_tdir.c b/usr/src/uts/common/fs/ctfs/ctfs_tdir.c
index 1f5dd42370..2d47c72339 100644
--- a/usr/src/uts/common/fs/ctfs/ctfs_tdir.c
+++ b/usr/src/uts/common/fs/ctfs/ctfs_tdir.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -31,6 +30,7 @@
#include <sys/time.h>
#include <sys/cred.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/gfs.h>
#include <sys/vnode.h>
#include <sys/systm.h>
@@ -146,14 +146,14 @@ ctfs_tdir_do_lookup(vnode_t *vp, const char *nm, vnode_t **vpp, ino64_t *inop)
}
const fs_operation_def_t ctfs_tops_tdir[] = {
- { VOPNAME_OPEN, ctfs_open },
- { VOPNAME_CLOSE, ctfs_close },
- { VOPNAME_IOCTL, fs_inval },
- { VOPNAME_GETATTR, ctfs_tdir_getattr },
- { VOPNAME_ACCESS, ctfs_access_dir },
- { VOPNAME_READDIR, gfs_vop_readdir },
- { VOPNAME_LOOKUP, gfs_vop_lookup },
- { VOPNAME_SEEK, fs_seek },
- { VOPNAME_INACTIVE, (fs_generic_func_p) gfs_vop_inactive },
+ { VOPNAME_OPEN, { .vop_open = ctfs_open } },
+ { VOPNAME_CLOSE, { .vop_close = ctfs_close } },
+ { VOPNAME_IOCTL, { .error = fs_inval } },
+ { VOPNAME_GETATTR, { .vop_getattr = ctfs_tdir_getattr } },
+ { VOPNAME_ACCESS, { .vop_access = ctfs_access_dir } },
+ { VOPNAME_READDIR, { .vop_readdir = gfs_vop_readdir } },
+ { VOPNAME_LOOKUP, { .vop_lookup = gfs_vop_lookup } },
+ { VOPNAME_SEEK, { .vop_seek = fs_seek } },
+ { VOPNAME_INACTIVE, { .vop_inactive = gfs_vop_inactive } },
{ NULL, NULL }
};
diff --git a/usr/src/uts/common/fs/ctfs/ctfs_tmpl.c b/usr/src/uts/common/fs/ctfs/ctfs_tmpl.c
index 329ae49fd9..28d0c93662 100644
--- a/usr/src/uts/common/fs/ctfs/ctfs_tmpl.c
+++ b/usr/src/uts/common/fs/ctfs/ctfs_tmpl.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -31,6 +30,7 @@
#include <sys/time.h>
#include <sys/cred.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/gfs.h>
#include <sys/vnode.h>
#include <sys/systm.h>
@@ -164,13 +164,13 @@ ctfs_tmpl_inactive(vnode_t *vp, cred_t *cr)
}
const fs_operation_def_t ctfs_tops_tmpl[] = {
- { VOPNAME_OPEN, ctfs_tmpl_open },
- { VOPNAME_CLOSE, ctfs_close },
- { VOPNAME_IOCTL, ctfs_tmpl_ioctl },
- { VOPNAME_GETATTR, ctfs_tmpl_getattr },
- { VOPNAME_ACCESS, ctfs_access_readwrite },
- { VOPNAME_READDIR, fs_notdir },
- { VOPNAME_LOOKUP, fs_notdir },
- { VOPNAME_INACTIVE, (fs_generic_func_p) ctfs_tmpl_inactive },
+ { VOPNAME_OPEN, { .vop_open = ctfs_tmpl_open } },
+ { VOPNAME_CLOSE, { .vop_close = ctfs_close } },
+ { VOPNAME_IOCTL, { .vop_ioctl = ctfs_tmpl_ioctl } },
+ { VOPNAME_GETATTR, { .vop_getattr = ctfs_tmpl_getattr } },
+ { VOPNAME_ACCESS, { .vop_access = ctfs_access_readwrite } },
+ { VOPNAME_READDIR, { .error = fs_notdir } },
+ { VOPNAME_LOOKUP, { .error = fs_notdir } },
+ { VOPNAME_INACTIVE, { .vop_inactive = ctfs_tmpl_inactive } },
{ NULL, NULL }
};
diff --git a/usr/src/uts/common/fs/dev/sdev_ptsops.c b/usr/src/uts/common/fs/dev/sdev_ptsops.c
index 8cdbee7985..64493f6402 100644
--- a/usr/src/uts/common/fs/dev/sdev_ptsops.c
+++ b/usr/src/uts/common/fs/dev/sdev_ptsops.c
@@ -42,6 +42,7 @@
#include <sys/policy.h>
#include <sys/ptms.h>
#include <sys/stat.h>
+#include <sys/vfs_opreg.h>
#define DEVPTS_UID_DEFAULT 0
#define DEVPTS_GID_DEFAULT 3
@@ -408,14 +409,14 @@ devpts_setattr(struct vnode *vp, struct vattr *vap, int flags,
* avoid persisting permissions.
*/
const fs_operation_def_t devpts_vnodeops_tbl[] = {
- VOPNAME_READDIR, devpts_readdir,
- VOPNAME_LOOKUP, devpts_lookup,
- VOPNAME_CREATE, devpts_create,
- VOPNAME_SETATTR, devpts_setattr,
- VOPNAME_REMOVE, fs_nosys,
- VOPNAME_MKDIR, fs_nosys,
- VOPNAME_RMDIR, fs_nosys,
- VOPNAME_SYMLINK, fs_nosys,
- VOPNAME_SETSECATTR, fs_nosys,
- NULL, NULL
+ VOPNAME_READDIR, { .vop_readdir = devpts_readdir },
+ VOPNAME_LOOKUP, { .vop_lookup = devpts_lookup },
+ VOPNAME_CREATE, { .vop_create = devpts_create },
+ VOPNAME_SETATTR, { .vop_setattr = devpts_setattr },
+ VOPNAME_REMOVE, { .error = fs_nosys },
+ VOPNAME_MKDIR, { .error = fs_nosys },
+ VOPNAME_RMDIR, { .error = fs_nosys },
+ VOPNAME_SYMLINK, { .error = fs_nosys },
+ VOPNAME_SETSECATTR, { .error = fs_nosys },
+ NULL, NULL
};
diff --git a/usr/src/uts/common/fs/dev/sdev_vfsops.c b/usr/src/uts/common/fs/dev/sdev_vfsops.c
index 5baf66ea1d..ca971fe30c 100644
--- a/usr/src/uts/common/fs/dev/sdev_vfsops.c
+++ b/usr/src/uts/common/fs/dev/sdev_vfsops.c
@@ -37,6 +37,7 @@
#include <sys/time.h>
#include <sys/pathname.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/vnode.h>
#include <sys/file.h>
#include <sys/stat.h>
@@ -144,11 +145,11 @@ static int
devinit(int fstype, char *name)
{
static const fs_operation_def_t dev_vfsops_tbl[] = {
- VFSNAME_MOUNT, sdev_mount, /* mount file system */
- VFSNAME_UNMOUNT, sdev_unmount, /* unmount file system */
- VFSNAME_ROOT, sdev_root, /* get root vnode */
- VFSNAME_STATVFS, sdev_statvfs, /* get file system statistics */
- NULL, NULL
+ VFSNAME_MOUNT, { .vfs_mount = sdev_mount },
+ VFSNAME_UNMOUNT, { .vfs_unmount = sdev_unmount },
+ VFSNAME_ROOT, { .vfs_root = sdev_root },
+ VFSNAME_STATVFS, { .vfs_statvfs = sdev_statvfs },
+ NULL, NULL
};
int error;
diff --git a/usr/src/uts/common/fs/dev/sdev_vnops.c b/usr/src/uts/common/fs/dev/sdev_vnops.c
index 4cad8b53e8..9591d100cf 100644
--- a/usr/src/uts/common/fs/dev/sdev_vnops.c
+++ b/usr/src/uts/common/fs/dev/sdev_vnops.c
@@ -44,6 +44,7 @@
#include <sys/time.h>
#include <sys/vfs.h>
#include <sys/vnode.h>
+#include <sys/vfs_opreg.h>
#include <sys/file.h>
#include <sys/fcntl.h>
#include <sys/flock.h>
@@ -1347,34 +1348,34 @@ sdev_pathconf(vnode_t *vp, int cmd, ulong_t *valp, cred_t *cr)
vnodeops_t *sdev_vnodeops;
const fs_operation_def_t sdev_vnodeops_tbl[] = {
- VOPNAME_OPEN, sdev_open,
- VOPNAME_CLOSE, sdev_close,
- VOPNAME_READ, sdev_read,
- VOPNAME_WRITE, sdev_write,
- VOPNAME_IOCTL, sdev_ioctl,
- VOPNAME_GETATTR, sdev_getattr,
- VOPNAME_SETATTR, sdev_setattr,
- VOPNAME_ACCESS, sdev_access,
- VOPNAME_LOOKUP, sdev_lookup,
- VOPNAME_CREATE, sdev_create,
- VOPNAME_RENAME, sdev_rename,
- VOPNAME_REMOVE, sdev_remove,
- VOPNAME_MKDIR, sdev_mkdir,
- VOPNAME_RMDIR, sdev_rmdir,
- VOPNAME_READDIR, sdev_readdir,
- VOPNAME_SYMLINK, sdev_symlink,
- VOPNAME_READLINK, sdev_readlink, /* readlink */
- VOPNAME_INACTIVE, (fs_generic_func_p)sdev_inactive,
- VOPNAME_FID, sdev_fid,
- VOPNAME_RWLOCK, (fs_generic_func_p)sdev_rwlock,
- VOPNAME_RWUNLOCK, (fs_generic_func_p)sdev_rwunlock,
- VOPNAME_SEEK, sdev_seek,
- VOPNAME_FRLOCK, sdev_frlock,
- VOPNAME_PATHCONF, sdev_pathconf,
- VOPNAME_SETFL, sdev_setfl,
- VOPNAME_SETSECATTR, sdev_setsecattr, /* setsecattr */
- VOPNAME_GETSECATTR, sdev_getsecattr, /* getsecattr */
- NULL, NULL
+ VOPNAME_OPEN, { .vop_open = sdev_open },
+ VOPNAME_CLOSE, { .vop_close = sdev_close },
+ VOPNAME_READ, { .vop_read = sdev_read },
+ VOPNAME_WRITE, { .vop_write = sdev_write },
+ VOPNAME_IOCTL, { .vop_ioctl = sdev_ioctl },
+ VOPNAME_GETATTR, { .vop_getattr = sdev_getattr },
+ VOPNAME_SETATTR, { .vop_setattr = sdev_setattr },
+ VOPNAME_ACCESS, { .vop_access = sdev_access },
+ VOPNAME_LOOKUP, { .vop_lookup = sdev_lookup },
+ VOPNAME_CREATE, { .vop_create = sdev_create },
+ VOPNAME_RENAME, { .vop_rename = sdev_rename },
+ VOPNAME_REMOVE, { .vop_remove = sdev_remove },
+ VOPNAME_MKDIR, { .vop_mkdir = sdev_mkdir },
+ VOPNAME_RMDIR, { .vop_rmdir = sdev_rmdir },
+ VOPNAME_READDIR, { .vop_readdir = sdev_readdir },
+ VOPNAME_SYMLINK, { .vop_symlink = sdev_symlink },
+ VOPNAME_READLINK, { .vop_readlink = sdev_readlink },
+ VOPNAME_INACTIVE, { .vop_inactive = sdev_inactive },
+ VOPNAME_FID, { .vop_fid = sdev_fid },
+ VOPNAME_RWLOCK, { .vop_rwlock = sdev_rwlock },
+ VOPNAME_RWUNLOCK, { .vop_rwunlock = sdev_rwunlock },
+ VOPNAME_SEEK, { .vop_seek = sdev_seek },
+ VOPNAME_FRLOCK, { .vop_frlock = sdev_frlock },
+ VOPNAME_PATHCONF, { .vop_pathconf = sdev_pathconf },
+ VOPNAME_SETFL, { .vop_setfl = sdev_setfl },
+ VOPNAME_SETSECATTR, { .vop_setsecattr = sdev_setsecattr },
+ VOPNAME_GETSECATTR, { .vop_getsecattr = sdev_getsecattr },
+ NULL, NULL
};
int sdev_vnodeops_tbl_size = sizeof (sdev_vnodeops_tbl);
diff --git a/usr/src/uts/common/fs/devfs/devfs_vfsops.c b/usr/src/uts/common/fs/devfs/devfs_vfsops.c
index a0a69bb77d..2e83ba30cd 100644
--- a/usr/src/uts/common/fs/devfs/devfs_vfsops.c
+++ b/usr/src/uts/common/fs/devfs/devfs_vfsops.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -42,6 +42,7 @@
#include <sys/time.h>
#include <sys/pathname.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/vnode.h>
#include <sys/stat.h>
#include <sys/uio.h>
@@ -129,13 +130,13 @@ static int
devfsinit(int fstype, char *name)
{
static const fs_operation_def_t devfs_vfsops_template[] = {
- VFSNAME_MOUNT, devfs_mount,
- VFSNAME_UNMOUNT, devfs_unmount,
- VFSNAME_ROOT, devfs_root,
- VFSNAME_STATVFS, devfs_statvfs,
- VFSNAME_SYNC, (fs_generic_func_p) fs_sync,
- VFSNAME_MOUNTROOT, devfs_mountroot,
- NULL, NULL
+ VFSNAME_MOUNT, { .vfs_mount = devfs_mount },
+ VFSNAME_UNMOUNT, { .vfs_unmount = devfs_unmount },
+ VFSNAME_ROOT, { .vfs_root = devfs_root },
+ VFSNAME_STATVFS, { .vfs_statvfs = devfs_statvfs },
+ VFSNAME_SYNC, { .vfs_sync = fs_sync },
+ VFSNAME_MOUNTROOT, { .vfs_mountroot = devfs_mountroot },
+ NULL, NULL
};
int error;
int dev;
diff --git a/usr/src/uts/common/fs/devfs/devfs_vnops.c b/usr/src/uts/common/fs/devfs/devfs_vnops.c
index 3d2d696b38..c55295b0f6 100644
--- a/usr/src/uts/common/fs/devfs/devfs_vnops.c
+++ b/usr/src/uts/common/fs/devfs/devfs_vnops.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -44,6 +44,7 @@
#include <sys/time.h>
#include <sys/vfs.h>
#include <sys/vnode.h>
+#include <sys/vfs_opreg.h>
#include <sys/file.h>
#include <sys/fcntl.h>
#include <sys/flock.h>
@@ -1104,26 +1105,26 @@ devfs_seek(struct vnode *vp, offset_t ooff, offset_t *noffp)
vnodeops_t *dv_vnodeops;
const fs_operation_def_t dv_vnodeops_template[] = {
- VOPNAME_OPEN, devfs_open,
- VOPNAME_CLOSE, devfs_close,
- VOPNAME_READ, devfs_read,
- VOPNAME_WRITE, devfs_write,
- VOPNAME_IOCTL, devfs_ioctl,
- VOPNAME_GETATTR, devfs_getattr,
- VOPNAME_SETATTR, devfs_setattr,
- VOPNAME_ACCESS, devfs_access,
- VOPNAME_LOOKUP, devfs_lookup,
- VOPNAME_CREATE, devfs_create,
- VOPNAME_READDIR, devfs_readdir,
- VOPNAME_FSYNC, devfs_fsync,
- VOPNAME_INACTIVE, (fs_generic_func_p) devfs_inactive,
- VOPNAME_FID, devfs_fid,
- VOPNAME_RWLOCK, devfs_rwlock,
- VOPNAME_RWUNLOCK, (fs_generic_func_p) devfs_rwunlock,
- VOPNAME_SEEK, devfs_seek,
- VOPNAME_PATHCONF, devfs_pathconf,
- VOPNAME_DISPOSE, fs_error,
- VOPNAME_SETSECATTR, devfs_setsecattr,
- VOPNAME_GETSECATTR, devfs_getsecattr,
- NULL, NULL
+ VOPNAME_OPEN, { .vop_open = devfs_open },
+ VOPNAME_CLOSE, { .vop_close = devfs_close },
+ VOPNAME_READ, { .vop_read = devfs_read },
+ VOPNAME_WRITE, { .vop_write = devfs_write },
+ VOPNAME_IOCTL, { .vop_ioctl = devfs_ioctl },
+ VOPNAME_GETATTR, { .vop_getattr = devfs_getattr },
+ VOPNAME_SETATTR, { .vop_setattr = devfs_setattr },
+ VOPNAME_ACCESS, { .vop_access = devfs_access },
+ VOPNAME_LOOKUP, { .vop_lookup = devfs_lookup },
+ VOPNAME_CREATE, { .vop_create = devfs_create },
+ VOPNAME_READDIR, { .vop_readdir = devfs_readdir },
+ VOPNAME_FSYNC, { .vop_fsync = devfs_fsync },
+ VOPNAME_INACTIVE, { .vop_inactive = devfs_inactive },
+ VOPNAME_FID, { .vop_fid = devfs_fid },
+ VOPNAME_RWLOCK, { .vop_rwlock = devfs_rwlock },
+ VOPNAME_RWUNLOCK, { .vop_rwunlock = devfs_rwunlock },
+ VOPNAME_SEEK, { .vop_seek = devfs_seek },
+ VOPNAME_PATHCONF, { .vop_pathconf = devfs_pathconf },
+ VOPNAME_DISPOSE, { .error = fs_error },
+ VOPNAME_SETSECATTR, { .vop_setsecattr = devfs_setsecattr },
+ VOPNAME_GETSECATTR, { .vop_getsecattr = devfs_getsecattr },
+ NULL, NULL
};
diff --git a/usr/src/uts/common/fs/doorfs/door_sys.c b/usr/src/uts/common/fs/doorfs/door_sys.c
index 46a251b538..c139032e70 100644
--- a/usr/src/uts/common/fs/doorfs/door_sys.c
+++ b/usr/src/uts/common/fs/doorfs/door_sys.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -21,7 +20,7 @@
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -48,6 +47,7 @@
#include <sys/fcntl.h>
#include <sys/vnode.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/sobject.h>
#include <sys/schedctl.h>
#include <sys/callb.h>
diff --git a/usr/src/uts/common/fs/doorfs/door_vnops.c b/usr/src/uts/common/fs/doorfs/door_vnops.c
index 3e7b420533..6d61c34f30 100644
--- a/usr/src/uts/common/fs/doorfs/door_vnops.c
+++ b/usr/src/uts/common/fs/doorfs/door_vnops.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -27,6 +27,7 @@
#include <sys/types.h>
#include <sys/vnode.h>
+#include <sys/vfs_opreg.h>
#include <sys/door.h>
#include <sys/proc.h>
#include <sys/kmem.h>
@@ -52,19 +53,19 @@ struct vfs door_vfs;
struct vnodeops *door_vnodeops;
const fs_operation_def_t door_vnodeops_template[] = {
- VOPNAME_OPEN, door_open,
- VOPNAME_CLOSE, door_close,
- VOPNAME_GETATTR, door_getattr,
- VOPNAME_ACCESS, door_access,
- VOPNAME_INACTIVE, (fs_generic_func_p) door_inactive,
- VOPNAME_FRLOCK, fs_error,
- VOPNAME_REALVP, door_realvp,
- VOPNAME_POLL, fs_error,
- VOPNAME_PATHCONF, fs_error,
- VOPNAME_DISPOSE, fs_error,
- VOPNAME_GETSECATTR, fs_error,
- VOPNAME_SHRLOCK, fs_error,
- NULL, NULL
+ VOPNAME_OPEN, { .vop_open = door_open },
+ VOPNAME_CLOSE, { .vop_close = door_close },
+ VOPNAME_GETATTR, { .vop_getattr = door_getattr },
+ VOPNAME_ACCESS, { .vop_access = door_access },
+ VOPNAME_INACTIVE, { .vop_inactive = door_inactive },
+ VOPNAME_FRLOCK, { .error = fs_error },
+ VOPNAME_REALVP, { .vop_realvp = door_realvp },
+ VOPNAME_POLL, { .error = fs_error },
+ VOPNAME_PATHCONF, { .error = fs_error },
+ VOPNAME_DISPOSE, { .error = fs_error },
+ VOPNAME_GETSECATTR, { .error = fs_error },
+ VOPNAME_SHRLOCK, { .error = fs_error },
+ NULL, NULL
};
/* ARGSUSED */
diff --git a/usr/src/uts/common/fs/fd/fdops.c b/usr/src/uts/common/fs/fd/fdops.c
index 5d6f2f0a71..3033d0ae06 100644
--- a/usr/src/uts/common/fs/fd/fdops.c
+++ b/usr/src/uts/common/fs/fd/fdops.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -47,6 +46,7 @@
#include <sys/systm.h>
#include <sys/uio.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/vnode.h>
#include <sys/cred.h>
#include <sys/mntent.h>
@@ -316,19 +316,19 @@ fdinactive(vnode_t *vp, cred_t *cr)
static struct vnodeops *fd_vnodeops;
static const fs_operation_def_t fd_vnodeops_template[] = {
- VOPNAME_OPEN, fdopen,
- VOPNAME_CLOSE, fdclose,
- VOPNAME_READ, fdread,
- VOPNAME_GETATTR, fdgetattr,
- VOPNAME_ACCESS, fdaccess,
- VOPNAME_LOOKUP, fdlookup,
- VOPNAME_CREATE, fdcreate,
- VOPNAME_READDIR, fdreaddir,
- VOPNAME_INACTIVE, (fs_generic_func_p) fdinactive,
- VOPNAME_FRLOCK, fs_error,
- VOPNAME_POLL, fs_error,
- VOPNAME_DISPOSE, fs_error, /* XXX - used to be default action instead */
- NULL, NULL
+ VOPNAME_OPEN, { .vop_open = fdopen },
+ VOPNAME_CLOSE, { .vop_close = fdclose },
+ VOPNAME_READ, { .vop_read = fdread },
+ VOPNAME_GETATTR, { .vop_getattr = fdgetattr },
+ VOPNAME_ACCESS, { .vop_access = fdaccess },
+ VOPNAME_LOOKUP, { .vop_lookup = fdlookup },
+ VOPNAME_CREATE, { .vop_create = fdcreate },
+ VOPNAME_READDIR, { .vop_readdir = fdreaddir },
+ VOPNAME_INACTIVE, { .vop_inactive = fdinactive },
+ VOPNAME_FRLOCK, { .error = fs_error },
+ VOPNAME_POLL, { .error = fs_error },
+ VOPNAME_DISPOSE, { .error = fs_error },
+ NULL, NULL
};
static int
@@ -477,11 +477,11 @@ int
fdinit(int fstype, char *name)
{
static const fs_operation_def_t fd_vfsops_template[] = {
- VFSNAME_MOUNT, fdmount,
- VFSNAME_UNMOUNT, fdunmount,
- VFSNAME_ROOT, fdroot,
- VFSNAME_STATVFS, fdstatvfs,
- NULL, NULL
+ VFSNAME_MOUNT, { .vfs_mount = fdmount },
+ VFSNAME_UNMOUNT, { .vfs_unmount = fdunmount },
+ VFSNAME_ROOT, { .vfs_root = fdroot },
+ VFSNAME_STATVFS, { .vfs_statvfs = fdstatvfs },
+ NULL, NULL
};
int error;
diff --git a/usr/src/uts/common/fs/fem.c b/usr/src/uts/common/fs/fem.c
index 25de365723..93cae4d737 100644
--- a/usr/src/uts/common/fs/fem.c
+++ b/usr/src/uts/common/fs/fem.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
@@ -38,7 +38,7 @@
#include <sys/fem.h>
#include <sys/vfs.h>
#include <sys/vnode.h>
-
+#include <sys/vfs_opreg.h>
#define NNODES_DEFAULT 8 /* Default number of nodes in a fem_list */
/*
@@ -77,7 +77,7 @@ int fsem_err();
#define _FEMOPDEF(name, member) \
- { VOPNAME_##name, offsetof(fem_t, vsop_##member), NULL, fem_err }
+ { VOPNAME_##name, offsetof(fem_t, femop_##member), NULL, fem_err }
static fs_operation_trans_def_t fem_opdef[] = {
_FEMOPDEF(OPEN, open),
@@ -181,7 +181,7 @@ static struct fs_operation_def fem_guard_ops[] = {
#define _FSEMOPDEF(name, member) \
- { VFSNAME_##name, offsetof(fsem_t, vfsop_##member), NULL, fsem_err }
+ { VFSNAME_##name, offsetof(fsem_t, fsemop_##member), NULL, fsem_err }
static fs_operation_trans_def_t fsem_opdef[] = {
_FSEMOPDEF(MOUNT, mount),
@@ -446,7 +446,7 @@ vhead_open(vnode_t **vpp, int mode, cred_t *cr)
fem_unlock((*vpp)->v_femhead);
farg.fa_vnode.vpp = vpp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
- vsop_find(&farg, &func, int, &arg0, vop_open, vsop_open);
+ vsop_find(&farg, &func, int, &arg0, vop_open, femop_open);
errc = (*func)(arg0, mode, cr);
fem_release(femsp);
}
@@ -472,7 +472,7 @@ vhead_close(vnode_t *vp, int flag, int count, offset_t offset, cred_t *cr)
fem_unlock(vp->v_femhead);
farg.fa_vnode.vp = vp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
- vsop_find(&farg, &func, int, &arg0, vop_close, vsop_close);
+ vsop_find(&farg, &func, int, &arg0, vop_close, femop_close);
errc = (*func)(arg0, flag, count, offset, cr);
fem_release(femsp);
}
@@ -499,7 +499,7 @@ vhead_read(vnode_t *vp, uio_t *uiop, int ioflag, cred_t *cr,
fem_unlock(vp->v_femhead);
farg.fa_vnode.vp = vp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
- vsop_find(&farg, &func, int, &arg0, vop_read, vsop_read);
+ vsop_find(&farg, &func, int, &arg0, vop_read, femop_read);
errc = (*func)(arg0, uiop, ioflag, cr, ct);
fem_release(femsp);
}
@@ -526,7 +526,7 @@ vhead_write(vnode_t *vp, uio_t *uiop, int ioflag, cred_t *cr,
fem_unlock(vp->v_femhead);
farg.fa_vnode.vp = vp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
- vsop_find(&farg, &func, int, &arg0, vop_write, vsop_write);
+ vsop_find(&farg, &func, int, &arg0, vop_write, femop_write);
errc = (*func)(arg0, uiop, ioflag, cr, ct);
fem_release(femsp);
}
@@ -553,7 +553,7 @@ vhead_ioctl(vnode_t *vp, int cmd, intptr_t arg, int flag, cred_t *cr,
fem_unlock(vp->v_femhead);
farg.fa_vnode.vp = vp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
- vsop_find(&farg, &func, int, &arg0, vop_ioctl, vsop_ioctl);
+ vsop_find(&farg, &func, int, &arg0, vop_ioctl, femop_ioctl);
errc = (*func)(arg0, cmd, arg, flag, cr, rvalp);
fem_release(femsp);
}
@@ -579,7 +579,7 @@ vhead_setfl(vnode_t *vp, int oflags, int nflags, cred_t *cr)
fem_unlock(vp->v_femhead);
farg.fa_vnode.vp = vp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
- vsop_find(&farg, &func, int, &arg0, vop_setfl, vsop_setfl);
+ vsop_find(&farg, &func, int, &arg0, vop_setfl, femop_setfl);
errc = (*func)(arg0, oflags, nflags, cr);
fem_release(femsp);
}
@@ -606,7 +606,7 @@ vhead_getattr(vnode_t *vp, vattr_t *vap, int flags, cred_t *cr)
farg.fa_vnode.vp = vp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
vsop_find(&farg, &func, int, &arg0, vop_getattr,
- vsop_getattr);
+ femop_getattr);
errc = (*func)(arg0, vap, flags, cr);
fem_release(femsp);
}
@@ -634,7 +634,7 @@ vhead_setattr(vnode_t *vp, vattr_t *vap, int flags, cred_t *cr,
farg.fa_vnode.vp = vp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
vsop_find(&farg, &func, int, &arg0, vop_setattr,
- vsop_setattr);
+ femop_setattr);
errc = (*func)(arg0, vap, flags, cr, ct);
fem_release(femsp);
}
@@ -661,7 +661,7 @@ vhead_access(vnode_t *vp, int mode, int flags, cred_t *cr)
farg.fa_vnode.vp = vp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
vsop_find(&farg, &func, int, &arg0, vop_access,
- vsop_access);
+ femop_access);
errc = (*func)(arg0, mode, flags, cr);
fem_release(femsp);
}
@@ -689,7 +689,7 @@ vhead_lookup(vnode_t *dvp, char *nm, vnode_t **vpp, pathname_t *pnp,
farg.fa_vnode.vp = dvp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
vsop_find(&farg, &func, int, &arg0, vop_lookup,
- vsop_lookup);
+ femop_lookup);
errc = (*func)(arg0, nm, vpp, pnp, flags, rdir, cr);
fem_release(femsp);
}
@@ -717,7 +717,7 @@ vhead_create(vnode_t *dvp, char *name, vattr_t *vap, vcexcl_t excl,
farg.fa_vnode.vp = dvp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
vsop_find(&farg, &func, int, &arg0, vop_create,
- vsop_create);
+ femop_create);
errc = (*func)(arg0, name, vap, excl, mode, vpp, cr, flag);
fem_release(femsp);
}
@@ -744,7 +744,7 @@ vhead_remove(vnode_t *dvp, char *nm, cred_t *cr)
farg.fa_vnode.vp = dvp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
vsop_find(&farg, &func, int, &arg0, vop_remove,
- vsop_remove);
+ femop_remove);
errc = (*func)(arg0, nm, cr);
fem_release(femsp);
}
@@ -770,7 +770,7 @@ vhead_link(vnode_t *tdvp, vnode_t *svp, char *tnm, cred_t *cr)
fem_unlock(tdvp->v_femhead);
farg.fa_vnode.vp = tdvp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
- vsop_find(&farg, &func, int, &arg0, vop_link, vsop_link);
+ vsop_find(&farg, &func, int, &arg0, vop_link, femop_link);
errc = (*func)(arg0, svp, tnm, cr);
fem_release(femsp);
}
@@ -798,7 +798,7 @@ vhead_rename(vnode_t *sdvp, char *snm, vnode_t *tdvp, char *tnm,
farg.fa_vnode.vp = sdvp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
vsop_find(&farg, &func, int, &arg0, vop_rename,
- vsop_rename);
+ femop_rename);
errc = (*func)(arg0, snm, tdvp, tnm, cr);
fem_release(femsp);
}
@@ -825,7 +825,7 @@ vhead_mkdir(vnode_t *dvp, char *dirname, vattr_t *vap, vnode_t **vpp,
fem_unlock(dvp->v_femhead);
farg.fa_vnode.vp = dvp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
- vsop_find(&farg, &func, int, &arg0, vop_mkdir, vsop_mkdir);
+ vsop_find(&farg, &func, int, &arg0, vop_mkdir, femop_mkdir);
errc = (*func)(arg0, dirname, vap, vpp, cr);
fem_release(femsp);
}
@@ -851,7 +851,7 @@ vhead_rmdir(vnode_t *dvp, char *nm, vnode_t *cdir, cred_t *cr)
fem_unlock(dvp->v_femhead);
farg.fa_vnode.vp = dvp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
- vsop_find(&farg, &func, int, &arg0, vop_rmdir, vsop_rmdir);
+ vsop_find(&farg, &func, int, &arg0, vop_rmdir, femop_rmdir);
errc = (*func)(arg0, nm, cdir, cr);
fem_release(femsp);
}
@@ -878,7 +878,7 @@ vhead_readdir(vnode_t *vp, uio_t *uiop, cred_t *cr, int *eofp)
farg.fa_vnode.vp = vp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
vsop_find(&farg, &func, int, &arg0, vop_readdir,
- vsop_readdir);
+ femop_readdir);
errc = (*func)(arg0, uiop, cr, eofp);
fem_release(femsp);
}
@@ -906,7 +906,7 @@ vhead_symlink(vnode_t *dvp, char *linkname, vattr_t *vap, char *target,
farg.fa_vnode.vp = dvp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
vsop_find(&farg, &func, int, &arg0, vop_symlink,
- vsop_symlink);
+ femop_symlink);
errc = (*func)(arg0, linkname, vap, target, cr);
fem_release(femsp);
}
@@ -933,7 +933,7 @@ vhead_readlink(vnode_t *vp, uio_t *uiop, cred_t *cr)
farg.fa_vnode.vp = vp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
vsop_find(&farg, &func, int, &arg0, vop_readlink,
- vsop_readlink);
+ femop_readlink);
errc = (*func)(arg0, uiop, cr);
fem_release(femsp);
}
@@ -959,7 +959,7 @@ vhead_fsync(vnode_t *vp, int syncflag, cred_t *cr)
fem_unlock(vp->v_femhead);
farg.fa_vnode.vp = vp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
- vsop_find(&farg, &func, int, &arg0, vop_fsync, vsop_fsync);
+ vsop_find(&farg, &func, int, &arg0, vop_fsync, femop_fsync);
errc = (*func)(arg0, syncflag, cr);
fem_release(femsp);
}
@@ -985,7 +985,7 @@ vhead_inactive(vnode_t *vp, cred_t *cr)
farg.fa_vnode.vp = vp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
vsop_find(&farg, &func, void, &arg0, vop_inactive,
- vsop_inactive);
+ femop_inactive);
(*func)(arg0, cr);
fem_release(femsp);
}
@@ -1010,7 +1010,7 @@ vhead_fid(vnode_t *vp, fid_t *fidp)
fem_unlock(vp->v_femhead);
farg.fa_vnode.vp = vp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
- vsop_find(&farg, &func, int, &arg0, vop_fid, vsop_fid);
+ vsop_find(&farg, &func, int, &arg0, vop_fid, femop_fid);
errc = (*func)(arg0, fidp);
fem_release(femsp);
}
@@ -1037,7 +1037,7 @@ vhead_rwlock(vnode_t *vp, int write_lock, caller_context_t *ct)
farg.fa_vnode.vp = vp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
vsop_find(&farg, &func, int, &arg0, vop_rwlock,
- vsop_rwlock);
+ femop_rwlock);
errc = (*func)(arg0, write_lock, ct);
fem_release(femsp);
}
@@ -1063,7 +1063,7 @@ vhead_rwunlock(vnode_t *vp, int write_lock, caller_context_t *ct)
farg.fa_vnode.vp = vp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
vsop_find(&farg, &func, void, &arg0, vop_rwunlock,
- vsop_rwunlock);
+ femop_rwunlock);
(*func)(arg0, write_lock, ct);
fem_release(femsp);
}
@@ -1088,7 +1088,7 @@ vhead_seek(vnode_t *vp, offset_t ooff, offset_t *noffp)
fem_unlock(vp->v_femhead);
farg.fa_vnode.vp = vp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
- vsop_find(&farg, &func, int, &arg0, vop_seek, vsop_seek);
+ vsop_find(&farg, &func, int, &arg0, vop_seek, femop_seek);
errc = (*func)(arg0, ooff, noffp);
fem_release(femsp);
}
@@ -1114,7 +1114,7 @@ vhead_cmp(vnode_t *vp1, vnode_t *vp2)
fem_unlock(vp1->v_femhead);
farg.fa_vnode.vp = vp1;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
- vsop_find(&farg, &func, int, &arg0, vop_cmp, vsop_cmp);
+ vsop_find(&farg, &func, int, &arg0, vop_cmp, femop_cmp);
errc = (*func)(arg0, vp2);
fem_release(femsp);
}
@@ -1142,7 +1142,7 @@ vhead_frlock(vnode_t *vp, int cmd, struct flock64 *bfp, int flag,
farg.fa_vnode.vp = vp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
vsop_find(&farg, &func, int, &arg0, vop_frlock,
- vsop_frlock);
+ femop_frlock);
errc = (*func)(arg0, cmd, bfp, flag, offset, flk_cbp, cr);
fem_release(femsp);
}
@@ -1169,7 +1169,7 @@ vhead_space(vnode_t *vp, int cmd, struct flock64 *bfp, int flag,
fem_unlock(vp->v_femhead);
farg.fa_vnode.vp = vp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
- vsop_find(&farg, &func, int, &arg0, vop_space, vsop_space);
+ vsop_find(&farg, &func, int, &arg0, vop_space, femop_space);
errc = (*func)(arg0, cmd, bfp, flag, offset, cr, ct);
fem_release(femsp);
}
@@ -1196,7 +1196,7 @@ vhead_realvp(vnode_t *vp, vnode_t **vpp)
farg.fa_vnode.vp = vp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
vsop_find(&farg, &func, int, &arg0, vop_realvp,
- vsop_realvp);
+ femop_realvp);
errc = (*func)(arg0, vpp);
fem_release(femsp);
}
@@ -1226,7 +1226,7 @@ vhead_getpage(vnode_t *vp, offset_t off, size_t len, uint_t *protp,
farg.fa_vnode.vp = vp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
vsop_find(&farg, &func, int, &arg0, vop_getpage,
- vsop_getpage);
+ femop_getpage);
errc = (*func)(arg0, off, len, protp, plarr, plsz, seg,
addr, rw, cr);
fem_release(femsp);
@@ -1254,7 +1254,7 @@ vhead_putpage(vnode_t *vp, offset_t off, size_t len, int flags, cred_t *cr)
farg.fa_vnode.vp = vp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
vsop_find(&farg, &func, int, &arg0, vop_putpage,
- vsop_putpage);
+ femop_putpage);
errc = (*func)(arg0, off, len, flags, cr);
fem_release(femsp);
}
@@ -1283,7 +1283,7 @@ vhead_map(vnode_t *vp, offset_t off, struct as *as, caddr_t *addrp,
fem_unlock(vp->v_femhead);
farg.fa_vnode.vp = vp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
- vsop_find(&farg, &func, int, &arg0, vop_map, vsop_map);
+ vsop_find(&farg, &func, int, &arg0, vop_map, femop_map);
errc = (*func)(arg0, off, as, addrp, len, prot, maxprot,
flags, cr);
fem_release(femsp);
@@ -1314,7 +1314,7 @@ vhead_addmap(vnode_t *vp, offset_t off, struct as *as, caddr_t addr,
farg.fa_vnode.vp = vp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
vsop_find(&farg, &func, int, &arg0, vop_addmap,
- vsop_addmap);
+ femop_addmap);
errc = (*func)(arg0, off, as, addr, len, prot, maxprot,
flags, cr);
fem_release(femsp);
@@ -1344,7 +1344,7 @@ vhead_delmap(vnode_t *vp, offset_t off, struct as *as, caddr_t addr,
farg.fa_vnode.vp = vp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
vsop_find(&farg, &func, int, &arg0, vop_delmap,
- vsop_delmap);
+ femop_delmap);
errc = (*func)(arg0, off, as, addr, len, prot, maxprot,
flags, cr);
fem_release(femsp);
@@ -1372,7 +1372,7 @@ vhead_poll(vnode_t *vp, short events, int anyyet, short *reventsp,
fem_unlock(vp->v_femhead);
farg.fa_vnode.vp = vp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
- vsop_find(&farg, &func, int, &arg0, vop_poll, vsop_poll);
+ vsop_find(&farg, &func, int, &arg0, vop_poll, femop_poll);
errc = (*func)(arg0, events, anyyet, reventsp, phpp);
fem_release(femsp);
}
@@ -1398,7 +1398,7 @@ vhead_dump(vnode_t *vp, caddr_t addr, int lbdn, int dblks)
fem_unlock(vp->v_femhead);
farg.fa_vnode.vp = vp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
- vsop_find(&farg, &func, int, &arg0, vop_dump, vsop_dump);
+ vsop_find(&farg, &func, int, &arg0, vop_dump, femop_dump);
errc = (*func)(arg0, addr, lbdn, dblks);
fem_release(femsp);
}
@@ -1425,7 +1425,7 @@ vhead_pathconf(vnode_t *vp, int cmd, ulong_t *valp, cred_t *cr)
farg.fa_vnode.vp = vp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
vsop_find(&farg, &func, int, &arg0, vop_pathconf,
- vsop_pathconf);
+ femop_pathconf);
errc = (*func)(arg0, cmd, valp, cr);
fem_release(femsp);
}
@@ -1453,7 +1453,7 @@ vhead_pageio(vnode_t *vp, struct page *pp, u_offset_t io_off,
farg.fa_vnode.vp = vp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
vsop_find(&farg, &func, int, &arg0, vop_pageio,
- vsop_pageio);
+ femop_pageio);
errc = (*func)(arg0, pp, io_off, io_len, flags, cr);
fem_release(femsp);
}
@@ -1480,7 +1480,7 @@ vhead_dumpctl(vnode_t *vp, int action, int *blkp)
farg.fa_vnode.vp = vp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
vsop_find(&farg, &func, int, &arg0, vop_dumpctl,
- vsop_dumpctl);
+ femop_dumpctl);
errc = (*func)(arg0, action, blkp);
fem_release(femsp);
}
@@ -1506,7 +1506,7 @@ vhead_dispose(vnode_t *vp, struct page *pp, int flag, int dn, cred_t *cr)
farg.fa_vnode.vp = vp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
vsop_find(&farg, &func, void, &arg0, vop_dispose,
- vsop_dispose);
+ femop_dispose);
(*func)(arg0, pp, flag, dn, cr);
fem_release(femsp);
}
@@ -1532,7 +1532,7 @@ vhead_setsecattr(vnode_t *vp, vsecattr_t *vsap, int flag, cred_t *cr)
farg.fa_vnode.vp = vp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
vsop_find(&farg, &func, int, &arg0, vop_setsecattr,
- vsop_setsecattr);
+ femop_setsecattr);
errc = (*func)(arg0, vsap, flag, cr);
fem_release(femsp);
}
@@ -1559,7 +1559,7 @@ vhead_getsecattr(vnode_t *vp, vsecattr_t *vsap, int flag, cred_t *cr)
farg.fa_vnode.vp = vp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
vsop_find(&farg, &func, int, &arg0, vop_getsecattr,
- vsop_getsecattr);
+ femop_getsecattr);
errc = (*func)(arg0, vsap, flag, cr);
fem_release(femsp);
}
@@ -1587,7 +1587,7 @@ vhead_shrlock(vnode_t *vp, int cmd, struct shrlock *shr, int flag,
farg.fa_vnode.vp = vp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
vsop_find(&farg, &func, int, &arg0, vop_shrlock,
- vsop_shrlock);
+ femop_shrlock);
errc = (*func)(arg0, cmd, shr, flag, cr);
fem_release(femsp);
}
@@ -1614,7 +1614,7 @@ vhead_vnevent(vnode_t *vp, vnevent_t vnevent)
farg.fa_vnode.vp = vp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
vsop_find(&farg, &func, int, &arg0, vop_vnevent,
- vsop_vnevent);
+ femop_vnevent);
errc = (*func)(arg0, vnevent);
fem_release(femsp);
}
@@ -1642,7 +1642,7 @@ fshead_mount(vfs_t *vfsp, vnode_t *mvp, struct mounta *uap, cred_t *cr)
farg.fa_vnode.vfsp = vfsp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
vfsop_find(&farg, &func, int, &arg0, vfs_mount,
- vfsop_mount);
+ fsemop_mount);
errc = (*func)(arg0, mvp, uap, cr);
fem_release(femsp);
}
@@ -1670,7 +1670,7 @@ fshead_unmount(vfs_t *vfsp, int flag, cred_t *cr)
farg.fa_vnode.vfsp = vfsp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
vfsop_find(&farg, &func, int, &arg0, vfs_unmount,
- vfsop_unmount);
+ fsemop_unmount);
errc = (*func)(arg0, flag, cr);
fem_release(femsp);
}
@@ -1697,7 +1697,7 @@ fshead_root(vfs_t *vfsp, vnode_t **vpp)
fem_unlock(vfsp->vfs_femhead);
farg.fa_vnode.vfsp = vfsp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
- vfsop_find(&farg, &func, int, &arg0, vfs_root, vfsop_root);
+ vfsop_find(&farg, &func, int, &arg0, vfs_root, fsemop_root);
errc = (*func)(arg0, vpp);
fem_release(femsp);
}
@@ -1725,7 +1725,7 @@ fshead_statvfs(vfs_t *vfsp, statvfs64_t *sp)
farg.fa_vnode.vfsp = vfsp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
vfsop_find(&farg, &func, int, &arg0, vfs_statvfs,
- vfsop_statvfs);
+ fsemop_statvfs);
errc = (*func)(arg0, sp);
fem_release(femsp);
}
@@ -1752,7 +1752,7 @@ fshead_sync(vfs_t *vfsp, short flag, cred_t *cr)
fem_unlock(vfsp->vfs_femhead);
farg.fa_vnode.vfsp = vfsp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
- vfsop_find(&farg, &func, int, &arg0, vfs_sync, vfsop_sync);
+ vfsop_find(&farg, &func, int, &arg0, vfs_sync, fsemop_sync);
errc = (*func)(arg0, flag, cr);
fem_release(femsp);
}
@@ -1779,7 +1779,7 @@ fshead_vget(vfs_t *vfsp, vnode_t **vpp, fid_t *fidp)
fem_unlock(vfsp->vfs_femhead);
farg.fa_vnode.vfsp = vfsp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
- vfsop_find(&farg, &func, int, &arg0, vfs_vget, vfsop_vget);
+ vfsop_find(&farg, &func, int, &arg0, vfs_vget, fsemop_vget);
errc = (*func)(arg0, vpp, fidp);
fem_release(femsp);
}
@@ -1807,7 +1807,7 @@ fshead_mountroot(vfs_t *vfsp, enum whymountroot reason)
farg.fa_vnode.vfsp = vfsp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
vfsop_find(&farg, &func, int, &arg0, vfs_mountroot,
- vfsop_mountroot);
+ fsemop_mountroot);
errc = (*func)(arg0, reason);
fem_release(femsp);
}
@@ -1834,7 +1834,7 @@ fshead_freevfs(vfs_t *vfsp)
farg.fa_vnode.vfsp = vfsp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
vfsop_find(&farg, &func, void, &arg0, vfs_freevfs,
- vfsop_freevfs);
+ fsemop_freevfs);
(*func)(arg0);
fem_release(femsp);
}
@@ -1861,7 +1861,7 @@ fshead_vnstate(vfs_t *vfsp, vnode_t *vp, vntrans_t nstate)
farg.fa_vnode.vfsp = vfsp;
farg.fa_fnode = femsp->feml_nodes + femsp->feml_tos;
vfsop_find(&farg, &func, int, &arg0, vfs_vnstate,
- vfsop_vnstate);
+ fsemop_vnstate);
errc = (*func)(arg0, vp, nstate);
fem_release(femsp);
}
@@ -1965,7 +1965,7 @@ vnext_open(femarg_t *vf, int mode, cred_t *cr)
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, int, &arg0, vop_open, vsop_open);
+ vsop_find(vf, &func, int, &arg0, vop_open, femop_open);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, mode, cr));
@@ -1979,7 +1979,7 @@ vnext_close(femarg_t *vf, int flag, int count, offset_t offset, cred_t *cr)
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, int, &arg0, vop_close, vsop_close);
+ vsop_find(vf, &func, int, &arg0, vop_close, femop_close);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, flag, count, offset, cr));
@@ -1994,7 +1994,7 @@ vnext_read(femarg_t *vf, uio_t *uiop, int ioflag, cred_t *cr,
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, int, &arg0, vop_read, vsop_read);
+ vsop_find(vf, &func, int, &arg0, vop_read, femop_read);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, uiop, ioflag, cr, ct));
@@ -2009,7 +2009,7 @@ vnext_write(femarg_t *vf, uio_t *uiop, int ioflag, cred_t *cr,
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, int, &arg0, vop_write, vsop_write);
+ vsop_find(vf, &func, int, &arg0, vop_write, femop_write);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, uiop, ioflag, cr, ct));
@@ -2024,7 +2024,7 @@ vnext_ioctl(femarg_t *vf, int cmd, intptr_t arg, int flag, cred_t *cr,
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, int, &arg0, vop_ioctl, vsop_ioctl);
+ vsop_find(vf, &func, int, &arg0, vop_ioctl, femop_ioctl);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, cmd, arg, flag, cr, rvalp));
@@ -2038,7 +2038,7 @@ vnext_setfl(femarg_t *vf, int oflags, int nflags, cred_t *cr)
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, int, &arg0, vop_setfl, vsop_setfl);
+ vsop_find(vf, &func, int, &arg0, vop_setfl, femop_setfl);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, oflags, nflags, cr));
@@ -2052,7 +2052,7 @@ vnext_getattr(femarg_t *vf, vattr_t *vap, int flags, cred_t *cr)
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, int, &arg0, vop_getattr, vsop_getattr);
+ vsop_find(vf, &func, int, &arg0, vop_getattr, femop_getattr);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, vap, flags, cr));
@@ -2067,7 +2067,7 @@ vnext_setattr(femarg_t *vf, vattr_t *vap, int flags, cred_t *cr,
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, int, &arg0, vop_setattr, vsop_setattr);
+ vsop_find(vf, &func, int, &arg0, vop_setattr, femop_setattr);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, vap, flags, cr, ct));
@@ -2081,7 +2081,7 @@ vnext_access(femarg_t *vf, int mode, int flags, cred_t *cr)
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, int, &arg0, vop_access, vsop_access);
+ vsop_find(vf, &func, int, &arg0, vop_access, femop_access);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, mode, flags, cr));
@@ -2096,7 +2096,7 @@ vnext_lookup(femarg_t *vf, char *nm, vnode_t **vpp, pathname_t *pnp,
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, int, &arg0, vop_lookup, vsop_lookup);
+ vsop_find(vf, &func, int, &arg0, vop_lookup, femop_lookup);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, nm, vpp, pnp, flags, rdir, cr));
@@ -2111,7 +2111,7 @@ vnext_create(femarg_t *vf, char *name, vattr_t *vap, vcexcl_t excl,
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, int, &arg0, vop_create, vsop_create);
+ vsop_find(vf, &func, int, &arg0, vop_create, femop_create);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, name, vap, excl, mode, vpp, cr, flag));
@@ -2125,7 +2125,7 @@ vnext_remove(femarg_t *vf, char *nm, cred_t *cr)
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, int, &arg0, vop_remove, vsop_remove);
+ vsop_find(vf, &func, int, &arg0, vop_remove, femop_remove);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, nm, cr));
@@ -2139,7 +2139,7 @@ vnext_link(femarg_t *vf, vnode_t *svp, char *tnm, cred_t *cr)
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, int, &arg0, vop_link, vsop_link);
+ vsop_find(vf, &func, int, &arg0, vop_link, femop_link);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, svp, tnm, cr));
@@ -2153,7 +2153,7 @@ vnext_rename(femarg_t *vf, char *snm, vnode_t *tdvp, char *tnm, cred_t *cr)
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, int, &arg0, vop_rename, vsop_rename);
+ vsop_find(vf, &func, int, &arg0, vop_rename, femop_rename);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, snm, tdvp, tnm, cr));
@@ -2168,7 +2168,7 @@ vnext_mkdir(femarg_t *vf, char *dirname, vattr_t *vap, vnode_t **vpp,
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, int, &arg0, vop_mkdir, vsop_mkdir);
+ vsop_find(vf, &func, int, &arg0, vop_mkdir, femop_mkdir);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, dirname, vap, vpp, cr));
@@ -2182,7 +2182,7 @@ vnext_rmdir(femarg_t *vf, char *nm, vnode_t *cdir, cred_t *cr)
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, int, &arg0, vop_rmdir, vsop_rmdir);
+ vsop_find(vf, &func, int, &arg0, vop_rmdir, femop_rmdir);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, nm, cdir, cr));
@@ -2196,7 +2196,7 @@ vnext_readdir(femarg_t *vf, uio_t *uiop, cred_t *cr, int *eofp)
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, int, &arg0, vop_readdir, vsop_readdir);
+ vsop_find(vf, &func, int, &arg0, vop_readdir, femop_readdir);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, uiop, cr, eofp));
@@ -2211,7 +2211,7 @@ vnext_symlink(femarg_t *vf, char *linkname, vattr_t *vap, char *target,
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, int, &arg0, vop_symlink, vsop_symlink);
+ vsop_find(vf, &func, int, &arg0, vop_symlink, femop_symlink);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, linkname, vap, target, cr));
@@ -2225,7 +2225,7 @@ vnext_readlink(femarg_t *vf, uio_t *uiop, cred_t *cr)
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, int, &arg0, vop_readlink, vsop_readlink);
+ vsop_find(vf, &func, int, &arg0, vop_readlink, femop_readlink);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, uiop, cr));
@@ -2239,7 +2239,7 @@ vnext_fsync(femarg_t *vf, int syncflag, cred_t *cr)
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, int, &arg0, vop_fsync, vsop_fsync);
+ vsop_find(vf, &func, int, &arg0, vop_fsync, femop_fsync);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, syncflag, cr));
@@ -2253,7 +2253,7 @@ vnext_inactive(femarg_t *vf, cred_t *cr)
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, void, &arg0, vop_inactive, vsop_inactive);
+ vsop_find(vf, &func, void, &arg0, vop_inactive, femop_inactive);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
(*func)(arg0, cr);
@@ -2267,7 +2267,7 @@ vnext_fid(femarg_t *vf, fid_t *fidp)
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, int, &arg0, vop_fid, vsop_fid);
+ vsop_find(vf, &func, int, &arg0, vop_fid, femop_fid);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, fidp));
@@ -2281,7 +2281,7 @@ vnext_rwlock(femarg_t *vf, int write_lock, caller_context_t *ct)
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, int, &arg0, vop_rwlock, vsop_rwlock);
+ vsop_find(vf, &func, int, &arg0, vop_rwlock, femop_rwlock);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, write_lock, ct));
@@ -2295,7 +2295,7 @@ vnext_rwunlock(femarg_t *vf, int write_lock, caller_context_t *ct)
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, void, &arg0, vop_rwunlock, vsop_rwunlock);
+ vsop_find(vf, &func, void, &arg0, vop_rwunlock, femop_rwunlock);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
(*func)(arg0, write_lock, ct);
@@ -2309,7 +2309,7 @@ vnext_seek(femarg_t *vf, offset_t ooff, offset_t *noffp)
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, int, &arg0, vop_seek, vsop_seek);
+ vsop_find(vf, &func, int, &arg0, vop_seek, femop_seek);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, ooff, noffp));
@@ -2323,7 +2323,7 @@ vnext_cmp(femarg_t *vf, vnode_t *vp2)
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, int, &arg0, vop_cmp, vsop_cmp);
+ vsop_find(vf, &func, int, &arg0, vop_cmp, femop_cmp);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, vp2));
@@ -2338,7 +2338,7 @@ vnext_frlock(femarg_t *vf, int cmd, struct flock64 *bfp, int flag,
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, int, &arg0, vop_frlock, vsop_frlock);
+ vsop_find(vf, &func, int, &arg0, vop_frlock, femop_frlock);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, cmd, bfp, flag, offset, flk_cbp, cr));
@@ -2353,7 +2353,7 @@ vnext_space(femarg_t *vf, int cmd, struct flock64 *bfp, int flag,
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, int, &arg0, vop_space, vsop_space);
+ vsop_find(vf, &func, int, &arg0, vop_space, femop_space);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, cmd, bfp, flag, offset, cr, ct));
@@ -2367,7 +2367,7 @@ vnext_realvp(femarg_t *vf, vnode_t **vpp)
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, int, &arg0, vop_realvp, vsop_realvp);
+ vsop_find(vf, &func, int, &arg0, vop_realvp, femop_realvp);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, vpp));
@@ -2383,7 +2383,7 @@ vnext_getpage(femarg_t *vf, offset_t off, size_t len, uint_t *protp,
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, int, &arg0, vop_getpage, vsop_getpage);
+ vsop_find(vf, &func, int, &arg0, vop_getpage, femop_getpage);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, off, len, protp, plarr, plsz, seg, addr, rw,
@@ -2399,7 +2399,7 @@ vnext_putpage(femarg_t *vf, offset_t off, size_t len, int flags,
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, int, &arg0, vop_putpage, vsop_putpage);
+ vsop_find(vf, &func, int, &arg0, vop_putpage, femop_putpage);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, off, len, flags, cr));
@@ -2415,7 +2415,7 @@ vnext_map(femarg_t *vf, offset_t off, struct as *as, caddr_t *addrp,
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, int, &arg0, vop_map, vsop_map);
+ vsop_find(vf, &func, int, &arg0, vop_map, femop_map);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, off, as, addrp, len, prot, maxprot, flags,
@@ -2432,7 +2432,7 @@ vnext_addmap(femarg_t *vf, offset_t off, struct as *as, caddr_t addr,
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, int, &arg0, vop_addmap, vsop_addmap);
+ vsop_find(vf, &func, int, &arg0, vop_addmap, femop_addmap);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, off, as, addr, len, prot, maxprot, flags, cr));
@@ -2447,7 +2447,7 @@ vnext_delmap(femarg_t *vf, offset_t off, struct as *as, caddr_t addr,
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, int, &arg0, vop_delmap, vsop_delmap);
+ vsop_find(vf, &func, int, &arg0, vop_delmap, femop_delmap);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, off, as, addr, len, prot, maxprot, flags, cr));
@@ -2462,7 +2462,7 @@ vnext_poll(femarg_t *vf, short events, int anyyet, short *reventsp,
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, int, &arg0, vop_poll, vsop_poll);
+ vsop_find(vf, &func, int, &arg0, vop_poll, femop_poll);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, events, anyyet, reventsp, phpp));
@@ -2476,7 +2476,7 @@ vnext_dump(femarg_t *vf, caddr_t addr, int lbdn, int dblks)
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, int, &arg0, vop_dump, vsop_dump);
+ vsop_find(vf, &func, int, &arg0, vop_dump, femop_dump);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, addr, lbdn, dblks));
@@ -2490,7 +2490,7 @@ vnext_pathconf(femarg_t *vf, int cmd, ulong_t *valp, cred_t *cr)
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, int, &arg0, vop_pathconf, vsop_pathconf);
+ vsop_find(vf, &func, int, &arg0, vop_pathconf, femop_pathconf);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, cmd, valp, cr));
@@ -2505,7 +2505,7 @@ vnext_pageio(femarg_t *vf, struct page *pp, u_offset_t io_off,
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, int, &arg0, vop_pageio, vsop_pageio);
+ vsop_find(vf, &func, int, &arg0, vop_pageio, femop_pageio);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, pp, io_off, io_len, flags, cr));
@@ -2519,7 +2519,7 @@ vnext_dumpctl(femarg_t *vf, int action, int *blkp)
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, int, &arg0, vop_dumpctl, vsop_dumpctl);
+ vsop_find(vf, &func, int, &arg0, vop_dumpctl, femop_dumpctl);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, action, blkp));
@@ -2533,7 +2533,7 @@ vnext_dispose(femarg_t *vf, struct page *pp, int flag, int dn, cred_t *cr)
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, void, &arg0, vop_dispose, vsop_dispose);
+ vsop_find(vf, &func, void, &arg0, vop_dispose, femop_dispose);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
(*func)(arg0, pp, flag, dn, cr);
@@ -2547,7 +2547,7 @@ vnext_setsecattr(femarg_t *vf, vsecattr_t *vsap, int flag, cred_t *cr)
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, int, &arg0, vop_setsecattr, vsop_setsecattr);
+ vsop_find(vf, &func, int, &arg0, vop_setsecattr, femop_setsecattr);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, vsap, flag, cr));
@@ -2561,7 +2561,7 @@ vnext_getsecattr(femarg_t *vf, vsecattr_t *vsap, int flag, cred_t *cr)
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, int, &arg0, vop_getsecattr, vsop_getsecattr);
+ vsop_find(vf, &func, int, &arg0, vop_getsecattr, femop_getsecattr);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, vsap, flag, cr));
@@ -2576,7 +2576,7 @@ vnext_shrlock(femarg_t *vf, int cmd, struct shrlock *shr, int flag,
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, int, &arg0, vop_shrlock, vsop_shrlock);
+ vsop_find(vf, &func, int, &arg0, vop_shrlock, femop_shrlock);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, cmd, shr, flag, cr));
@@ -2590,7 +2590,7 @@ vnext_vnevent(femarg_t *vf, vnevent_t vnevent)
ASSERT(vf != NULL);
vf->fa_fnode--;
- vsop_find(vf, &func, int, &arg0, vop_vnevent, vsop_vnevent);
+ vsop_find(vf, &func, int, &arg0, vop_vnevent, femop_vnevent);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, vnevent));
@@ -2604,7 +2604,7 @@ vfsnext_mount(fsemarg_t *vf, vnode_t *mvp, struct mounta *uap, cred_t *cr)
ASSERT(vf != NULL);
vf->fa_fnode--;
- vfsop_find(vf, &func, int, &arg0, vfs_mount, vfsop_mount);
+ vfsop_find(vf, &func, int, &arg0, vfs_mount, fsemop_mount);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, mvp, uap, cr));
@@ -2618,7 +2618,7 @@ vfsnext_unmount(fsemarg_t *vf, int flag, cred_t *cr)
ASSERT(vf != NULL);
vf->fa_fnode--;
- vfsop_find(vf, &func, int, &arg0, vfs_unmount, vfsop_unmount);
+ vfsop_find(vf, &func, int, &arg0, vfs_unmount, fsemop_unmount);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, flag, cr));
@@ -2632,7 +2632,7 @@ vfsnext_root(fsemarg_t *vf, vnode_t **vpp)
ASSERT(vf != NULL);
vf->fa_fnode--;
- vfsop_find(vf, &func, int, &arg0, vfs_root, vfsop_root);
+ vfsop_find(vf, &func, int, &arg0, vfs_root, fsemop_root);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, vpp));
@@ -2646,7 +2646,7 @@ vfsnext_statvfs(fsemarg_t *vf, statvfs64_t *sp)
ASSERT(vf != NULL);
vf->fa_fnode--;
- vfsop_find(vf, &func, int, &arg0, vfs_statvfs, vfsop_statvfs);
+ vfsop_find(vf, &func, int, &arg0, vfs_statvfs, fsemop_statvfs);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, sp));
@@ -2660,7 +2660,7 @@ vfsnext_sync(fsemarg_t *vf, short flag, cred_t *cr)
ASSERT(vf != NULL);
vf->fa_fnode--;
- vfsop_find(vf, &func, int, &arg0, vfs_sync, vfsop_sync);
+ vfsop_find(vf, &func, int, &arg0, vfs_sync, fsemop_sync);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, flag, cr));
@@ -2674,7 +2674,7 @@ vfsnext_vget(fsemarg_t *vf, vnode_t **vpp, fid_t *fidp)
ASSERT(vf != NULL);
vf->fa_fnode--;
- vfsop_find(vf, &func, int, &arg0, vfs_vget, vfsop_vget);
+ vfsop_find(vf, &func, int, &arg0, vfs_vget, fsemop_vget);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, vpp, fidp));
@@ -2688,7 +2688,7 @@ vfsnext_mountroot(fsemarg_t *vf, enum whymountroot reason)
ASSERT(vf != NULL);
vf->fa_fnode--;
- vfsop_find(vf, &func, int, &arg0, vfs_mountroot, vfsop_mountroot);
+ vfsop_find(vf, &func, int, &arg0, vfs_mountroot, fsemop_mountroot);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, reason));
@@ -2702,7 +2702,7 @@ vfsnext_freevfs(fsemarg_t *vf)
ASSERT(vf != NULL);
vf->fa_fnode--;
- vfsop_find(vf, &func, void, &arg0, vfs_freevfs, vfsop_freevfs);
+ vfsop_find(vf, &func, void, &arg0, vfs_freevfs, fsemop_freevfs);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
(*func)(arg0);
@@ -2716,7 +2716,7 @@ vfsnext_vnstate(fsemarg_t *vf, vnode_t *vp, vntrans_t nstate)
ASSERT(vf != NULL);
vf->fa_fnode--;
- vfsop_find(vf, &func, int, &arg0, vfs_vnstate, vfsop_vnstate);
+ vfsop_find(vf, &func, int, &arg0, vfs_vnstate, fsemop_vnstate);
ASSERT(func != NULL);
ASSERT(arg0 != NULL);
return ((*func)(arg0, vp, nstate));
diff --git a/usr/src/uts/common/fs/fifofs/fifosubr.c b/usr/src/uts/common/fs/fifofs/fifosubr.c
index 8767999322..6b2ca9683f 100644
--- a/usr/src/uts/common/fs/fifofs/fifosubr.c
+++ b/usr/src/uts/common/fs/fifofs/fifosubr.c
@@ -21,7 +21,7 @@
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -45,6 +45,7 @@
#include <sys/sysmacros.h>
#include <sys/var.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/vnode.h>
#include <sys/mode.h>
#include <sys/signal.h>
diff --git a/usr/src/uts/common/fs/fifofs/fifovnops.c b/usr/src/uts/common/fs/fifofs/fifovnops.c
index 34f731af1e..afa01bb3ab 100644
--- a/usr/src/uts/common/fs/fifofs/fifovnops.c
+++ b/usr/src/uts/common/fs/fifofs/fifovnops.c
@@ -23,7 +23,7 @@
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -46,6 +46,7 @@
#include <sys/uio.h>
#include <sys/vfs.h>
#include <sys/vnode.h>
+#include <sys/vfs_opreg.h>
#include <sys/pathname.h>
#include <sys/signal.h>
#include <sys/user.h>
@@ -110,28 +111,28 @@ struct streamtab fifoinfo = { &fifo_strdata, &fifo_stwdata, NULL, NULL };
struct vnodeops *fifo_vnodeops;
const fs_operation_def_t fifo_vnodeops_template[] = {
- VOPNAME_OPEN, fifo_open,
- VOPNAME_CLOSE, fifo_close,
- VOPNAME_READ, fifo_read,
- VOPNAME_WRITE, fifo_write,
- VOPNAME_IOCTL, fifo_ioctl,
- VOPNAME_GETATTR, fifo_getattr,
- VOPNAME_SETATTR, fifo_setattr,
- VOPNAME_ACCESS, fifo_access,
- VOPNAME_CREATE, fifo_create,
- VOPNAME_FSYNC, fifo_fsync,
- VOPNAME_INACTIVE, (fs_generic_func_p) fifo_inactive,
- VOPNAME_FID, fifo_fid,
- VOPNAME_RWLOCK, fifo_rwlock,
- VOPNAME_RWUNLOCK, (fs_generic_func_p) fifo_rwunlock,
- VOPNAME_SEEK, fifo_seek,
- VOPNAME_REALVP, fifo_realvp,
- VOPNAME_POLL, (fs_generic_func_p) fifo_poll,
- VOPNAME_PATHCONF, fifo_pathconf,
- VOPNAME_DISPOSE, fs_error,
- VOPNAME_SETSECATTR, fifo_setsecattr,
- VOPNAME_GETSECATTR, fifo_getsecattr,
- NULL, NULL
+ VOPNAME_OPEN, { .vop_open = fifo_open },
+ VOPNAME_CLOSE, { .vop_close = fifo_close },
+ VOPNAME_READ, { .vop_read = fifo_read },
+ VOPNAME_WRITE, { .vop_write = fifo_write },
+ VOPNAME_IOCTL, { .vop_ioctl = fifo_ioctl },
+ VOPNAME_GETATTR, { .vop_getattr = fifo_getattr },
+ VOPNAME_SETATTR, { .vop_setattr = fifo_setattr },
+ VOPNAME_ACCESS, { .vop_access = fifo_access },
+ VOPNAME_CREATE, { .vop_create = fifo_create },
+ VOPNAME_FSYNC, { .vop_fsync = fifo_fsync },
+ VOPNAME_INACTIVE, { .vop_inactive = fifo_inactive },
+ VOPNAME_FID, { .vop_fid = fifo_fid },
+ VOPNAME_RWLOCK, { .vop_rwlock = fifo_rwlock },
+ VOPNAME_RWUNLOCK, { .vop_rwunlock = fifo_rwunlock },
+ VOPNAME_SEEK, { .vop_seek = fifo_seek },
+ VOPNAME_REALVP, { .vop_realvp = fifo_realvp },
+ VOPNAME_POLL, { .vop_poll = fifo_poll },
+ VOPNAME_PATHCONF, { .vop_pathconf = fifo_pathconf },
+ VOPNAME_DISPOSE, { .error = fs_error },
+ VOPNAME_SETSECATTR, { .vop_setsecattr = fifo_setsecattr },
+ VOPNAME_GETSECATTR, { .vop_getsecattr = fifo_getsecattr },
+ NULL, NULL
};
/*
diff --git a/usr/src/uts/common/fs/hsfs/hsfs_vfsops.c b/usr/src/uts/common/fs/hsfs/hsfs_vfsops.c
index bd538c8f5e..327ab63eb5 100644
--- a/usr/src/uts/common/fs/hsfs/hsfs_vfsops.c
+++ b/usr/src/uts/common/fs/hsfs/hsfs_vfsops.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -43,6 +43,7 @@
#include <sys/buf.h>
#include <sys/pathname.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/vnode.h>
#include <sys/file.h>
#include <sys/uio.h>
@@ -234,13 +235,13 @@ static int
hsfsinit(int fstype, char *name)
{
static const fs_operation_def_t hsfs_vfsops_template[] = {
- VFSNAME_MOUNT, hsfs_mount,
- VFSNAME_UNMOUNT, hsfs_unmount,
- VFSNAME_ROOT, hsfs_root,
- VFSNAME_STATVFS, hsfs_statvfs,
- VFSNAME_VGET, hsfs_vget,
- VFSNAME_MOUNTROOT, hsfs_mountroot,
- NULL, NULL
+ VFSNAME_MOUNT, { .vfs_mount = hsfs_mount },
+ VFSNAME_UNMOUNT, { .vfs_unmount = hsfs_unmount },
+ VFSNAME_ROOT, { .vfs_root = hsfs_root },
+ VFSNAME_STATVFS, { .vfs_statvfs = hsfs_statvfs },
+ VFSNAME_VGET, { .vfs_vget = hsfs_vget },
+ VFSNAME_MOUNTROOT, { .vfs_mountroot = hsfs_mountroot },
+ NULL, NULL
};
int error;
diff --git a/usr/src/uts/common/fs/hsfs/hsfs_vnops.c b/usr/src/uts/common/fs/hsfs/hsfs_vnops.c
index 9723f69639..7f48de25b8 100644
--- a/usr/src/uts/common/fs/hsfs/hsfs_vnops.c
+++ b/usr/src/uts/common/fs/hsfs/hsfs_vnops.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -41,6 +41,7 @@
#include <sys/user.h>
#include <sys/buf.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/stat.h>
#include <sys/vnode.h>
#include <sys/mode.h>
@@ -1331,26 +1332,26 @@ hsfs_pathconf(struct vnode *vp, int cmd, ulong_t *valp, struct cred *cr)
const fs_operation_def_t hsfs_vnodeops_template[] = {
- VOPNAME_OPEN, hsfs_open,
- VOPNAME_CLOSE, hsfs_close,
- VOPNAME_READ, hsfs_read,
- VOPNAME_GETATTR, hsfs_getattr,
- VOPNAME_ACCESS, hsfs_access,
- VOPNAME_LOOKUP, hsfs_lookup,
- VOPNAME_READDIR, hsfs_readdir,
- VOPNAME_READLINK, hsfs_readlink,
- VOPNAME_FSYNC, hsfs_fsync,
- VOPNAME_INACTIVE, (fs_generic_func_p) hsfs_inactive,
- VOPNAME_FID, hsfs_fid,
- VOPNAME_SEEK, hsfs_seek,
- VOPNAME_FRLOCK, hsfs_frlock,
- VOPNAME_GETPAGE, hsfs_getpage,
- VOPNAME_PUTPAGE, hsfs_putpage,
- VOPNAME_MAP, (fs_generic_func_p) hsfs_map,
- VOPNAME_ADDMAP, (fs_generic_func_p) hsfs_addmap,
- VOPNAME_DELMAP, hsfs_delmap,
- VOPNAME_PATHCONF, hsfs_pathconf,
- NULL, NULL
+ VOPNAME_OPEN, { .vop_open = hsfs_open },
+ VOPNAME_CLOSE, { .vop_close = hsfs_close },
+ VOPNAME_READ, { .vop_read = hsfs_read },
+ VOPNAME_GETATTR, { .vop_getattr = hsfs_getattr },
+ VOPNAME_ACCESS, { .vop_access = hsfs_access },
+ VOPNAME_LOOKUP, { .vop_lookup = hsfs_lookup },
+ VOPNAME_READDIR, { .vop_readdir = hsfs_readdir },
+ VOPNAME_READLINK, { .vop_readlink = hsfs_readlink },
+ VOPNAME_FSYNC, { .vop_fsync = hsfs_fsync },
+ VOPNAME_INACTIVE, { .vop_inactive = hsfs_inactive },
+ VOPNAME_FID, { .vop_fid = hsfs_fid },
+ VOPNAME_SEEK, { .vop_seek = hsfs_seek },
+ VOPNAME_FRLOCK, { .vop_frlock = hsfs_frlock },
+ VOPNAME_GETPAGE, { .vop_getpage = hsfs_getpage },
+ VOPNAME_PUTPAGE, { .vop_putpage = hsfs_putpage },
+ VOPNAME_MAP, { .vop_map = hsfs_map },
+ VOPNAME_ADDMAP, { .vop_addmap = hsfs_addmap },
+ VOPNAME_DELMAP, { .vop_delmap = hsfs_delmap },
+ VOPNAME_PATHCONF, { .vop_pathconf = hsfs_pathconf },
+ NULL, NULL
};
struct vnodeops *hsfs_vnodeops;
diff --git a/usr/src/uts/common/fs/lofs/lofs_vfsops.c b/usr/src/uts/common/fs/lofs/lofs_vfsops.c
index ea19eabe6e..8616e90cd6 100644
--- a/usr/src/uts/common/fs/lofs/lofs_vfsops.c
+++ b/usr/src/uts/common/fs/lofs/lofs_vfsops.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -28,6 +28,7 @@
#include <sys/param.h>
#include <sys/errno.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/vnode.h>
#include <sys/uio.h>
#include <sys/pathname.h>
@@ -540,14 +541,14 @@ static int
lofsinit(int fstyp, char *name)
{
static const fs_operation_def_t lo_vfsops_template[] = {
- VFSNAME_MOUNT, lo_mount,
- VFSNAME_UNMOUNT, lo_unmount,
- VFSNAME_ROOT, lo_root,
- VFSNAME_STATVFS, lo_statvfs,
- VFSNAME_SYNC, (fs_generic_func_p) lo_sync,
- VFSNAME_VGET, lo_vget,
- VFSNAME_FREEVFS, (fs_generic_func_p) lo_freevfs,
- NULL, NULL
+ VFSNAME_MOUNT, { .vfs_mount = lo_mount },
+ VFSNAME_UNMOUNT, { .vfs_unmount = lo_unmount },
+ VFSNAME_ROOT, { .vfs_root = lo_root },
+ VFSNAME_STATVFS, { .vfs_statvfs = lo_statvfs },
+ VFSNAME_SYNC, { .vfs_sync = lo_sync },
+ VFSNAME_VGET, { .vfs_vget = lo_vget },
+ VFSNAME_FREEVFS, { .vfs_freevfs = lo_freevfs },
+ NULL, NULL
};
int error;
diff --git a/usr/src/uts/common/fs/lofs/lofs_vnops.c b/usr/src/uts/common/fs/lofs/lofs_vnops.c
index fe68686fbe..85138187c1 100644
--- a/usr/src/uts/common/fs/lofs/lofs_vnops.c
+++ b/usr/src/uts/common/fs/lofs/lofs_vnops.c
@@ -30,6 +30,7 @@
#include <sys/errno.h>
#include <sys/vnode.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/uio.h>
#include <sys/cred.h>
#include <sys/pathname.h>
@@ -1116,48 +1117,48 @@ lo_shrlock(vnode_t *vp, int cmd, struct shrlock *shr, int flag, cred_t *cr)
struct vnodeops *lo_vnodeops;
const fs_operation_def_t lo_vnodeops_template[] = {
- VOPNAME_OPEN, lo_open,
- VOPNAME_CLOSE, lo_close,
- VOPNAME_READ, lo_read,
- VOPNAME_WRITE, lo_write,
- VOPNAME_IOCTL, lo_ioctl,
- VOPNAME_SETFL, lo_setfl,
- VOPNAME_GETATTR, lo_getattr,
- VOPNAME_SETATTR, lo_setattr,
- VOPNAME_ACCESS, lo_access,
- VOPNAME_LOOKUP, lo_lookup,
- VOPNAME_CREATE, lo_create,
- VOPNAME_REMOVE, lo_remove,
- VOPNAME_LINK, lo_link,
- VOPNAME_RENAME, lo_rename,
- VOPNAME_MKDIR, lo_mkdir,
- VOPNAME_RMDIR, lo_rmdir,
- VOPNAME_READDIR, lo_readdir,
- VOPNAME_SYMLINK, lo_symlink,
- VOPNAME_READLINK, lo_readlink,
- VOPNAME_FSYNC, lo_fsync,
- VOPNAME_INACTIVE, (fs_generic_func_p) lo_inactive,
- VOPNAME_FID, lo_fid,
- VOPNAME_RWLOCK, lo_rwlock,
- VOPNAME_RWUNLOCK, (fs_generic_func_p) lo_rwunlock,
- VOPNAME_SEEK, lo_seek,
- VOPNAME_CMP, lo_cmp,
- VOPNAME_FRLOCK, lo_frlock,
- VOPNAME_SPACE, lo_space,
- VOPNAME_REALVP, lo_realvp,
- VOPNAME_GETPAGE, lo_getpage,
- VOPNAME_PUTPAGE, lo_putpage,
- VOPNAME_MAP, (fs_generic_func_p) lo_map,
- VOPNAME_ADDMAP, (fs_generic_func_p) lo_addmap,
- VOPNAME_DELMAP, lo_delmap,
- VOPNAME_POLL, (fs_generic_func_p) lo_poll,
- VOPNAME_DUMP, lo_dump,
- VOPNAME_DUMPCTL, fs_error, /* XXX - why? */
- VOPNAME_PATHCONF, lo_pathconf,
- VOPNAME_PAGEIO, lo_pageio,
- VOPNAME_DISPOSE, (fs_generic_func_p) lo_dispose,
- VOPNAME_SETSECATTR, lo_setsecattr,
- VOPNAME_GETSECATTR, lo_getsecattr,
- VOPNAME_SHRLOCK, lo_shrlock,
- NULL, NULL
+ VOPNAME_OPEN, { .vop_open = lo_open },
+ VOPNAME_CLOSE, { .vop_close = lo_close },
+ VOPNAME_READ, { .vop_read = lo_read },
+ VOPNAME_WRITE, { .vop_write = lo_write },
+ VOPNAME_IOCTL, { .vop_ioctl = lo_ioctl },
+ VOPNAME_SETFL, { .vop_setfl = lo_setfl },
+ VOPNAME_GETATTR, { .vop_getattr = lo_getattr },
+ VOPNAME_SETATTR, { .vop_setattr = lo_setattr },
+ VOPNAME_ACCESS, { .vop_access = lo_access },
+ VOPNAME_LOOKUP, { .vop_lookup = lo_lookup },
+ VOPNAME_CREATE, { .vop_create = lo_create },
+ VOPNAME_REMOVE, { .vop_remove = lo_remove },
+ VOPNAME_LINK, { .vop_link = lo_link },
+ VOPNAME_RENAME, { .vop_rename = lo_rename },
+ VOPNAME_MKDIR, { .vop_mkdir = lo_mkdir },
+ VOPNAME_RMDIR, { .vop_rmdir = lo_rmdir },
+ VOPNAME_READDIR, { .vop_readdir = lo_readdir },
+ VOPNAME_SYMLINK, { .vop_symlink = lo_symlink },
+ VOPNAME_READLINK, { .vop_readlink = lo_readlink },
+ VOPNAME_FSYNC, { .vop_fsync = lo_fsync },
+ VOPNAME_INACTIVE, { .vop_inactive = lo_inactive },
+ VOPNAME_FID, { .vop_fid = lo_fid },
+ VOPNAME_RWLOCK, { .vop_rwlock = lo_rwlock },
+ VOPNAME_RWUNLOCK, { .vop_rwunlock = lo_rwunlock },
+ VOPNAME_SEEK, { .vop_seek = lo_seek },
+ VOPNAME_CMP, { .vop_cmp = lo_cmp },
+ VOPNAME_FRLOCK, { .vop_frlock = lo_frlock },
+ VOPNAME_SPACE, { .vop_space = lo_space },
+ VOPNAME_REALVP, { .vop_realvp = lo_realvp },
+ VOPNAME_GETPAGE, { .vop_getpage = lo_getpage },
+ VOPNAME_PUTPAGE, { .vop_putpage = lo_putpage },
+ VOPNAME_MAP, { .vop_map = lo_map },
+ VOPNAME_ADDMAP, { .vop_addmap = lo_addmap },
+ VOPNAME_DELMAP, { .vop_delmap = lo_delmap },
+ VOPNAME_POLL, { .vop_poll = lo_poll },
+ VOPNAME_DUMP, { .vop_dump = lo_dump },
+ VOPNAME_DUMPCTL, { .error = fs_error }, /* XXX - why? */
+ VOPNAME_PATHCONF, { .vop_pathconf = lo_pathconf },
+ VOPNAME_PAGEIO, { .vop_pageio = lo_pageio },
+ VOPNAME_DISPOSE, { .vop_dispose = lo_dispose },
+ VOPNAME_SETSECATTR, { .vop_setsecattr = lo_setsecattr },
+ VOPNAME_GETSECATTR, { .vop_getsecattr = lo_getsecattr },
+ VOPNAME_SHRLOCK, { .vop_shrlock = lo_shrlock },
+ NULL, NULL
};
diff --git a/usr/src/uts/common/fs/mntfs/mntvfsops.c b/usr/src/uts/common/fs/mntfs/mntvfsops.c
index f4d679fc9e..f148bb4af4 100644
--- a/usr/src/uts/common/fs/mntfs/mntvfsops.c
+++ b/usr/src/uts/common/fs/mntfs/mntvfsops.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -39,6 +39,7 @@
#include <sys/systm.h>
#include <sys/var.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/vnode.h>
#include <sys/mode.h>
#include <sys/signal.h>
@@ -134,11 +135,11 @@ static int
mntinit(int fstype, char *name)
{
static const fs_operation_def_t mnt_vfsops_template[] = {
- VFSNAME_MOUNT, mntmount,
- VFSNAME_UNMOUNT, mntunmount,
- VFSNAME_ROOT, mntroot,
- VFSNAME_STATVFS, mntstatvfs,
- NULL, NULL
+ VFSNAME_MOUNT, { .vfs_mount = mntmount },
+ VFSNAME_UNMOUNT, { .vfs_unmount = mntunmount },
+ VFSNAME_ROOT, { .vfs_root = mntroot },
+ VFSNAME_STATVFS, { .vfs_statvfs = mntstatvfs },
+ NULL, NULL
};
extern const fs_operation_def_t mnt_vnodeops_template[];
int error;
diff --git a/usr/src/uts/common/fs/mntfs/mntvnops.c b/usr/src/uts/common/fs/mntfs/mntvnops.c
index 450bc1b973..79f3a090b7 100644
--- a/usr/src/uts/common/fs/mntfs/mntvnops.c
+++ b/usr/src/uts/common/fs/mntfs/mntvnops.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -36,6 +35,7 @@
#include <sys/sysmacros.h>
#include <sys/systm.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/fs/mntdata.h>
#include <fs/fs_subr.h>
#include <sys/vmsystm.h>
@@ -1133,17 +1133,17 @@ mntioctl(struct vnode *vp, int cmd, intptr_t arg, int flag,
* /mntfs vnode operations vector
*/
const fs_operation_def_t mnt_vnodeops_template[] = {
- VOPNAME_OPEN, mntopen,
- VOPNAME_CLOSE, mntclose,
- VOPNAME_READ, mntread,
- VOPNAME_IOCTL, mntioctl,
- VOPNAME_GETATTR, mntgetattr,
- VOPNAME_ACCESS, mntaccess,
- VOPNAME_FSYNC, mntfsync,
- VOPNAME_INACTIVE, (fs_generic_func_p) mntinactive,
- VOPNAME_SEEK, mntseek,
- VOPNAME_POLL, (fs_generic_func_p) mntpoll,
- VOPNAME_DISPOSE, fs_error,
- VOPNAME_SHRLOCK, fs_error,
- NULL, NULL
+ VOPNAME_OPEN, { .vop_open = mntopen },
+ VOPNAME_CLOSE, { .vop_close = mntclose },
+ VOPNAME_READ, { .vop_read = mntread },
+ VOPNAME_IOCTL, { .vop_ioctl = mntioctl },
+ VOPNAME_GETATTR, { .vop_getattr = mntgetattr },
+ VOPNAME_ACCESS, { .vop_access = mntaccess },
+ VOPNAME_FSYNC, { .vop_fsync = mntfsync },
+ VOPNAME_INACTIVE, { .vop_inactive = mntinactive },
+ VOPNAME_SEEK, { .vop_seek = mntseek },
+ VOPNAME_POLL, { .vop_poll = mntpoll },
+ VOPNAME_DISPOSE, { .error = fs_error },
+ VOPNAME_SHRLOCK, { .error = fs_error },
+ NULL, NULL
};
diff --git a/usr/src/uts/common/fs/namefs/namevfs.c b/usr/src/uts/common/fs/namefs/namevfs.c
index c54254070f..88bafaa135 100644
--- a/usr/src/uts/common/fs/namefs/namevfs.c
+++ b/usr/src/uts/common/fs/namefs/namevfs.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -48,6 +48,7 @@
#include <sys/sysmacros.h>
#include <sys/var.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/vnode.h>
#include <sys/mode.h>
#include <sys/pcb.h>
@@ -662,17 +663,17 @@ int
nameinit(int fstype, char *name)
{
static const fs_operation_def_t nm_vfsops_template[] = {
- VFSNAME_MOUNT, nm_mount,
- VFSNAME_UNMOUNT, nm_unmount,
- VFSNAME_ROOT, nm_root,
- VFSNAME_STATVFS, nm_statvfs,
- VFSNAME_SYNC, (fs_generic_func_p) nm_sync,
- NULL, NULL
+ VFSNAME_MOUNT, { .vfs_mount = nm_mount },
+ VFSNAME_UNMOUNT, { .vfs_unmount = nm_unmount },
+ VFSNAME_ROOT, { .vfs_root = nm_root },
+ VFSNAME_STATVFS, { .vfs_statvfs = nm_statvfs },
+ VFSNAME_SYNC, { .vfs_sync = nm_sync },
+ NULL, NULL
};
static const fs_operation_def_t nm_dummy_vfsops_template[] = {
- VFSNAME_STATVFS, nm_statvfs,
- VFSNAME_SYNC, (fs_generic_func_p) nm_sync,
- NULL, NULL
+ VFSNAME_STATVFS, { .vfs_statvfs = nm_statvfs },
+ VFSNAME_SYNC, { .vfs_sync = nm_sync },
+ NULL, NULL
};
int error;
int dev;
diff --git a/usr/src/uts/common/fs/namefs/namevno.c b/usr/src/uts/common/fs/namefs/namevno.c
index bb53b1f7cf..ab4767e578 100644
--- a/usr/src/uts/common/fs/namefs/namevno.c
+++ b/usr/src/uts/common/fs/namefs/namevno.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -24,7 +23,7 @@
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -50,6 +49,7 @@
#include <sys/kmem.h>
#include <sys/uio.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/vnode.h>
#include <sys/pcb.h>
#include <sys/signal.h>
@@ -461,24 +461,24 @@ nm_poll(vnode_t *vp, short events, int anyyet, short *reventsp,
struct vnodeops *nm_vnodeops;
const fs_operation_def_t nm_vnodeops_template[] = {
- VOPNAME_OPEN, nm_open,
- VOPNAME_CLOSE, nm_close,
- VOPNAME_READ, nm_read,
- VOPNAME_WRITE, nm_write,
- VOPNAME_IOCTL, nm_ioctl,
- VOPNAME_GETATTR, nm_getattr,
- VOPNAME_SETATTR, nm_setattr,
- VOPNAME_ACCESS, nm_access,
- VOPNAME_CREATE, nm_create,
- VOPNAME_LINK, nm_link,
- VOPNAME_FSYNC, nm_fsync,
- VOPNAME_INACTIVE, (fs_generic_func_p) nm_inactive,
- VOPNAME_FID, nm_fid,
- VOPNAME_RWLOCK, nm_rwlock,
- VOPNAME_RWUNLOCK, (fs_generic_func_p) nm_rwunlock,
- VOPNAME_SEEK, nm_seek,
- VOPNAME_REALVP, nm_realvp,
- VOPNAME_POLL, (fs_generic_func_p) nm_poll,
- VOPNAME_DISPOSE, fs_error,
- NULL, NULL
+ VOPNAME_OPEN, { .vop_open = nm_open },
+ VOPNAME_CLOSE, { .vop_close = nm_close },
+ VOPNAME_READ, { .vop_read = nm_read },
+ VOPNAME_WRITE, { .vop_write = nm_write },
+ VOPNAME_IOCTL, { .vop_ioctl = nm_ioctl },
+ VOPNAME_GETATTR, { .vop_getattr = nm_getattr },
+ VOPNAME_SETATTR, { .vop_setattr = nm_setattr },
+ VOPNAME_ACCESS, { .vop_access = nm_access },
+ VOPNAME_CREATE, { .vop_create = nm_create },
+ VOPNAME_LINK, { .vop_link = nm_link },
+ VOPNAME_FSYNC, { .vop_fsync = nm_fsync },
+ VOPNAME_INACTIVE, { .vop_inactive = nm_inactive },
+ VOPNAME_FID, { .vop_fid = nm_fid },
+ VOPNAME_RWLOCK, { .vop_rwlock = nm_rwlock },
+ VOPNAME_RWUNLOCK, { .vop_rwunlock = nm_rwunlock },
+ VOPNAME_SEEK, { .vop_seek = nm_seek },
+ VOPNAME_REALVP, { .vop_realvp = nm_realvp },
+ VOPNAME_POLL, { .vop_poll = nm_poll },
+ VOPNAME_DISPOSE, { .error = fs_error },
+ NULL, NULL
};
diff --git a/usr/src/uts/common/fs/nfs/nfs3_vfsops.c b/usr/src/uts/common/fs/nfs/nfs3_vfsops.c
index 4a3157ed0d..e02d3ab6bb 100644
--- a/usr/src/uts/common/fs/nfs/nfs3_vfsops.c
+++ b/usr/src/uts/common/fs/nfs/nfs3_vfsops.c
@@ -35,6 +35,7 @@
#include <sys/systm.h>
#include <sys/cred.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/vnode.h>
#include <sys/pathname.h>
#include <sys/sysmacros.h>
@@ -155,15 +156,15 @@ int
nfs3init(int fstyp, char *name)
{
static const fs_operation_def_t nfs3_vfsops_template[] = {
- VFSNAME_MOUNT, nfs3_mount,
- VFSNAME_UNMOUNT, nfs3_unmount,
- VFSNAME_ROOT, nfs3_root,
- VFSNAME_STATVFS, nfs3_statvfs,
- VFSNAME_SYNC, (fs_generic_func_p) nfs3_sync,
- VFSNAME_VGET, nfs3_vget,
- VFSNAME_MOUNTROOT, nfs3_mountroot,
- VFSNAME_FREEVFS, (fs_generic_func_p)nfs3_freevfs,
- NULL, NULL
+ VFSNAME_MOUNT, { .vfs_mount = nfs3_mount },
+ VFSNAME_UNMOUNT, { .vfs_unmount = nfs3_unmount },
+ VFSNAME_ROOT, { .vfs_root = nfs3_root },
+ VFSNAME_STATVFS, { .vfs_statvfs = nfs3_statvfs },
+ VFSNAME_SYNC, { .vfs_sync = nfs3_sync },
+ VFSNAME_VGET, { .vfs_vget = nfs3_vget },
+ VFSNAME_MOUNTROOT, { .vfs_mountroot = nfs3_mountroot },
+ VFSNAME_FREEVFS, { .vfs_freevfs = nfs3_freevfs },
+ NULL, NULL
};
int error;
diff --git a/usr/src/uts/common/fs/nfs/nfs3_vnops.c b/usr/src/uts/common/fs/nfs/nfs3_vnops.c
index 3b54de5ea7..7a9355b4a4 100644
--- a/usr/src/uts/common/fs/nfs/nfs3_vnops.c
+++ b/usr/src/uts/common/fs/nfs/nfs3_vnops.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -37,6 +37,7 @@
#include <sys/time.h>
#include <sys/vnode.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/file.h>
#include <sys/filio.h>
#include <sys/uio.h>
@@ -216,46 +217,47 @@ static int nfs3_shrlock(vnode_t *, int, struct shrlock *, int, cred_t *);
struct vnodeops *nfs3_vnodeops;
const fs_operation_def_t nfs3_vnodeops_template[] = {
- VOPNAME_OPEN, nfs3_open,
- VOPNAME_CLOSE, nfs3_close,
- VOPNAME_READ, nfs3_read,
- VOPNAME_WRITE, nfs3_write,
- VOPNAME_IOCTL, nfs3_ioctl,
- VOPNAME_GETATTR, nfs3_getattr,
- VOPNAME_SETATTR, nfs3_setattr,
- VOPNAME_ACCESS, nfs3_access,
- VOPNAME_LOOKUP, nfs3_lookup,
- VOPNAME_CREATE, nfs3_create,
- VOPNAME_REMOVE, nfs3_remove,
- VOPNAME_LINK, nfs3_link,
- VOPNAME_RENAME, nfs3_rename,
- VOPNAME_MKDIR, nfs3_mkdir,
- VOPNAME_RMDIR, nfs3_rmdir,
- VOPNAME_READDIR, nfs3_readdir,
- VOPNAME_SYMLINK, nfs3_symlink,
- VOPNAME_READLINK, nfs3_readlink,
- VOPNAME_FSYNC, nfs3_fsync,
- VOPNAME_INACTIVE, (fs_generic_func_p) nfs3_inactive,
- VOPNAME_FID, nfs3_fid,
- VOPNAME_RWLOCK, nfs3_rwlock,
- VOPNAME_RWUNLOCK, (fs_generic_func_p) nfs3_rwunlock,
- VOPNAME_SEEK, nfs3_seek,
- VOPNAME_FRLOCK, nfs3_frlock,
- VOPNAME_SPACE, nfs3_space,
- VOPNAME_REALVP, nfs3_realvp,
- VOPNAME_GETPAGE, nfs3_getpage,
- VOPNAME_PUTPAGE, nfs3_putpage,
- VOPNAME_MAP, (fs_generic_func_p) nfs3_map,
- VOPNAME_ADDMAP, (fs_generic_func_p) nfs3_addmap,
- VOPNAME_DELMAP, nfs3_delmap,
- VOPNAME_DUMP, nfs_dump, /* there is no separate nfs3_dump */
- VOPNAME_PATHCONF, nfs3_pathconf,
- VOPNAME_PAGEIO, nfs3_pageio,
- VOPNAME_DISPOSE, (fs_generic_func_p) nfs3_dispose,
- VOPNAME_SETSECATTR, nfs3_setsecattr,
- VOPNAME_GETSECATTR, nfs3_getsecattr,
- VOPNAME_SHRLOCK, nfs3_shrlock,
- NULL, NULL
+ VOPNAME_OPEN, { .vop_open = nfs3_open },
+ VOPNAME_CLOSE, { .vop_close = nfs3_close },
+ VOPNAME_READ, { .vop_read = nfs3_read },
+ VOPNAME_WRITE, { .vop_write = nfs3_write },
+ VOPNAME_IOCTL, { .vop_ioctl = nfs3_ioctl },
+ VOPNAME_GETATTR, { .vop_getattr = nfs3_getattr },
+ VOPNAME_SETATTR, { .vop_setattr = nfs3_setattr },
+ VOPNAME_ACCESS, { .vop_access = nfs3_access },
+ VOPNAME_LOOKUP, { .vop_lookup = nfs3_lookup },
+ VOPNAME_CREATE, { .vop_create = nfs3_create },
+ VOPNAME_REMOVE, { .vop_remove = nfs3_remove },
+ VOPNAME_LINK, { .vop_link = nfs3_link },
+ VOPNAME_RENAME, { .vop_rename = nfs3_rename },
+ VOPNAME_MKDIR, { .vop_mkdir = nfs3_mkdir },
+ VOPNAME_RMDIR, { .vop_rmdir = nfs3_rmdir },
+ VOPNAME_READDIR, { .vop_readdir = nfs3_readdir },
+ VOPNAME_SYMLINK, { .vop_symlink = nfs3_symlink },
+ VOPNAME_READLINK, { .vop_readlink = nfs3_readlink },
+ VOPNAME_FSYNC, { .vop_fsync = nfs3_fsync },
+ VOPNAME_INACTIVE, { .vop_inactive = nfs3_inactive },
+ VOPNAME_FID, { .vop_fid = nfs3_fid },
+ VOPNAME_RWLOCK, { .vop_rwlock = nfs3_rwlock },
+ VOPNAME_RWUNLOCK, { .vop_rwunlock = nfs3_rwunlock },
+ VOPNAME_SEEK, { .vop_seek = nfs3_seek },
+ VOPNAME_FRLOCK, { .vop_frlock = nfs3_frlock },
+ VOPNAME_SPACE, { .vop_space = nfs3_space },
+ VOPNAME_REALVP, { .vop_realvp = nfs3_realvp },
+ VOPNAME_GETPAGE, { .vop_getpage = nfs3_getpage },
+ VOPNAME_PUTPAGE, { .vop_putpage = nfs3_putpage },
+ VOPNAME_MAP, { .vop_map = nfs3_map },
+ VOPNAME_ADDMAP, { .vop_addmap = nfs3_addmap },
+ VOPNAME_DELMAP, { .vop_delmap = nfs3_delmap },
+ /* no separate nfs3_dump */
+ VOPNAME_DUMP, { .vop_dump = nfs_dump },
+ VOPNAME_PATHCONF, { .vop_pathconf = nfs3_pathconf },
+ VOPNAME_PAGEIO, { .vop_pageio = nfs3_pageio },
+ VOPNAME_DISPOSE, { .vop_dispose = nfs3_dispose },
+ VOPNAME_SETSECATTR, { .vop_setsecattr = nfs3_setsecattr },
+ VOPNAME_GETSECATTR, { .vop_getsecattr = nfs3_getsecattr },
+ VOPNAME_SHRLOCK, { .vop_shrlock = nfs3_shrlock },
+ NULL, NULL
};
/*
diff --git a/usr/src/uts/common/fs/nfs/nfs4_srv.c b/usr/src/uts/common/fs/nfs/nfs4_srv.c
index cd741c18c0..fd0ebe6f8e 100644
--- a/usr/src/uts/common/fs/nfs/nfs4_srv.c
+++ b/usr/src/uts/common/fs/nfs/nfs4_srv.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -36,6 +36,7 @@
#include <sys/cred.h>
#include <sys/buf.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/vnode.h>
#include <sys/uio.h>
#include <sys/errno.h>
@@ -475,25 +476,25 @@ extern size_t strlcpy(char *dst, const char *src, size_t dstsize);
#define nextdp(dp) ((struct dirent64 *)((char *)(dp) + (dp)->d_reclen))
static const fs_operation_def_t nfs4_rd_deleg_tmpl[] = {
- VOPNAME_OPEN, deleg_rdopen,
- VOPNAME_WRITE, deleg_write,
- VOPNAME_SETATTR, deleg_setattr,
- VOPNAME_RWLOCK, deleg_rd_rwlock,
- VOPNAME_SPACE, deleg_space,
- VOPNAME_SETSECATTR, deleg_setsecattr,
- VOPNAME_VNEVENT, deleg_vnevent,
- NULL, NULL
+ VOPNAME_OPEN, { .femop_open = deleg_rdopen },
+ VOPNAME_WRITE, { .femop_write = deleg_write },
+ VOPNAME_SETATTR, { .femop_setattr = deleg_setattr },
+ VOPNAME_RWLOCK, { .femop_rwlock = deleg_rd_rwlock },
+ VOPNAME_SPACE, { .femop_space = deleg_space },
+ VOPNAME_SETSECATTR, { .femop_setsecattr = deleg_setsecattr },
+ VOPNAME_VNEVENT, { .femop_vnevent = deleg_vnevent },
+ NULL, NULL
};
static const fs_operation_def_t nfs4_wr_deleg_tmpl[] = {
- VOPNAME_OPEN, deleg_wropen,
- VOPNAME_READ, deleg_read,
- VOPNAME_WRITE, deleg_write,
- VOPNAME_SETATTR, deleg_setattr,
- VOPNAME_RWLOCK, deleg_wr_rwlock,
- VOPNAME_SPACE, deleg_space,
- VOPNAME_SETSECATTR, deleg_setsecattr,
- VOPNAME_VNEVENT, deleg_vnevent,
- NULL, NULL
+ VOPNAME_OPEN, { .femop_open = deleg_wropen },
+ VOPNAME_READ, { .femop_read = deleg_read },
+ VOPNAME_WRITE, { .femop_write = deleg_write },
+ VOPNAME_SETATTR, { .femop_setattr = deleg_setattr },
+ VOPNAME_RWLOCK, { .femop_rwlock = deleg_wr_rwlock },
+ VOPNAME_SPACE, { .femop_space = deleg_space },
+ VOPNAME_SETSECATTR, { .femop_setsecattr = deleg_setsecattr },
+ VOPNAME_VNEVENT, { .femop_vnevent = deleg_vnevent },
+ NULL, NULL
};
int
diff --git a/usr/src/uts/common/fs/nfs/nfs4_vfsops.c b/usr/src/uts/common/fs/nfs/nfs4_vfsops.c
index 4bc1e88d5f..4f6719117f 100644
--- a/usr/src/uts/common/fs/nfs/nfs4_vfsops.c
+++ b/usr/src/uts/common/fs/nfs/nfs4_vfsops.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -35,6 +35,7 @@
#include <sys/systm.h>
#include <sys/cred.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/vnode.h>
#include <sys/pathname.h>
#include <sys/sysmacros.h>
@@ -175,15 +176,15 @@ int
nfs4init(int fstyp, char *name)
{
static const fs_operation_def_t nfs4_vfsops_template[] = {
- VFSNAME_MOUNT, nfs4_mount,
- VFSNAME_UNMOUNT, nfs4_unmount,
- VFSNAME_ROOT, nfs4_root,
- VFSNAME_STATVFS, nfs4_statvfs,
- VFSNAME_SYNC, (fs_generic_func_p) nfs4_sync,
- VFSNAME_VGET, nfs4_vget,
- VFSNAME_MOUNTROOT, nfs4_mountroot,
- VFSNAME_FREEVFS, (fs_generic_func_p)nfs4_freevfs,
- NULL, NULL
+ VFSNAME_MOUNT, { .vfs_mount = nfs4_mount },
+ VFSNAME_UNMOUNT, { .vfs_unmount = nfs4_unmount },
+ VFSNAME_ROOT, { .vfs_root = nfs4_root },
+ VFSNAME_STATVFS, { .vfs_statvfs = nfs4_statvfs },
+ VFSNAME_SYNC, { .vfs_sync = nfs4_sync },
+ VFSNAME_VGET, { .vfs_vget = nfs4_vget },
+ VFSNAME_MOUNTROOT, { .vfs_mountroot = nfs4_mountroot },
+ VFSNAME_FREEVFS, { .vfs_freevfs = nfs4_freevfs },
+ NULL, NULL
};
int error;
diff --git a/usr/src/uts/common/fs/nfs/nfs4_vnops.c b/usr/src/uts/common/fs/nfs/nfs4_vnops.c
index ba1155d523..36786c3514 100644
--- a/usr/src/uts/common/fs/nfs/nfs4_vnops.c
+++ b/usr/src/uts/common/fs/nfs/nfs4_vnops.c
@@ -37,6 +37,7 @@
#include <sys/time.h>
#include <sys/vnode.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/file.h>
#include <sys/filio.h>
#include <sys/uio.h>
@@ -363,46 +364,47 @@ static int nfs4_pathconf_disable_cache = 0;
struct vnodeops *nfs4_vnodeops;
const fs_operation_def_t nfs4_vnodeops_template[] = {
- VOPNAME_OPEN, nfs4_open,
- VOPNAME_CLOSE, nfs4_close,
- VOPNAME_READ, nfs4_read,
- VOPNAME_WRITE, nfs4_write,
- VOPNAME_IOCTL, nfs4_ioctl,
- VOPNAME_GETATTR, nfs4_getattr,
- VOPNAME_SETATTR, nfs4_setattr,
- VOPNAME_ACCESS, nfs4_access,
- VOPNAME_LOOKUP, nfs4_lookup,
- VOPNAME_CREATE, nfs4_create,
- VOPNAME_REMOVE, nfs4_remove,
- VOPNAME_LINK, nfs4_link,
- VOPNAME_RENAME, nfs4_rename,
- VOPNAME_MKDIR, nfs4_mkdir,
- VOPNAME_RMDIR, nfs4_rmdir,
- VOPNAME_READDIR, nfs4_readdir,
- VOPNAME_SYMLINK, nfs4_symlink,
- VOPNAME_READLINK, nfs4_readlink,
- VOPNAME_FSYNC, nfs4_fsync,
- VOPNAME_INACTIVE, (fs_generic_func_p) nfs4_inactive,
- VOPNAME_FID, nfs4_fid,
- VOPNAME_RWLOCK, nfs4_rwlock,
- VOPNAME_RWUNLOCK, (fs_generic_func_p) nfs4_rwunlock,
- VOPNAME_SEEK, nfs4_seek,
- VOPNAME_FRLOCK, nfs4_frlock,
- VOPNAME_SPACE, nfs4_space,
- VOPNAME_REALVP, nfs4_realvp,
- VOPNAME_GETPAGE, nfs4_getpage,
- VOPNAME_PUTPAGE, nfs4_putpage,
- VOPNAME_MAP, (fs_generic_func_p) nfs4_map,
- VOPNAME_ADDMAP, (fs_generic_func_p) nfs4_addmap,
- VOPNAME_DELMAP, nfs4_delmap,
- VOPNAME_DUMP, nfs_dump, /* there is no separate nfs4_dump */
- VOPNAME_PATHCONF, nfs4_pathconf,
- VOPNAME_PAGEIO, nfs4_pageio,
- VOPNAME_DISPOSE, (fs_generic_func_p) nfs4_dispose,
- VOPNAME_SETSECATTR, nfs4_setsecattr,
- VOPNAME_GETSECATTR, nfs4_getsecattr,
- VOPNAME_SHRLOCK, nfs4_shrlock,
- NULL, NULL
+ VOPNAME_OPEN, { .vop_open = nfs4_open },
+ VOPNAME_CLOSE, { .vop_close = nfs4_close },
+ VOPNAME_READ, { .vop_read = nfs4_read },
+ VOPNAME_WRITE, { .vop_write = nfs4_write },
+ VOPNAME_IOCTL, { .vop_ioctl = nfs4_ioctl },
+ VOPNAME_GETATTR, { .vop_getattr = nfs4_getattr },
+ VOPNAME_SETATTR, { .vop_setattr = nfs4_setattr },
+ VOPNAME_ACCESS, { .vop_access = nfs4_access },
+ VOPNAME_LOOKUP, { .vop_lookup = nfs4_lookup },
+ VOPNAME_CREATE, { .vop_create = nfs4_create },
+ VOPNAME_REMOVE, { .vop_remove = nfs4_remove },
+ VOPNAME_LINK, { .vop_link = nfs4_link },
+ VOPNAME_RENAME, { .vop_rename = nfs4_rename },
+ VOPNAME_MKDIR, { .vop_mkdir = nfs4_mkdir },
+ VOPNAME_RMDIR, { .vop_rmdir = nfs4_rmdir },
+ VOPNAME_READDIR, { .vop_readdir = nfs4_readdir },
+ VOPNAME_SYMLINK, { .vop_symlink = nfs4_symlink },
+ VOPNAME_READLINK, { .vop_readlink = nfs4_readlink },
+ VOPNAME_FSYNC, { .vop_fsync = nfs4_fsync },
+ VOPNAME_INACTIVE, { .vop_inactive = nfs4_inactive },
+ VOPNAME_FID, { .vop_fid = nfs4_fid },
+ VOPNAME_RWLOCK, { .vop_rwlock = nfs4_rwlock },
+ VOPNAME_RWUNLOCK, { .vop_rwunlock = nfs4_rwunlock },
+ VOPNAME_SEEK, { .vop_seek = nfs4_seek },
+ VOPNAME_FRLOCK, { .vop_frlock = nfs4_frlock },
+ VOPNAME_SPACE, { .vop_space = nfs4_space },
+ VOPNAME_REALVP, { .vop_realvp = nfs4_realvp },
+ VOPNAME_GETPAGE, { .vop_getpage = nfs4_getpage },
+ VOPNAME_PUTPAGE, { .vop_putpage = nfs4_putpage },
+ VOPNAME_MAP, { .vop_map = nfs4_map },
+ VOPNAME_ADDMAP, { .vop_addmap = nfs4_addmap },
+ VOPNAME_DELMAP, { .vop_delmap = nfs4_delmap },
+ /* no separate nfs4_dump */
+ VOPNAME_DUMP, { .vop_dump = nfs_dump },
+ VOPNAME_PATHCONF, { .vop_pathconf = nfs4_pathconf },
+ VOPNAME_PAGEIO, { .vop_pageio = nfs4_pageio },
+ VOPNAME_DISPOSE, { .vop_dispose = nfs4_dispose },
+ VOPNAME_SETSECATTR, { .vop_setsecattr = nfs4_setsecattr },
+ VOPNAME_GETSECATTR, { .vop_getsecattr = nfs4_getsecattr },
+ VOPNAME_SHRLOCK, { .vop_shrlock = nfs4_shrlock },
+ NULL, NULL
};
/*
diff --git a/usr/src/uts/common/fs/nfs/nfs_common.c b/usr/src/uts/common/fs/nfs/nfs_common.c
index 3d3eecd82a..ded7c5075c 100644
--- a/usr/src/uts/common/fs/nfs/nfs_common.c
+++ b/usr/src/uts/common/fs/nfs/nfs_common.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -38,6 +38,7 @@
#include <sys/time.h>
#include <sys/utsname.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/vnode.h>
#include <sys/pathname.h>
#include <sys/bootconf.h>
@@ -336,7 +337,7 @@ static int
nfsdyninit(int fstyp, char *name)
{
static const fs_operation_def_t nfsdyn_vfsops_template[] = {
- VFSNAME_MOUNTROOT, nfsdyn_mountroot,
+ VFSNAME_MOUNTROOT, { .vfs_mountroot = nfsdyn_mountroot },
NULL, NULL
};
int error;
diff --git a/usr/src/uts/common/fs/nfs/nfs_vfsops.c b/usr/src/uts/common/fs/nfs/nfs_vfsops.c
index 5b16b20228..e6c3a4f7c4 100644
--- a/usr/src/uts/common/fs/nfs/nfs_vfsops.c
+++ b/usr/src/uts/common/fs/nfs/nfs_vfsops.c
@@ -33,6 +33,7 @@
#include <sys/systm.h>
#include <sys/cred.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/vnode.h>
#include <sys/pathname.h>
#include <sys/sysmacros.h>
@@ -157,15 +158,15 @@ int
nfsinit(int fstyp, char *name)
{
static const fs_operation_def_t nfs_vfsops_template[] = {
- VFSNAME_MOUNT, nfs_mount,
- VFSNAME_UNMOUNT, nfs_unmount,
- VFSNAME_ROOT, nfs_root,
- VFSNAME_STATVFS, nfs_statvfs,
- VFSNAME_SYNC, (fs_generic_func_p) nfs_sync,
- VFSNAME_VGET, nfs_vget,
- VFSNAME_MOUNTROOT, nfs_mountroot,
- VFSNAME_FREEVFS, (fs_generic_func_p)nfs_freevfs,
- NULL, NULL
+ VFSNAME_MOUNT, { .vfs_mount = nfs_mount },
+ VFSNAME_UNMOUNT, { .vfs_unmount = nfs_unmount },
+ VFSNAME_ROOT, { .vfs_root = nfs_root },
+ VFSNAME_STATVFS, { .vfs_statvfs = nfs_statvfs },
+ VFSNAME_SYNC, { .vfs_sync = nfs_sync },
+ VFSNAME_VGET, { .vfs_vget = nfs_vget },
+ VFSNAME_MOUNTROOT, { .vfs_mountroot = nfs_mountroot },
+ VFSNAME_FREEVFS, { .vfs_freevfs = nfs_freevfs },
+ NULL, NULL
};
int error;
diff --git a/usr/src/uts/common/fs/nfs/nfs_vnops.c b/usr/src/uts/common/fs/nfs/nfs_vnops.c
index 583ce42473..5e587027d7 100644
--- a/usr/src/uts/common/fs/nfs/nfs_vnops.c
+++ b/usr/src/uts/common/fs/nfs/nfs_vnops.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* Copyright (c) 1983,1984,1985,1986,1987,1988,1989 AT&T.
@@ -35,6 +35,7 @@
#include <sys/time.h>
#include <sys/vnode.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/file.h>
#include <sys/filio.h>
#include <sys/uio.h>
@@ -179,45 +180,45 @@ static int nfs_shrlock(vnode_t *, int, struct shrlock *, int, cred_t *);
struct vnodeops *nfs_vnodeops;
const fs_operation_def_t nfs_vnodeops_template[] = {
- VOPNAME_OPEN, nfs_open,
- VOPNAME_CLOSE, nfs_close,
- VOPNAME_READ, nfs_read,
- VOPNAME_WRITE, nfs_write,
- VOPNAME_IOCTL, nfs_ioctl,
- VOPNAME_GETATTR, nfs_getattr,
- VOPNAME_SETATTR, nfs_setattr,
- VOPNAME_ACCESS, nfs_access,
- VOPNAME_LOOKUP, nfs_lookup,
- VOPNAME_CREATE, nfs_create,
- VOPNAME_REMOVE, nfs_remove,
- VOPNAME_LINK, nfs_link,
- VOPNAME_RENAME, nfs_rename,
- VOPNAME_MKDIR, nfs_mkdir,
- VOPNAME_RMDIR, nfs_rmdir,
- VOPNAME_READDIR, nfs_readdir,
- VOPNAME_SYMLINK, nfs_symlink,
- VOPNAME_READLINK, nfs_readlink,
- VOPNAME_FSYNC, nfs_fsync,
- VOPNAME_INACTIVE, (fs_generic_func_p) nfs_inactive,
- VOPNAME_FID, nfs_fid,
- VOPNAME_RWLOCK, nfs_rwlock,
- VOPNAME_RWUNLOCK, (fs_generic_func_p) nfs_rwunlock,
- VOPNAME_SEEK, nfs_seek,
- VOPNAME_FRLOCK, nfs_frlock,
- VOPNAME_SPACE, nfs_space,
- VOPNAME_REALVP, nfs_realvp,
- VOPNAME_GETPAGE, nfs_getpage,
- VOPNAME_PUTPAGE, nfs_putpage,
- VOPNAME_MAP, (fs_generic_func_p) nfs_map,
- VOPNAME_ADDMAP, (fs_generic_func_p) nfs_addmap,
- VOPNAME_DELMAP, nfs_delmap,
- VOPNAME_DUMP, nfs_dump,
- VOPNAME_PATHCONF, nfs_pathconf,
- VOPNAME_PAGEIO, nfs_pageio,
- VOPNAME_SETSECATTR, nfs_setsecattr,
- VOPNAME_GETSECATTR, nfs_getsecattr,
- VOPNAME_SHRLOCK, nfs_shrlock,
- NULL, NULL
+ VOPNAME_OPEN, { .vop_open = nfs_open },
+ VOPNAME_CLOSE, { .vop_close = nfs_close },
+ VOPNAME_READ, { .vop_read = nfs_read },
+ VOPNAME_WRITE, { .vop_write = nfs_write },
+ VOPNAME_IOCTL, { .vop_ioctl = nfs_ioctl },
+ VOPNAME_GETATTR, { .vop_getattr = nfs_getattr },
+ VOPNAME_SETATTR, { .vop_setattr = nfs_setattr },
+ VOPNAME_ACCESS, { .vop_access = nfs_access },
+ VOPNAME_LOOKUP, { .vop_lookup = nfs_lookup },
+ VOPNAME_CREATE, { .vop_create = nfs_create },
+ VOPNAME_REMOVE, { .vop_remove = nfs_remove },
+ VOPNAME_LINK, { .vop_link = nfs_link },
+ VOPNAME_RENAME, { .vop_rename = nfs_rename },
+ VOPNAME_MKDIR, { .vop_mkdir = nfs_mkdir },
+ VOPNAME_RMDIR, { .vop_rmdir = nfs_rmdir },
+ VOPNAME_READDIR, { .vop_readdir = nfs_readdir },
+ VOPNAME_SYMLINK, { .vop_symlink = nfs_symlink },
+ VOPNAME_READLINK, { .vop_readlink = nfs_readlink },
+ VOPNAME_FSYNC, { .vop_fsync = nfs_fsync },
+ VOPNAME_INACTIVE, { .vop_inactive = nfs_inactive },
+ VOPNAME_FID, { .vop_fid = nfs_fid },
+ VOPNAME_RWLOCK, { .vop_rwlock = nfs_rwlock },
+ VOPNAME_RWUNLOCK, { .vop_rwunlock = nfs_rwunlock },
+ VOPNAME_SEEK, { .vop_seek = nfs_seek },
+ VOPNAME_FRLOCK, { .vop_frlock = nfs_frlock },
+ VOPNAME_SPACE, { .vop_space = nfs_space },
+ VOPNAME_REALVP, { .vop_realvp = nfs_realvp },
+ VOPNAME_GETPAGE, { .vop_getpage = nfs_getpage },
+ VOPNAME_PUTPAGE, { .vop_putpage = nfs_putpage },
+ VOPNAME_MAP, { .vop_map = nfs_map },
+ VOPNAME_ADDMAP, { .vop_addmap = nfs_addmap },
+ VOPNAME_DELMAP, { .vop_delmap = nfs_delmap },
+ VOPNAME_DUMP, { .vop_dump = nfs_dump },
+ VOPNAME_PATHCONF, { .vop_pathconf = nfs_pathconf },
+ VOPNAME_PAGEIO, { .vop_pageio = nfs_pageio },
+ VOPNAME_SETSECATTR, { .vop_setsecattr = nfs_setsecattr },
+ VOPNAME_GETSECATTR, { .vop_getsecattr = nfs_getsecattr },
+ VOPNAME_SHRLOCK, { .vop_shrlock = nfs_shrlock },
+ NULL, NULL
};
/*
diff --git a/usr/src/uts/common/fs/objfs/objfs_data.c b/usr/src/uts/common/fs/objfs/objfs_data.c
index 8f26850a47..4e050112fb 100644
--- a/usr/src/uts/common/fs/objfs/objfs_data.c
+++ b/usr/src/uts/common/fs/objfs/objfs_data.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -38,6 +37,7 @@
#include <sys/stat.h>
#include <sys/systm.h>
#include <sys/sysmacros.h>
+#include <sys/vfs_opreg.h>
/*
* /system/object/<obj>/object
@@ -751,14 +751,14 @@ objfs_data_seek(vnode_t *vp, offset_t off, offset_t *offp)
}
const fs_operation_def_t objfs_tops_data[] = {
- { VOPNAME_OPEN, objfs_data_open },
- { VOPNAME_CLOSE, objfs_common_close },
- { VOPNAME_IOCTL, fs_inval },
- { VOPNAME_GETATTR, objfs_data_getattr },
- { VOPNAME_ACCESS, objfs_data_access },
- { VOPNAME_INACTIVE, (fs_generic_func_p) gfs_vop_inactive },
- { VOPNAME_READ, objfs_data_read },
- { VOPNAME_SEEK, objfs_data_seek },
- { VOPNAME_MAP, (fs_generic_func_p) gfs_vop_map },
+ { VOPNAME_OPEN, { .vop_open = objfs_data_open } },
+ { VOPNAME_CLOSE, { .vop_close = objfs_common_close } },
+ { VOPNAME_IOCTL, { .error = fs_inval } },
+ { VOPNAME_GETATTR, { .vop_getattr = objfs_data_getattr } },
+ { VOPNAME_ACCESS, { .vop_access = objfs_data_access } },
+ { VOPNAME_INACTIVE, { .vop_inactive = gfs_vop_inactive } },
+ { VOPNAME_READ, { .vop_read = objfs_data_read } },
+ { VOPNAME_SEEK, { .vop_seek = objfs_data_seek } },
+ { VOPNAME_MAP, { .vop_map = gfs_vop_map } },
{ NULL }
};
diff --git a/usr/src/uts/common/fs/objfs/objfs_odir.c b/usr/src/uts/common/fs/objfs/objfs_odir.c
index 500957933a..a7ef0ed502 100644
--- a/usr/src/uts/common/fs/objfs/objfs_odir.c
+++ b/usr/src/uts/common/fs/objfs/objfs_odir.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -32,6 +31,7 @@
#include <sys/modctl.h>
#include <sys/objfs.h>
#include <sys/objfs_impl.h>
+#include <sys/vfs_opreg.h>
#include <sys/stat.h>
static gfs_dirent_t objfs_odir_entries[] = {
@@ -78,14 +78,14 @@ objfs_odir_getattr(vnode_t *vp, vattr_t *vap, int flags, cred_t *cr)
}
const fs_operation_def_t objfs_tops_odir[] = {
- { VOPNAME_OPEN, objfs_dir_open },
- { VOPNAME_CLOSE, objfs_common_close },
- { VOPNAME_IOCTL, fs_inval },
- { VOPNAME_GETATTR, objfs_odir_getattr },
- { VOPNAME_ACCESS, objfs_dir_access },
- { VOPNAME_READDIR, gfs_vop_readdir },
- { VOPNAME_LOOKUP, gfs_vop_lookup },
- { VOPNAME_SEEK, fs_seek },
- { VOPNAME_INACTIVE, (fs_generic_func_p) gfs_vop_inactive },
+ { VOPNAME_OPEN, { .vop_open = objfs_dir_open } },
+ { VOPNAME_CLOSE, { .vop_close = objfs_common_close } },
+ { VOPNAME_IOCTL, { .error = fs_inval } },
+ { VOPNAME_GETATTR, { .vop_getattr = objfs_odir_getattr } },
+ { VOPNAME_ACCESS, { .vop_access = objfs_dir_access } },
+ { VOPNAME_READDIR, { .vop_readdir = gfs_vop_readdir } },
+ { VOPNAME_LOOKUP, { .vop_lookup = gfs_vop_lookup } },
+ { VOPNAME_SEEK, { .vop_seek = fs_seek } },
+ { VOPNAME_INACTIVE, { .vop_inactive = gfs_vop_inactive } },
{ NULL }
};
diff --git a/usr/src/uts/common/fs/objfs/objfs_root.c b/usr/src/uts/common/fs/objfs/objfs_root.c
index 5c83f1e8dc..1e9bb8c1f0 100644
--- a/usr/src/uts/common/fs/objfs/objfs_root.c
+++ b/usr/src/uts/common/fs/objfs/objfs_root.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -34,6 +33,7 @@
#include <sys/modctl.h>
#include <sys/objfs.h>
#include <sys/objfs_impl.h>
+#include <sys/vfs_opreg.h>
#include <sys/systm.h>
extern int last_module_id;
@@ -156,14 +156,14 @@ objfs_root_readdir(vnode_t *vp, uio_t *uiop, cred_t *cr, int *eofp)
}
const fs_operation_def_t objfs_tops_root[] = {
- { VOPNAME_OPEN, objfs_dir_open },
- { VOPNAME_CLOSE, objfs_common_close },
- { VOPNAME_IOCTL, fs_inval },
- { VOPNAME_GETATTR, objfs_root_getattr },
- { VOPNAME_ACCESS, objfs_dir_access },
- { VOPNAME_READDIR, objfs_root_readdir },
- { VOPNAME_LOOKUP, gfs_vop_lookup },
- { VOPNAME_SEEK, fs_seek },
- { VOPNAME_INACTIVE, (fs_generic_func_p)gfs_vop_inactive },
+ { VOPNAME_OPEN, { .vop_open = objfs_dir_open } },
+ { VOPNAME_CLOSE, { .vop_close = objfs_common_close } },
+ { VOPNAME_IOCTL, { .error = fs_inval } },
+ { VOPNAME_GETATTR, { .vop_getattr = objfs_root_getattr } },
+ { VOPNAME_ACCESS, { .vop_access = objfs_dir_access } },
+ { VOPNAME_READDIR, { .vop_readdir = objfs_root_readdir } },
+ { VOPNAME_LOOKUP, { .vop_lookup = gfs_vop_lookup } },
+ { VOPNAME_SEEK, { .vop_seek = fs_seek } },
+ { VOPNAME_INACTIVE, { .vop_inactive = gfs_vop_inactive } },
{ NULL }
};
diff --git a/usr/src/uts/common/fs/objfs/objfs_vfs.c b/usr/src/uts/common/fs/objfs/objfs_vfs.c
index 77f5b6a5ef..0ee0b0a577 100644
--- a/usr/src/uts/common/fs/objfs/objfs_vfs.c
+++ b/usr/src/uts/common/fs/objfs/objfs_vfs.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -32,6 +31,7 @@
#include <sys/mount.h>
#include <sys/objfs.h>
#include <sys/objfs_impl.h>
+#include <sys/vfs_opreg.h>
#include <sys/policy.h>
#include <sys/sunddi.h>
#include <sys/sysmacros.h>
@@ -267,9 +267,9 @@ objfs_statvfs(vfs_t *vfsp, statvfs64_t *sp)
}
static const fs_operation_def_t objfs_vfstops[] = {
- { VFSNAME_MOUNT, objfs_mount },
- { VFSNAME_UNMOUNT, objfs_unmount },
- { VFSNAME_ROOT, objfs_root },
- { VFSNAME_STATVFS, objfs_statvfs },
+ { VFSNAME_MOUNT, { .vfs_mount = objfs_mount } },
+ { VFSNAME_UNMOUNT, { .vfs_unmount = objfs_unmount } },
+ { VFSNAME_ROOT, { .vfs_root = objfs_root } },
+ { VFSNAME_STATVFS, { .vfs_statvfs = objfs_statvfs } },
{ NULL }
};
diff --git a/usr/src/uts/common/fs/pcfs/pc_vfsops.c b/usr/src/uts/common/fs/pcfs/pc_vfsops.c
index 56a266b60b..98d98e04d9 100644
--- a/usr/src/uts/common/fs/pcfs/pc_vfsops.c
+++ b/usr/src/uts/common/fs/pcfs/pc_vfsops.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -34,6 +34,7 @@
#include <sys/disp.h>
#include <sys/buf.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/vnode.h>
#include <sys/fdio.h>
#include <sys/file.h>
@@ -225,14 +226,14 @@ static int
pcfsinit(int fstype, char *name)
{
static const fs_operation_def_t pcfs_vfsops_template[] = {
- VFSNAME_MOUNT, pcfs_mount,
- VFSNAME_UNMOUNT, pcfs_unmount,
- VFSNAME_ROOT, pcfs_root,
- VFSNAME_STATVFS, pcfs_statvfs,
- VFSNAME_SYNC, (fs_generic_func_p) pcfs_sync,
- VFSNAME_VGET, pcfs_vget,
- VFSNAME_FREEVFS, (fs_generic_func_p) pcfs_freevfs,
- NULL, NULL
+ VFSNAME_MOUNT, { .vfs_mount = pcfs_mount },
+ VFSNAME_UNMOUNT, { .vfs_unmount = pcfs_unmount },
+ VFSNAME_ROOT, { .vfs_root = pcfs_root },
+ VFSNAME_STATVFS, { .vfs_statvfs = pcfs_statvfs },
+ VFSNAME_SYNC, { .vfs_sync = pcfs_sync },
+ VFSNAME_VGET, { .vfs_vget = pcfs_vget },
+ VFSNAME_FREEVFS, { .vfs_freevfs = pcfs_freevfs },
+ NULL, NULL
};
int error;
diff --git a/usr/src/uts/common/fs/pcfs/pc_vnops.c b/usr/src/uts/common/fs/pcfs/pc_vnops.c
index 46d583d910..a2b3d730dd 100644
--- a/usr/src/uts/common/fs/pcfs/pc_vnops.c
+++ b/usr/src/uts/common/fs/pcfs/pc_vnops.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -33,6 +33,7 @@
#include <sys/buf.h>
#include <sys/stat.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/dirent.h>
#include <sys/vnode.h>
#include <sys/proc.h>
@@ -123,48 +124,48 @@ struct vnodeops *pcfs_fvnodeops;
struct vnodeops *pcfs_dvnodeops;
const fs_operation_def_t pcfs_fvnodeops_template[] = {
- VOPNAME_OPEN, pcfs_open,
- VOPNAME_CLOSE, pcfs_close,
- VOPNAME_READ, pcfs_read,
- VOPNAME_WRITE, pcfs_write,
- VOPNAME_GETATTR, pcfs_getattr,
- VOPNAME_SETATTR, pcfs_setattr,
- VOPNAME_ACCESS, pcfs_access,
- VOPNAME_FSYNC, pcfs_fsync,
- VOPNAME_INACTIVE, (fs_generic_func_p) pcfs_inactive,
- VOPNAME_FID, pcfs_fid,
- VOPNAME_SEEK, pcfs_seek,
- VOPNAME_SPACE, pcfs_space,
- VOPNAME_GETPAGE, pcfs_getpage,
- VOPNAME_PUTPAGE, pcfs_putpage,
- VOPNAME_MAP, (fs_generic_func_p) pcfs_map,
- VOPNAME_ADDMAP, (fs_generic_func_p) pcfs_addmap,
- VOPNAME_DELMAP, pcfs_delmap,
- VOPNAME_PATHCONF, pcfs_pathconf,
- VOPNAME_VNEVENT, fs_vnevent_support,
- NULL, NULL
+ VOPNAME_OPEN, { .vop_open = pcfs_open },
+ VOPNAME_CLOSE, { .vop_close = pcfs_close },
+ VOPNAME_READ, { .vop_read = pcfs_read },
+ VOPNAME_WRITE, { .vop_write = pcfs_write },
+ VOPNAME_GETATTR, { .vop_getattr = pcfs_getattr },
+ VOPNAME_SETATTR, { .vop_setattr = pcfs_setattr },
+ VOPNAME_ACCESS, { .vop_access = pcfs_access },
+ VOPNAME_FSYNC, { .vop_fsync = pcfs_fsync },
+ VOPNAME_INACTIVE, { .vop_inactive = pcfs_inactive },
+ VOPNAME_FID, { .vop_fid = pcfs_fid },
+ VOPNAME_SEEK, { .vop_seek = pcfs_seek },
+ VOPNAME_SPACE, { .vop_space = pcfs_space },
+ VOPNAME_GETPAGE, { .vop_getpage = pcfs_getpage },
+ VOPNAME_PUTPAGE, { .vop_putpage = pcfs_putpage },
+ VOPNAME_MAP, { .vop_map = pcfs_map },
+ VOPNAME_ADDMAP, { .vop_addmap = pcfs_addmap },
+ VOPNAME_DELMAP, { .vop_delmap = pcfs_delmap },
+ VOPNAME_PATHCONF, { .vop_pathconf = pcfs_pathconf },
+ VOPNAME_VNEVENT, { .vop_vnevent = fs_vnevent_support },
+ NULL, NULL
};
const fs_operation_def_t pcfs_dvnodeops_template[] = {
- VOPNAME_OPEN, pcfs_open,
- VOPNAME_CLOSE, pcfs_close,
- VOPNAME_GETATTR, pcfs_getattr,
- VOPNAME_SETATTR, pcfs_setattr,
- VOPNAME_ACCESS, pcfs_access,
- VOPNAME_LOOKUP, pcfs_lookup,
- VOPNAME_CREATE, pcfs_create,
- VOPNAME_REMOVE, pcfs_remove,
- VOPNAME_RENAME, pcfs_rename,
- VOPNAME_MKDIR, pcfs_mkdir,
- VOPNAME_RMDIR, pcfs_rmdir,
- VOPNAME_READDIR, pcfs_readdir,
- VOPNAME_FSYNC, pcfs_fsync,
- VOPNAME_INACTIVE, (fs_generic_func_p) pcfs_inactive,
- VOPNAME_FID, pcfs_fid,
- VOPNAME_SEEK, pcfs_seek,
- VOPNAME_PATHCONF, pcfs_pathconf,
- VOPNAME_VNEVENT, fs_vnevent_support,
- NULL, NULL
+ VOPNAME_OPEN, { .vop_open = pcfs_open },
+ VOPNAME_CLOSE, { .vop_close = pcfs_close },
+ VOPNAME_GETATTR, { .vop_getattr = pcfs_getattr },
+ VOPNAME_SETATTR, { .vop_setattr = pcfs_setattr },
+ VOPNAME_ACCESS, { .vop_access = pcfs_access },
+ VOPNAME_LOOKUP, { .vop_lookup = pcfs_lookup },
+ VOPNAME_CREATE, { .vop_create = pcfs_create },
+ VOPNAME_REMOVE, { .vop_remove = pcfs_remove },
+ VOPNAME_RENAME, { .vop_rename = pcfs_rename },
+ VOPNAME_MKDIR, { .vop_mkdir = pcfs_mkdir },
+ VOPNAME_RMDIR, { .vop_rmdir = pcfs_rmdir },
+ VOPNAME_READDIR, { .vop_readdir = pcfs_readdir },
+ VOPNAME_FSYNC, { .vop_fsync = pcfs_fsync },
+ VOPNAME_INACTIVE, { .vop_inactive = pcfs_inactive },
+ VOPNAME_FID, { .vop_fid = pcfs_fid },
+ VOPNAME_SEEK, { .vop_seek = pcfs_seek },
+ VOPNAME_PATHCONF, { .vop_pathconf = pcfs_pathconf },
+ VOPNAME_VNEVENT, { .vop_vnevent = fs_vnevent_support },
+ NULL, NULL
};
diff --git a/usr/src/uts/common/fs/portfs/port.c b/usr/src/uts/common/fs/portfs/port.c
index 0c657b220a..a331eaea5b 100644
--- a/usr/src/uts/common/fs/portfs/port.c
+++ b/usr/src/uts/common/fs/portfs/port.c
@@ -31,6 +31,7 @@
#include <sys/cred.h>
#include <sys/modctl.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/sysmacros.h>
#include <sys/cmn_err.h>
#include <sys/stat.h>
diff --git a/usr/src/uts/common/fs/portfs/port_vnops.c b/usr/src/uts/common/fs/portfs/port_vnops.c
index 14f3a60aa6..aa8bc952d2 100644
--- a/usr/src/uts/common/fs/portfs/port_vnops.c
+++ b/usr/src/uts/common/fs/portfs/port_vnops.c
@@ -20,7 +20,7 @@
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -28,6 +28,7 @@
#include <sys/types.h>
#include <sys/vnode.h>
+#include <sys/vfs_opreg.h>
#include <sys/kmem.h>
#include <fs/fs_subr.h>
#include <sys/proc.h>
@@ -44,19 +45,19 @@ static int port_poll(vnode_t *, short, int, short *, struct pollhead **);
static void port_inactive(struct vnode *, cred_t *);
const fs_operation_def_t port_vnodeops_template[] = {
- VOPNAME_OPEN, port_open,
- VOPNAME_CLOSE, port_close,
- VOPNAME_GETATTR, port_getattr,
- VOPNAME_ACCESS, port_access,
- VOPNAME_INACTIVE, (fs_generic_func_p) port_inactive,
- VOPNAME_FRLOCK, fs_error,
- VOPNAME_REALVP, port_realvp,
- VOPNAME_POLL, (fs_generic_func_p) port_poll,
- VOPNAME_PATHCONF, fs_error,
- VOPNAME_DISPOSE, fs_error,
- VOPNAME_GETSECATTR, fs_error,
- VOPNAME_SHRLOCK, fs_error,
- NULL, NULL
+ VOPNAME_OPEN, { .vop_open = port_open },
+ VOPNAME_CLOSE, { .vop_close = port_close },
+ VOPNAME_GETATTR, { .vop_getattr = port_getattr },
+ VOPNAME_ACCESS, { .vop_access = port_access },
+ VOPNAME_INACTIVE, { .vop_inactive = port_inactive },
+ VOPNAME_FRLOCK, { .error = fs_error },
+ VOPNAME_REALVP, { .vop_realvp = port_realvp },
+ VOPNAME_POLL, { .vop_poll = port_poll },
+ VOPNAME_PATHCONF, { .error = fs_error },
+ VOPNAME_DISPOSE, { .error = fs_error },
+ VOPNAME_GETSECATTR, { .error = fs_error },
+ VOPNAME_SHRLOCK, { .error = fs_error },
+ NULL, NULL
};
/* ARGSUSED */
diff --git a/usr/src/uts/common/fs/proc/prvfsops.c b/usr/src/uts/common/fs/proc/prvfsops.c
index 8f2d079feb..35d829facd 100644
--- a/usr/src/uts/common/fs/proc/prvfsops.c
+++ b/usr/src/uts/common/fs/proc/prvfsops.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -44,6 +44,7 @@
#include <sys/zone.h>
#include <sys/var.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/vnode.h>
#include <sys/mode.h>
#include <sys/signal.h>
@@ -143,11 +144,11 @@ static int
prinit(int fstype, char *name)
{
static const fs_operation_def_t pr_vfsops_template[] = {
- VFSNAME_MOUNT, prmount,
- VFSNAME_UNMOUNT, prunmount,
- VFSNAME_ROOT, prroot,
- VFSNAME_STATVFS, prstatvfs,
- NULL, NULL
+ VFSNAME_MOUNT, { .vfs_mount = prmount },
+ VFSNAME_UNMOUNT, { .vfs_unmount = prunmount },
+ VFSNAME_ROOT, { .vfs_root = prroot },
+ VFSNAME_STATVFS, { .vfs_statvfs = prstatvfs },
+ NULL, NULL
};
extern const fs_operation_def_t pr_vnodeops_template[];
int error;
diff --git a/usr/src/uts/common/fs/proc/prvnops.c b/usr/src/uts/common/fs/proc/prvnops.c
index 3f15bb084f..a8be6c151d 100644
--- a/usr/src/uts/common/fs/proc/prvnops.c
+++ b/usr/src/uts/common/fs/proc/prvnops.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -53,6 +53,7 @@
#include <sys/poll.h>
#include <sys/user.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/gfs.h>
#include <sys/vnode.h>
#include <sys/fault.h>
@@ -5927,25 +5928,25 @@ extern int prioctl(vnode_t *, int, intptr_t, int, cred_t *, int *);
* /proc vnode operations vector
*/
const fs_operation_def_t pr_vnodeops_template[] = {
- VOPNAME_OPEN, propen,
- VOPNAME_CLOSE, prclose,
- VOPNAME_READ, prread,
- VOPNAME_WRITE, prwrite,
- VOPNAME_IOCTL, prioctl,
- VOPNAME_GETATTR, prgetattr,
- VOPNAME_ACCESS, praccess,
- VOPNAME_LOOKUP, prlookup,
- VOPNAME_CREATE, prcreate,
- VOPNAME_READDIR, prreaddir,
- VOPNAME_READLINK, prreadlink,
- VOPNAME_FSYNC, prfsync,
- VOPNAME_INACTIVE, (fs_generic_func_p) prinactive,
- VOPNAME_SEEK, prseek,
- VOPNAME_CMP, prcmp,
- VOPNAME_FRLOCK, fs_error,
- VOPNAME_REALVP, prrealvp,
- VOPNAME_POLL, (fs_generic_func_p) prpoll,
- VOPNAME_DISPOSE, fs_error,
- VOPNAME_SHRLOCK, fs_error,
- NULL, NULL
+ VOPNAME_OPEN, { .vop_open = propen },
+ VOPNAME_CLOSE, { .vop_close = prclose },
+ VOPNAME_READ, { .vop_read = prread },
+ VOPNAME_WRITE, { .vop_write = prwrite },
+ VOPNAME_IOCTL, { .vop_ioctl = prioctl },
+ VOPNAME_GETATTR, { .vop_getattr = prgetattr },
+ VOPNAME_ACCESS, { .vop_access = praccess },
+ VOPNAME_LOOKUP, { .vop_lookup = prlookup },
+ VOPNAME_CREATE, { .vop_create = prcreate },
+ VOPNAME_READDIR, { .vop_readdir = prreaddir },
+ VOPNAME_READLINK, { .vop_readlink = prreadlink },
+ VOPNAME_FSYNC, { .vop_fsync = prfsync },
+ VOPNAME_INACTIVE, { .vop_inactive = prinactive },
+ VOPNAME_SEEK, { .vop_seek = prseek },
+ VOPNAME_CMP, { .vop_cmp = prcmp },
+ VOPNAME_FRLOCK, { .error = fs_error },
+ VOPNAME_REALVP, { .vop_realvp = prrealvp },
+ VOPNAME_POLL, { .vop_poll = prpoll },
+ VOPNAME_DISPOSE, { .error = fs_error },
+ VOPNAME_SHRLOCK, { .error = fs_error },
+ NULL, NULL
};
diff --git a/usr/src/uts/common/fs/sockfs/socksctp.c b/usr/src/uts/common/fs/sockfs/socksctp.c
index 4a8b57b2da..d50f143523 100644
--- a/usr/src/uts/common/fs/sockfs/socksctp.c
+++ b/usr/src/uts/common/fs/sockfs/socksctp.c
@@ -32,6 +32,7 @@
#include <sys/systm.h>
#include <sys/buf.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/vnode.h>
#include <sys/debug.h>
#include <sys/errno.h>
diff --git a/usr/src/uts/common/fs/sockfs/socksctpsubr.c b/usr/src/uts/common/fs/sockfs/socksctpsubr.c
index c0f492fb61..11da6b7b1d 100644
--- a/usr/src/uts/common/fs/sockfs/socksctpsubr.c
+++ b/usr/src/uts/common/fs/sockfs/socksctpsubr.c
@@ -20,7 +20,7 @@
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -37,6 +37,7 @@
#include <sys/sysmacros.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/socket.h>
#include <sys/socketvar.h>
diff --git a/usr/src/uts/common/fs/sockfs/socksctpvnops.c b/usr/src/uts/common/fs/sockfs/socksctpvnops.c
index 0adb375b15..ea3c49ce6e 100644
--- a/usr/src/uts/common/fs/sockfs/socksctpvnops.c
+++ b/usr/src/uts/common/fs/sockfs/socksctpvnops.c
@@ -35,6 +35,7 @@
#include <sys/errno.h>
#include <sys/uio.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/vnode.h>
#include <sys/stropts.h>
#include <sys/cmn_err.h>
@@ -78,22 +79,22 @@ static int socksctpv_poll(struct vnode *, short, int, short *,
struct pollhead **);
const fs_operation_def_t socksctp_vnodeops_template[] = {
- VOPNAME_OPEN, socksctpv_open,
- VOPNAME_CLOSE, socksctpv_close,
- VOPNAME_READ, socksctpv_read,
- VOPNAME_WRITE, socksctpv_write,
- VOPNAME_IOCTL, socksctpv_ioctl,
- VOPNAME_SETFL, socksctp_setfl,
- VOPNAME_GETATTR, socktpi_getattr,
- VOPNAME_SETATTR, socktpi_setattr,
- VOPNAME_ACCESS, socktpi_access,
- VOPNAME_FSYNC, socktpi_fsync,
- VOPNAME_INACTIVE, (fs_generic_func_p) socksctpv_inactive,
- VOPNAME_FID, socktpi_fid,
- VOPNAME_SEEK, socktpi_seek,
- VOPNAME_POLL, (fs_generic_func_p) socksctpv_poll,
- VOPNAME_DISPOSE, fs_error,
- NULL, NULL
+ VOPNAME_OPEN, { .vop_open = socksctpv_open },
+ VOPNAME_CLOSE, { .vop_close = socksctpv_close },
+ VOPNAME_READ, { .vop_read = socksctpv_read },
+ VOPNAME_WRITE, { .vop_write = socksctpv_write },
+ VOPNAME_IOCTL, { .vop_ioctl = socksctpv_ioctl },
+ VOPNAME_SETFL, { .vop_setfl = socksctp_setfl },
+ VOPNAME_GETATTR, { .vop_getattr = socktpi_getattr },
+ VOPNAME_SETATTR, { .vop_setattr = socktpi_setattr },
+ VOPNAME_ACCESS, { .vop_access = socktpi_access },
+ VOPNAME_FSYNC, { .vop_fsync = socktpi_fsync },
+ VOPNAME_INACTIVE, { .vop_inactive = socksctpv_inactive },
+ VOPNAME_FID, { .vop_fid = socktpi_fid },
+ VOPNAME_SEEK, { .vop_seek = socktpi_seek },
+ VOPNAME_POLL, { .vop_poll = socksctpv_poll },
+ VOPNAME_DISPOSE, { .error = fs_error },
+ NULL, NULL
};
struct vnodeops *socksctp_vnodeops;
diff --git a/usr/src/uts/common/fs/sockfs/socksdp.c b/usr/src/uts/common/fs/sockfs/socksdp.c
index 197ff6997e..45f8713169 100755
--- a/usr/src/uts/common/fs/sockfs/socksdp.c
+++ b/usr/src/uts/common/fs/sockfs/socksdp.c
@@ -32,6 +32,7 @@
#include <sys/systm.h>
#include <sys/buf.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/vnode.h>
#include <sys/debug.h>
#include <sys/errno.h>
diff --git a/usr/src/uts/common/fs/sockfs/socksdpsubr.c b/usr/src/uts/common/fs/sockfs/socksdpsubr.c
index 6ae3c4d03d..42884fa4be 100755
--- a/usr/src/uts/common/fs/sockfs/socksdpsubr.c
+++ b/usr/src/uts/common/fs/sockfs/socksdpsubr.c
@@ -37,6 +37,7 @@
#include <sys/sysmacros.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/socket.h>
#include <sys/socketvar.h>
diff --git a/usr/src/uts/common/fs/sockfs/socksdpvnops.c b/usr/src/uts/common/fs/sockfs/socksdpvnops.c
index 6bdc83b20c..02cb7a07c1 100755
--- a/usr/src/uts/common/fs/sockfs/socksdpvnops.c
+++ b/usr/src/uts/common/fs/sockfs/socksdpvnops.c
@@ -35,6 +35,7 @@
#include <sys/errno.h>
#include <sys/uio.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/vnode.h>
#include <sys/stropts.h>
#include <sys/cmn_err.h>
@@ -77,22 +78,22 @@ static int socksdpv_poll(struct vnode *, short, int, short *,
struct pollhead **);
const fs_operation_def_t socksdp_vnodeops_template[] = {
- VOPNAME_OPEN, socksdpv_open,
- VOPNAME_CLOSE, socksdpv_close,
- VOPNAME_READ, socksdpv_read,
- VOPNAME_WRITE, socksdpv_write,
- VOPNAME_IOCTL, socksdpv_ioctl,
- VOPNAME_SETFL, socksdp_setfl,
- VOPNAME_GETATTR, socktpi_getattr,
- VOPNAME_SETATTR, socktpi_setattr,
- VOPNAME_ACCESS, socktpi_access,
- VOPNAME_FSYNC, socktpi_fsync,
- VOPNAME_INACTIVE, (fs_generic_func_p) socksdpv_inactive,
- VOPNAME_FID, socktpi_fid,
- VOPNAME_SEEK, socktpi_seek,
- VOPNAME_POLL, (fs_generic_func_p) socksdpv_poll,
- VOPNAME_DISPOSE, fs_error,
- NULL, NULL
+ VOPNAME_OPEN, { .vop_open = socksdpv_open },
+ VOPNAME_CLOSE, { .vop_close = socksdpv_close },
+ VOPNAME_READ, { .vop_read = socksdpv_read },
+ VOPNAME_WRITE, { .vop_write = socksdpv_write },
+ VOPNAME_IOCTL, { .vop_ioctl = socksdpv_ioctl },
+ VOPNAME_SETFL, { .vop_setfl = socksdp_setfl },
+ VOPNAME_GETATTR, { .vop_getattr = socktpi_getattr },
+ VOPNAME_SETATTR, { .vop_setattr = socktpi_setattr },
+ VOPNAME_ACCESS, { .vop_access = socktpi_access },
+ VOPNAME_FSYNC, { .vop_fsync = socktpi_fsync },
+ VOPNAME_INACTIVE, { .vop_inactive = socksdpv_inactive },
+ VOPNAME_FID, { .vop_fid = socktpi_fid },
+ VOPNAME_SEEK, { .vop_seek = socktpi_seek },
+ VOPNAME_POLL, { .vop_poll = socksdpv_poll },
+ VOPNAME_DISPOSE, { .error = fs_error },
+ NULL, NULL
};
struct vnodeops *socksdp_vnodeops;
diff --git a/usr/src/uts/common/fs/sockfs/socksubr.c b/usr/src/uts/common/fs/sockfs/socksubr.c
index f9f5eed188..ad90f21a36 100644
--- a/usr/src/uts/common/fs/sockfs/socksubr.c
+++ b/usr/src/uts/common/fs/sockfs/socksubr.c
@@ -36,6 +36,7 @@
#include <sys/kmem.h>
#include <sys/sysmacros.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/vnode.h>
#include <sys/debug.h>
#include <sys/errno.h>
diff --git a/usr/src/uts/common/fs/sockfs/sockvnops.c b/usr/src/uts/common/fs/sockfs/sockvnops.c
index 66224f437a..32b7f2d361 100644
--- a/usr/src/uts/common/fs/sockfs/sockvnops.c
+++ b/usr/src/uts/common/fs/sockfs/sockvnops.c
@@ -20,7 +20,7 @@
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -48,6 +48,7 @@
#include <sys/sysmacros.h>
#include <sys/uio.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/vnode.h>
#include <sys/poll.h>
#include <sys/stropts.h>
@@ -108,22 +109,22 @@ static int socktpi_poll(struct vnode *, short, int, short *,
struct vnodeops *socktpi_vnodeops;
const fs_operation_def_t socktpi_vnodeops_template[] = {
- VOPNAME_OPEN, socktpi_open,
- VOPNAME_CLOSE, socktpi_close,
- VOPNAME_READ, socktpi_read,
- VOPNAME_WRITE, socktpi_write,
- VOPNAME_IOCTL, socktpi_ioctl,
- VOPNAME_SETFL, socktpi_setfl,
- VOPNAME_GETATTR, socktpi_getattr,
- VOPNAME_SETATTR, socktpi_setattr,
- VOPNAME_ACCESS, socktpi_access,
- VOPNAME_FSYNC, socktpi_fsync,
- VOPNAME_INACTIVE, (fs_generic_func_p) socktpi_inactive,
- VOPNAME_FID, socktpi_fid,
- VOPNAME_SEEK, socktpi_seek,
- VOPNAME_POLL, (fs_generic_func_p) socktpi_poll,
- VOPNAME_DISPOSE, fs_error,
- NULL, NULL
+ VOPNAME_OPEN, { .vop_open = socktpi_open },
+ VOPNAME_CLOSE, { .vop_close = socktpi_close },
+ VOPNAME_READ, { .vop_read = socktpi_read },
+ VOPNAME_WRITE, { .vop_write = socktpi_write },
+ VOPNAME_IOCTL, { .vop_ioctl = socktpi_ioctl },
+ VOPNAME_SETFL, { .vop_setfl = socktpi_setfl },
+ VOPNAME_GETATTR, { .vop_getattr = socktpi_getattr },
+ VOPNAME_SETATTR, { .vop_setattr = socktpi_setattr },
+ VOPNAME_ACCESS, { .vop_access = socktpi_access },
+ VOPNAME_FSYNC, { .vop_fsync = socktpi_fsync },
+ VOPNAME_INACTIVE, { .vop_inactive = socktpi_inactive },
+ VOPNAME_FID, { .vop_fid = socktpi_fid },
+ VOPNAME_SEEK, { .vop_seek = socktpi_seek },
+ VOPNAME_POLL, { .vop_poll = socktpi_poll },
+ VOPNAME_DISPOSE, { .error = fs_error },
+ NULL, NULL
};
/*
diff --git a/usr/src/uts/common/fs/specfs/specsubr.c b/usr/src/uts/common/fs/specfs/specsubr.c
index eb1ef88eab..ea87c688d6 100644
--- a/usr/src/uts/common/fs/specfs/specsubr.c
+++ b/usr/src/uts/common/fs/specfs/specsubr.c
@@ -49,6 +49,7 @@
#include <sys/kmem.h>
#include <sys/sysmacros.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/vnode.h>
#include <sys/fs/snode.h>
#include <sys/fs/fifonode.h>
@@ -736,7 +737,7 @@ int
specinit(int fstype, char *name)
{
static const fs_operation_def_t spec_vfsops_template[] = {
- VFSNAME_SYNC, (fs_generic_func_p) spec_sync,
+ VFSNAME_SYNC, { .vfs_sync = spec_sync },
NULL, NULL
};
extern struct vnodeops *spec_vnodeops;
diff --git a/usr/src/uts/common/fs/specfs/specvnops.c b/usr/src/uts/common/fs/specfs/specvnops.c
index 610ae5a5ec..7f613ba824 100644
--- a/usr/src/uts/common/fs/specfs/specvnops.c
+++ b/usr/src/uts/common/fs/specfs/specvnops.c
@@ -63,6 +63,7 @@
#include <sys/sysmacros.h>
#include <sys/uio.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/vnode.h>
#include <sys/stat.h>
#include <sys/poll.h>
@@ -155,33 +156,33 @@ static int spec_pathconf(struct vnode *, int, ulong_t *, struct cred *);
struct vnodeops *spec_vnodeops;
const fs_operation_def_t spec_vnodeops_template[] = {
- VOPNAME_OPEN, spec_open,
- VOPNAME_CLOSE, spec_close,
- VOPNAME_READ, spec_read,
- VOPNAME_WRITE, spec_write,
- VOPNAME_IOCTL, spec_ioctl,
- VOPNAME_GETATTR, spec_getattr,
- VOPNAME_SETATTR, spec_setattr,
- VOPNAME_ACCESS, spec_access,
- VOPNAME_CREATE, spec_create,
- VOPNAME_FSYNC, spec_fsync,
- VOPNAME_INACTIVE, (fs_generic_func_p) spec_inactive,
- VOPNAME_FID, spec_fid,
- VOPNAME_SEEK, spec_seek,
- VOPNAME_PATHCONF, spec_pathconf,
- VOPNAME_FRLOCK, spec_frlock,
- VOPNAME_REALVP, spec_realvp,
- VOPNAME_GETPAGE, spec_getpage,
- VOPNAME_PUTPAGE, spec_putpage,
- VOPNAME_MAP, (fs_generic_func_p) spec_map,
- VOPNAME_ADDMAP, (fs_generic_func_p) spec_addmap,
- VOPNAME_DELMAP, spec_delmap,
- VOPNAME_POLL, (fs_generic_func_p) spec_poll,
- VOPNAME_DUMP, spec_dump,
- VOPNAME_PAGEIO, spec_pageio,
- VOPNAME_SETSECATTR, spec_setsecattr,
- VOPNAME_GETSECATTR, spec_getsecattr,
- NULL, NULL
+ VOPNAME_OPEN, { .vop_open = spec_open },
+ VOPNAME_CLOSE, { .vop_close = spec_close },
+ VOPNAME_READ, { .vop_read = spec_read },
+ VOPNAME_WRITE, { .vop_write = spec_write },
+ VOPNAME_IOCTL, { .vop_ioctl = spec_ioctl },
+ VOPNAME_GETATTR, { .vop_getattr = spec_getattr },
+ VOPNAME_SETATTR, { .vop_setattr = spec_setattr },
+ VOPNAME_ACCESS, { .vop_access = spec_access },
+ VOPNAME_CREATE, { .vop_create = spec_create },
+ VOPNAME_FSYNC, { .vop_fsync = spec_fsync },
+ VOPNAME_INACTIVE, { .vop_inactive = spec_inactive },
+ VOPNAME_FID, { .vop_fid = spec_fid },
+ VOPNAME_SEEK, { .vop_seek = spec_seek },
+ VOPNAME_PATHCONF, { .vop_pathconf = spec_pathconf },
+ VOPNAME_FRLOCK, { .vop_frlock = spec_frlock },
+ VOPNAME_REALVP, { .vop_realvp = spec_realvp },
+ VOPNAME_GETPAGE, { .vop_getpage = spec_getpage },
+ VOPNAME_PUTPAGE, { .vop_putpage = spec_putpage },
+ VOPNAME_MAP, { .vop_map = spec_map },
+ VOPNAME_ADDMAP, { .vop_addmap = spec_addmap },
+ VOPNAME_DELMAP, { .vop_delmap = spec_delmap },
+ VOPNAME_POLL, { .vop_poll = spec_poll },
+ VOPNAME_DUMP, { .vop_dump = spec_dump },
+ VOPNAME_PAGEIO, { .vop_pageio = spec_pageio },
+ VOPNAME_SETSECATTR, { .vop_setsecattr = spec_setsecattr },
+ VOPNAME_GETSECATTR, { .vop_getsecattr = spec_getsecattr },
+ NULL, NULL
};
/*
diff --git a/usr/src/uts/common/fs/swapfs/swap_subr.c b/usr/src/uts/common/fs/swapfs/swap_subr.c
index df175211c6..e589c38073 100644
--- a/usr/src/uts/common/fs/swapfs/swap_subr.c
+++ b/usr/src/uts/common/fs/swapfs/swap_subr.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -32,6 +31,7 @@
#include <sys/errno.h>
#include <sys/kmem.h>
#include <sys/vnode.h>
+#include <sys/vfs_opreg.h>
#include <sys/swap.h>
#include <sys/sysmacros.h>
#include <sys/buf.h>
@@ -167,7 +167,7 @@ swapinit(int fstype, char *name)
int i, error;
static const fs_operation_def_t swap_vfsops[] = {
- VFSNAME_SYNC, (fs_generic_func_p) swap_sync,
+ VFSNAME_SYNC, { .vfs_sync = swap_sync },
NULL, NULL
};
diff --git a/usr/src/uts/common/fs/swapfs/swap_vnops.c b/usr/src/uts/common/fs/swapfs/swap_vnops.c
index bdcf5b8ca2..53bdae350c 100644
--- a/usr/src/uts/common/fs/swapfs/swap_vnops.c
+++ b/usr/src/uts/common/fs/swapfs/swap_vnops.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -32,6 +32,7 @@
#include <sys/cred.h>
#include <sys/errno.h>
#include <sys/vnode.h>
+#include <sys/vfs_opreg.h>
#include <sys/cmn_err.h>
#include <sys/swap.h>
#include <sys/mman.h>
@@ -75,16 +76,16 @@ static int swap_putapage(struct vnode *vp, page_t *pp, u_offset_t *off,
size_t *lenp, int flags, struct cred *cr);
const fs_operation_def_t swap_vnodeops_template[] = {
- VOPNAME_INACTIVE, (fs_generic_func_p) swap_inactive,
- VOPNAME_GETPAGE, swap_getpage,
- VOPNAME_PUTPAGE, swap_putpage,
- VOPNAME_DISPOSE, (fs_generic_func_p) swap_dispose,
- VOPNAME_SETFL, fs_error,
- VOPNAME_POLL, fs_error,
- VOPNAME_PATHCONF, fs_error,
- VOPNAME_GETSECATTR, fs_error,
- VOPNAME_SHRLOCK, fs_error,
- NULL, NULL
+ VOPNAME_INACTIVE, { .vop_inactive = swap_inactive },
+ VOPNAME_GETPAGE, { .vop_getpage = swap_getpage },
+ VOPNAME_PUTPAGE, { .vop_putpage = swap_putpage },
+ VOPNAME_DISPOSE, { .vop_dispose = swap_dispose },
+ VOPNAME_SETFL, { .error = fs_error },
+ VOPNAME_POLL, { .error = fs_error },
+ VOPNAME_PATHCONF, { .error = fs_error },
+ VOPNAME_GETSECATTR, { .error = fs_error },
+ VOPNAME_SHRLOCK, { .error = fs_error },
+ NULL, NULL
};
vnodeops_t *swap_vnodeops;
diff --git a/usr/src/uts/common/fs/tmpfs/tmp_vfsops.c b/usr/src/uts/common/fs/tmpfs/tmp_vfsops.c
index fb5e0d74e4..f798cb8ed4 100644
--- a/usr/src/uts/common/fs/tmpfs/tmp_vfsops.c
+++ b/usr/src/uts/common/fs/tmpfs/tmp_vfsops.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -32,6 +32,7 @@
#include <sys/time.h>
#include <sys/pathname.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/vnode.h>
#include <sys/stat.h>
#include <sys/uio.h>
@@ -173,12 +174,12 @@ static int
tmpfsinit(int fstype, char *name)
{
static const fs_operation_def_t tmp_vfsops_template[] = {
- VFSNAME_MOUNT, tmp_mount,
- VFSNAME_UNMOUNT, tmp_unmount,
- VFSNAME_ROOT, tmp_root,
- VFSNAME_STATVFS, tmp_statvfs,
- VFSNAME_VGET, tmp_vget,
- NULL, NULL
+ VFSNAME_MOUNT, { .vfs_mount = tmp_mount },
+ VFSNAME_UNMOUNT, { .vfs_unmount = tmp_unmount },
+ VFSNAME_ROOT, { .vfs_root = tmp_root },
+ VFSNAME_STATVFS, { .vfs_statvfs = tmp_statvfs },
+ VFSNAME_VGET, { .vfs_vget = tmp_vget },
+ NULL, NULL
};
int error;
extern void tmpfs_hash_init();
diff --git a/usr/src/uts/common/fs/tmpfs/tmp_vnops.c b/usr/src/uts/common/fs/tmpfs/tmp_vnops.c
index 2f1e94a7c7..236d2bfd4b 100644
--- a/usr/src/uts/common/fs/tmpfs/tmp_vnops.c
+++ b/usr/src/uts/common/fs/tmpfs/tmp_vnops.c
@@ -33,6 +33,7 @@
#include <sys/user.h>
#include <sys/time.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/vnode.h>
#include <sys/file.h>
#include <sys/fcntl.h>
@@ -2304,37 +2305,37 @@ tmp_pathconf(struct vnode *vp, int cmd, ulong_t *valp, cred_t *cr)
struct vnodeops *tmp_vnodeops;
const fs_operation_def_t tmp_vnodeops_template[] = {
- VOPNAME_OPEN, tmp_open,
- VOPNAME_CLOSE, tmp_close,
- VOPNAME_READ, tmp_read,
- VOPNAME_WRITE, tmp_write,
- VOPNAME_IOCTL, tmp_ioctl,
- VOPNAME_GETATTR, tmp_getattr,
- VOPNAME_SETATTR, tmp_setattr,
- VOPNAME_ACCESS, tmp_access,
- VOPNAME_LOOKUP, tmp_lookup,
- VOPNAME_CREATE, tmp_create,
- VOPNAME_REMOVE, tmp_remove,
- VOPNAME_LINK, tmp_link,
- VOPNAME_RENAME, tmp_rename,
- VOPNAME_MKDIR, tmp_mkdir,
- VOPNAME_RMDIR, tmp_rmdir,
- VOPNAME_READDIR, tmp_readdir,
- VOPNAME_SYMLINK, tmp_symlink,
- VOPNAME_READLINK, tmp_readlink,
- VOPNAME_FSYNC, tmp_fsync,
- VOPNAME_INACTIVE, (fs_generic_func_p) tmp_inactive,
- VOPNAME_FID, tmp_fid,
- VOPNAME_RWLOCK, tmp_rwlock,
- VOPNAME_RWUNLOCK, (fs_generic_func_p) tmp_rwunlock,
- VOPNAME_SEEK, tmp_seek,
- VOPNAME_SPACE, tmp_space,
- VOPNAME_GETPAGE, tmp_getpage,
- VOPNAME_PUTPAGE, tmp_putpage,
- VOPNAME_MAP, (fs_generic_func_p) tmp_map,
- VOPNAME_ADDMAP, (fs_generic_func_p) tmp_addmap,
- VOPNAME_DELMAP, tmp_delmap,
- VOPNAME_PATHCONF, tmp_pathconf,
- VOPNAME_VNEVENT, fs_vnevent_support,
- NULL, NULL
+ VOPNAME_OPEN, { .vop_open = tmp_open },
+ VOPNAME_CLOSE, { .vop_close = tmp_close },
+ VOPNAME_READ, { .vop_read = tmp_read },
+ VOPNAME_WRITE, { .vop_write = tmp_write },
+ VOPNAME_IOCTL, { .vop_ioctl = tmp_ioctl },
+ VOPNAME_GETATTR, { .vop_getattr = tmp_getattr },
+ VOPNAME_SETATTR, { .vop_setattr = tmp_setattr },
+ VOPNAME_ACCESS, { .vop_access = tmp_access },
+ VOPNAME_LOOKUP, { .vop_lookup = tmp_lookup },
+ VOPNAME_CREATE, { .vop_create = tmp_create },
+ VOPNAME_REMOVE, { .vop_remove = tmp_remove },
+ VOPNAME_LINK, { .vop_link = tmp_link },
+ VOPNAME_RENAME, { .vop_rename = tmp_rename },
+ VOPNAME_MKDIR, { .vop_mkdir = tmp_mkdir },
+ VOPNAME_RMDIR, { .vop_rmdir = tmp_rmdir },
+ VOPNAME_READDIR, { .vop_readdir = tmp_readdir },
+ VOPNAME_SYMLINK, { .vop_symlink = tmp_symlink },
+ VOPNAME_READLINK, { .vop_readlink = tmp_readlink },
+ VOPNAME_FSYNC, { .vop_fsync = tmp_fsync },
+ VOPNAME_INACTIVE, { .vop_inactive = tmp_inactive },
+ VOPNAME_FID, { .vop_fid = tmp_fid },
+ VOPNAME_RWLOCK, { .vop_rwlock = tmp_rwlock },
+ VOPNAME_RWUNLOCK, { .vop_rwunlock = tmp_rwunlock },
+ VOPNAME_SEEK, { .vop_seek = tmp_seek },
+ VOPNAME_SPACE, { .vop_space = tmp_space },
+ VOPNAME_GETPAGE, { .vop_getpage = tmp_getpage },
+ VOPNAME_PUTPAGE, { .vop_putpage = tmp_putpage },
+ VOPNAME_MAP, { .vop_map = tmp_map },
+ VOPNAME_ADDMAP, { .vop_addmap = tmp_addmap },
+ VOPNAME_DELMAP, { .vop_delmap = tmp_delmap },
+ VOPNAME_PATHCONF, { .vop_pathconf = tmp_pathconf },
+ VOPNAME_VNEVENT, { .vop_vnevent = fs_vnevent_support },
+ NULL, NULL
};
diff --git a/usr/src/uts/common/fs/udfs/udf_vfsops.c b/usr/src/uts/common/fs/udfs/udf_vfsops.c
index 0ff009d6f3..79e76d2715 100644
--- a/usr/src/uts/common/fs/udfs/udf_vfsops.c
+++ b/usr/src/uts/common/fs/udfs/udf_vfsops.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -37,6 +37,7 @@
#include <sys/user.h>
#include <sys/buf.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/stat.h>
#include <sys/vnode.h>
#include <sys/mode.h>
@@ -1897,14 +1898,14 @@ static int
udfinit(int fstype, char *name)
{
static const fs_operation_def_t udf_vfsops_template[] = {
- VFSNAME_MOUNT, udf_mount,
- VFSNAME_UNMOUNT, udf_unmount,
- VFSNAME_ROOT, udf_root,
- VFSNAME_STATVFS, udf_statvfs,
- VFSNAME_SYNC, (fs_generic_func_p) udf_sync,
- VFSNAME_VGET, udf_vget,
- VFSNAME_MOUNTROOT, udf_mountroot,
- NULL, NULL
+ VFSNAME_MOUNT, { .vfs_mount = udf_mount },
+ VFSNAME_UNMOUNT, { .vfs_unmount = udf_unmount },
+ VFSNAME_ROOT, { .vfs_root = udf_root },
+ VFSNAME_STATVFS, { .vfs_statvfs = udf_statvfs },
+ VFSNAME_SYNC, { .vfs_sync = udf_sync },
+ VFSNAME_VGET, { .vfs_vget = udf_vget },
+ VFSNAME_MOUNTROOT, { .vfs_mountroot = udf_mountroot },
+ NULL, NULL
};
extern struct vnodeops *udf_vnodeops;
extern const fs_operation_def_t udf_vnodeops_template[];
diff --git a/usr/src/uts/common/fs/udfs/udf_vnops.c b/usr/src/uts/common/fs/udfs/udf_vnops.c
index 1a0378dcb9..b67d80c394 100644
--- a/usr/src/uts/common/fs/udfs/udf_vnops.c
+++ b/usr/src/uts/common/fs/udfs/udf_vnops.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -38,6 +37,7 @@
#include <sys/user.h>
#include <sys/buf.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/stat.h>
#include <sys/vnode.h>
#include <sys/mode.h>
@@ -188,41 +188,41 @@ typedef struct mio_slave {
struct vnodeops *udf_vnodeops;
const fs_operation_def_t udf_vnodeops_template[] = {
- VOPNAME_OPEN, udf_open,
- VOPNAME_CLOSE, udf_close,
- VOPNAME_READ, udf_read,
- VOPNAME_WRITE, udf_write,
- VOPNAME_IOCTL, udf_ioctl,
- VOPNAME_GETATTR, udf_getattr,
- VOPNAME_SETATTR, udf_setattr,
- VOPNAME_ACCESS, udf_access,
- VOPNAME_LOOKUP, udf_lookup,
- VOPNAME_CREATE, udf_create,
- VOPNAME_REMOVE, udf_remove,
- VOPNAME_LINK, udf_link,
- VOPNAME_RENAME, udf_rename,
- VOPNAME_MKDIR, udf_mkdir,
- VOPNAME_RMDIR, udf_rmdir,
- VOPNAME_READDIR, udf_readdir,
- VOPNAME_SYMLINK, udf_symlink,
- VOPNAME_READLINK, udf_readlink,
- VOPNAME_FSYNC, udf_fsync,
- VOPNAME_INACTIVE, (fs_generic_func_p) udf_inactive,
- VOPNAME_FID, udf_fid,
- VOPNAME_RWLOCK, udf_rwlock,
- VOPNAME_RWUNLOCK, (fs_generic_func_p) udf_rwunlock,
- VOPNAME_SEEK, udf_seek,
- VOPNAME_FRLOCK, udf_frlock,
- VOPNAME_SPACE, udf_space,
- VOPNAME_GETPAGE, udf_getpage,
- VOPNAME_PUTPAGE, udf_putpage,
- VOPNAME_MAP, (fs_generic_func_p) udf_map,
- VOPNAME_ADDMAP, (fs_generic_func_p) udf_addmap,
- VOPNAME_DELMAP, udf_delmap,
- VOPNAME_PATHCONF, udf_l_pathconf,
- VOPNAME_PAGEIO, udf_pageio,
- VOPNAME_VNEVENT, fs_vnevent_support,
- NULL, NULL
+ VOPNAME_OPEN, { .vop_open = udf_open },
+ VOPNAME_CLOSE, { .vop_close = udf_close },
+ VOPNAME_READ, { .vop_read = udf_read },
+ VOPNAME_WRITE, { .vop_write = udf_write },
+ VOPNAME_IOCTL, { .vop_ioctl = udf_ioctl },
+ VOPNAME_GETATTR, { .vop_getattr = udf_getattr },
+ VOPNAME_SETATTR, { .vop_setattr = udf_setattr },
+ VOPNAME_ACCESS, { .vop_access = udf_access },
+ VOPNAME_LOOKUP, { .vop_lookup = udf_lookup },
+ VOPNAME_CREATE, { .vop_create = udf_create },
+ VOPNAME_REMOVE, { .vop_remove = udf_remove },
+ VOPNAME_LINK, { .vop_link = udf_link },
+ VOPNAME_RENAME, { .vop_rename = udf_rename },
+ VOPNAME_MKDIR, { .vop_mkdir = udf_mkdir },
+ VOPNAME_RMDIR, { .vop_rmdir = udf_rmdir },
+ VOPNAME_READDIR, { .vop_readdir = udf_readdir },
+ VOPNAME_SYMLINK, { .vop_symlink = udf_symlink },
+ VOPNAME_READLINK, { .vop_readlink = udf_readlink },
+ VOPNAME_FSYNC, { .vop_fsync = udf_fsync },
+ VOPNAME_INACTIVE, { .vop_inactive = udf_inactive },
+ VOPNAME_FID, { .vop_fid = udf_fid },
+ VOPNAME_RWLOCK, { .vop_rwlock = udf_rwlock },
+ VOPNAME_RWUNLOCK, { .vop_rwunlock = udf_rwunlock },
+ VOPNAME_SEEK, { .vop_seek = udf_seek },
+ VOPNAME_FRLOCK, { .vop_frlock = udf_frlock },
+ VOPNAME_SPACE, { .vop_space = udf_space },
+ VOPNAME_GETPAGE, { .vop_getpage = udf_getpage },
+ VOPNAME_PUTPAGE, { .vop_putpage = udf_putpage },
+ VOPNAME_MAP, { .vop_map = udf_map },
+ VOPNAME_ADDMAP, { .vop_addmap = udf_addmap },
+ VOPNAME_DELMAP, { .vop_delmap = udf_delmap },
+ VOPNAME_PATHCONF, { .vop_pathconf = udf_l_pathconf },
+ VOPNAME_PAGEIO, { .vop_pageio = udf_pageio },
+ VOPNAME_VNEVENT, { .vop_vnevent = fs_vnevent_support },
+ NULL, NULL
};
/* ARGSUSED */
diff --git a/usr/src/uts/common/fs/ufs/ufs_vfsops.c b/usr/src/uts/common/fs/ufs/ufs_vfsops.c
index 880019da4d..35c4e309f0 100644
--- a/usr/src/uts/common/fs/ufs/ufs_vfsops.c
+++ b/usr/src/uts/common/fs/ufs/ufs_vfsops.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -53,6 +53,7 @@
#include <sys/buf.h>
#include <sys/pathname.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/vnode.h>
#include <sys/file.h>
#include <sys/atomic.h>
@@ -2033,14 +2034,14 @@ static int
ufsinit(int fstype, char *name)
{
static const fs_operation_def_t ufs_vfsops_template[] = {
- VFSNAME_MOUNT, ufs_mount,
- VFSNAME_UNMOUNT, ufs_unmount,
- VFSNAME_ROOT, ufs_root,
- VFSNAME_STATVFS, ufs_statvfs,
- VFSNAME_SYNC, (fs_generic_func_p) ufs_sync,
- VFSNAME_VGET, ufs_vget,
- VFSNAME_MOUNTROOT, ufs_mountroot,
- NULL, NULL
+ VFSNAME_MOUNT, { .vfs_mount = ufs_mount },
+ VFSNAME_UNMOUNT, { .vfs_unmount = ufs_unmount },
+ VFSNAME_ROOT, { .vfs_root = ufs_root },
+ VFSNAME_STATVFS, { .vfs_statvfs = ufs_statvfs },
+ VFSNAME_SYNC, { .vfs_sync = ufs_sync },
+ VFSNAME_VGET, { .vfs_vget = ufs_vget },
+ VFSNAME_MOUNTROOT, { .vfs_mountroot = ufs_mountroot },
+ NULL, NULL
};
int error;
diff --git a/usr/src/uts/common/fs/ufs/ufs_vnops.c b/usr/src/uts/common/fs/ufs/ufs_vnops.c
index 694de37323..d8f3f9aa1a 100644
--- a/usr/src/uts/common/fs/ufs/ufs_vnops.c
+++ b/usr/src/uts/common/fs/ufs/ufs_vnops.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -46,6 +46,7 @@
#include <sys/user.h>
#include <sys/buf.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/vnode.h>
#include <sys/proc.h>
#include <sys/disp.h>
@@ -171,47 +172,48 @@ extern int as_map_locked(struct as *, caddr_t, size_t, int ((*)()), void *);
*/
struct vnodeops *ufs_vnodeops;
+/* NOTE: "not blkd" below means that the operation isn't blocked by lockfs */
const fs_operation_def_t ufs_vnodeops_template[] = {
- VOPNAME_OPEN, ufs_open, /* will not be blocked by lockfs */
- VOPNAME_CLOSE, ufs_close, /* will not be blocked by lockfs */
- VOPNAME_READ, ufs_read,
- VOPNAME_WRITE, ufs_write,
- VOPNAME_IOCTL, ufs_ioctl,
- VOPNAME_GETATTR, ufs_getattr,
- VOPNAME_SETATTR, ufs_setattr,
- VOPNAME_ACCESS, ufs_access,
- VOPNAME_LOOKUP, ufs_lookup,
- VOPNAME_CREATE, ufs_create,
- VOPNAME_REMOVE, ufs_remove,
- VOPNAME_LINK, ufs_link,
- VOPNAME_RENAME, ufs_rename,
- VOPNAME_MKDIR, ufs_mkdir,
- VOPNAME_RMDIR, ufs_rmdir,
- VOPNAME_READDIR, ufs_readdir,
- VOPNAME_SYMLINK, ufs_symlink,
- VOPNAME_READLINK, ufs_readlink,
- VOPNAME_FSYNC, ufs_fsync,
- VOPNAME_INACTIVE, (fs_generic_func_p) ufs_inactive, /* not blocked */
- VOPNAME_FID, ufs_fid,
- VOPNAME_RWLOCK, ufs_rwlock, /* not blocked */
- VOPNAME_RWUNLOCK, (fs_generic_func_p) ufs_rwunlock, /* not blocked */
- VOPNAME_SEEK, ufs_seek,
- VOPNAME_FRLOCK, ufs_frlock,
- VOPNAME_SPACE, ufs_space,
- VOPNAME_GETPAGE, ufs_getpage,
- VOPNAME_PUTPAGE, ufs_putpage,
- VOPNAME_MAP, (fs_generic_func_p) ufs_map,
- VOPNAME_ADDMAP, (fs_generic_func_p) ufs_addmap, /* not blocked */
- VOPNAME_DELMAP, ufs_delmap, /* will not be blocked by lockfs */
- VOPNAME_POLL, (fs_generic_func_p) ufs_poll, /* not blocked */
- VOPNAME_DUMP, ufs_dump,
- VOPNAME_PATHCONF, ufs_l_pathconf,
- VOPNAME_PAGEIO, ufs_pageio,
- VOPNAME_DUMPCTL, ufs_dumpctl,
- VOPNAME_GETSECATTR, ufs_getsecattr,
- VOPNAME_SETSECATTR, ufs_setsecattr,
- VOPNAME_VNEVENT, fs_vnevent_support,
- NULL, NULL
+ VOPNAME_OPEN, { .vop_open = ufs_open }, /* not blkd */
+ VOPNAME_CLOSE, { .vop_close = ufs_close }, /* not blkd */
+ VOPNAME_READ, { .vop_read = ufs_read },
+ VOPNAME_WRITE, { .vop_write = ufs_write },
+ VOPNAME_IOCTL, { .vop_ioctl = ufs_ioctl },
+ VOPNAME_GETATTR, { .vop_getattr = ufs_getattr },
+ VOPNAME_SETATTR, { .vop_setattr = ufs_setattr },
+ VOPNAME_ACCESS, { .vop_access = ufs_access },
+ VOPNAME_LOOKUP, { .vop_lookup = ufs_lookup },
+ VOPNAME_CREATE, { .vop_create = ufs_create },
+ VOPNAME_REMOVE, { .vop_remove = ufs_remove },
+ VOPNAME_LINK, { .vop_link = ufs_link },
+ VOPNAME_RENAME, { .vop_rename = ufs_rename },
+ VOPNAME_MKDIR, { .vop_mkdir = ufs_mkdir },
+ VOPNAME_RMDIR, { .vop_rmdir = ufs_rmdir },
+ VOPNAME_READDIR, { .vop_readdir = ufs_readdir },
+ VOPNAME_SYMLINK, { .vop_symlink = ufs_symlink },
+ VOPNAME_READLINK, { .vop_readlink = ufs_readlink },
+ VOPNAME_FSYNC, { .vop_fsync = ufs_fsync },
+ VOPNAME_INACTIVE, { .vop_inactive = ufs_inactive }, /* not blkd */
+ VOPNAME_FID, { .vop_fid = ufs_fid },
+ VOPNAME_RWLOCK, { .vop_rwlock = ufs_rwlock }, /* not blkd */
+ VOPNAME_RWUNLOCK, { .vop_rwunlock = ufs_rwunlock }, /* not blkd */
+ VOPNAME_SEEK, { .vop_seek = ufs_seek },
+ VOPNAME_FRLOCK, { .vop_frlock = ufs_frlock },
+ VOPNAME_SPACE, { .vop_space = ufs_space },
+ VOPNAME_GETPAGE, { .vop_getpage = ufs_getpage },
+ VOPNAME_PUTPAGE, { .vop_putpage = ufs_putpage },
+ VOPNAME_MAP, { .vop_map = ufs_map },
+ VOPNAME_ADDMAP, { .vop_addmap = ufs_addmap }, /* not blkd */
+ VOPNAME_DELMAP, { .vop_delmap = ufs_delmap }, /* not blkd */
+ VOPNAME_POLL, { .vop_poll = ufs_poll }, /* not blkd */
+ VOPNAME_DUMP, { .vop_dump = ufs_dump },
+ VOPNAME_PATHCONF, { .vop_pathconf = ufs_l_pathconf },
+ VOPNAME_PAGEIO, { .vop_pageio = ufs_pageio },
+ VOPNAME_DUMPCTL, { .vop_dumpctl = ufs_dumpctl },
+ VOPNAME_GETSECATTR, { .vop_getsecattr = ufs_getsecattr },
+ VOPNAME_SETSECATTR, { .vop_setsecattr = ufs_setsecattr },
+ VOPNAME_VNEVENT, { .vop_vnevent = fs_vnevent_support },
+ NULL, NULL
};
#define MAX_BACKFILE_COUNT 9999
diff --git a/usr/src/uts/common/fs/vfs.c b/usr/src/uts/common/fs/vfs.c
index b473706b8b..09020d4f57 100644
--- a/usr/src/uts/common/fs/vfs.c
+++ b/usr/src/uts/common/fs/vfs.c
@@ -50,6 +50,7 @@
#include <sys/proc.h>
#include <sys/mount.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/fem.h>
#include <sys/mntent.h>
#include <sys/stat.h>
@@ -3768,12 +3769,6 @@ vf_to_stf(uint_t vf)
}
/*
- * Use old-style function prototype for vfsstray() so
- * that we can use it anywhere in the vfsops structure.
- */
-int vfsstray();
-
-/*
* Entries for (illegal) fstype 0.
*/
/* ARGSUSED */
@@ -3784,17 +3779,6 @@ vfsstray_sync(struct vfs *vfsp, short arg, struct cred *cr)
return (0);
}
-vfsops_t vfs_strayops = {
- vfsstray,
- vfsstray,
- vfsstray,
- vfsstray,
- vfsstray_sync,
- vfsstray,
- vfsstray,
- vfsstray
-};
-
/*
* Entries for (illegal) fstype 0.
*/
@@ -3838,23 +3822,36 @@ void
vfsinit(void)
{
struct vfssw *vswp;
+ vfsops_t *stray_vfsops;
int error;
extern int vopstats_enabled;
extern void vopstats_startup();
static const fs_operation_def_t EIO_vfsops_template[] = {
- VFSNAME_MOUNT, vfs_EIO,
- VFSNAME_UNMOUNT, vfs_EIO,
- VFSNAME_ROOT, vfs_EIO,
- VFSNAME_STATVFS, vfs_EIO,
- VFSNAME_SYNC, (fs_generic_func_p) vfs_EIO_sync,
- VFSNAME_VGET, vfs_EIO,
- VFSNAME_MOUNTROOT, vfs_EIO,
- VFSNAME_FREEVFS, vfs_EIO,
- VFSNAME_VNSTATE, vfs_EIO,
+ VFSNAME_MOUNT, { .error = vfs_EIO },
+ VFSNAME_UNMOUNT, { .error = vfs_EIO },
+ VFSNAME_ROOT, { .error = vfs_EIO },
+ VFSNAME_STATVFS, { .error = vfs_EIO },
+ VFSNAME_SYNC, { .vfs_sync = vfs_EIO_sync },
+ VFSNAME_VGET, { .error = vfs_EIO },
+ VFSNAME_MOUNTROOT, { .error = vfs_EIO },
+ VFSNAME_FREEVFS, { .error = vfs_EIO },
+ VFSNAME_VNSTATE, { .error = vfs_EIO },
NULL, NULL
};
+ static const fs_operation_def_t stray_vfsops_template[] = {
+ VFSNAME_MOUNT, { .error = vfsstray },
+ VFSNAME_UNMOUNT, { .error = vfsstray },
+ VFSNAME_ROOT, { .error = vfsstray },
+ VFSNAME_STATVFS, { .error = vfsstray },
+ VFSNAME_SYNC, { .vfs_sync = vfsstray_sync },
+ VFSNAME_VGET, { .error = vfsstray },
+ VFSNAME_MOUNTROOT, { .error = vfsstray },
+ VFSNAME_FREEVFS, { .error = vfsstray },
+ VFSNAME_VNSTATE, { .error = vfsstray },
+ NULL, NULL
+ };
/* Initialize the vnode cache (file systems may use it during init). */
@@ -3865,8 +3862,8 @@ vfsinit(void)
fem_init();
/* Initialize the dummy stray file system type. */
-
- vfssw[0].vsw_vfsops = vfs_strayops;
+ error = vfs_makefsops(stray_vfsops_template, &stray_vfsops);
+ vfssw[0].vsw_vfsops = *stray_vfsops; /* structure copy */
/* Initialize the dummy EIO file system. */
error = vfs_makefsops(EIO_vfsops_template, &EIO_vfsops);
@@ -3970,8 +3967,10 @@ fs_build_vector(void *vector, int *unused_ops,
{
int i, num_trans, num_ops, used;
- /* Count the number of translations and the number of supplied */
- /* operations. */
+ /*
+ * Count the number of translations and the number of supplied
+ * operations.
+ */
{
const fs_operation_trans_def_t *p;
@@ -4017,13 +4016,15 @@ fs_build_vector(void *vector, int *unused_ops,
}
}
- /* If the file system is using a "placeholder" for default */
- /* or error functions, grab the appropriate function out of */
- /* the translation table. If the file system didn't supply */
- /* this operation at all, use the default function. */
+ /*
+ * If the file system is using a "placeholder" for default
+ * or error functions, grab the appropriate function out of
+ * the translation table. If the file system didn't supply
+ * this operation at all, use the default function.
+ */
if (found) {
- result = operations[j].func;
+ result = operations[j].func.fs_generic;
if (result == fs_default) {
result = translation[i].defaultFunc;
} else if (result == fs_error) {
diff --git a/usr/src/uts/common/fs/vnode.c b/usr/src/uts/common/fs/vnode.c
index b18074e49d..5b796d6f8a 100644
--- a/usr/src/uts/common/fs/vnode.c
+++ b/usr/src/uts/common/fs/vnode.c
@@ -49,6 +49,7 @@
#include <sys/file.h>
#include <sys/pathname.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/vnode.h>
#include <sys/rwstlock.h>
#include <sys/fem.h>
diff --git a/usr/src/uts/common/fs/zfs/zfs_ctldir.c b/usr/src/uts/common/fs/zfs/zfs_ctldir.c
index cb0807aa56..aaae4f7849 100644
--- a/usr/src/uts/common/fs/zfs/zfs_ctldir.c
+++ b/usr/src/uts/common/fs/zfs/zfs_ctldir.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -59,6 +59,7 @@
#include <sys/zfs_ctldir.h>
#include <sys/zfs_ioctl.h>
#include <sys/zfs_vfsops.h>
+#include <sys/vfs_opreg.h>
#include <sys/gfs.h>
#include <sys/stat.h>
#include <sys/dmu.h>
@@ -384,16 +385,16 @@ zfsctl_root_lookup(vnode_t *dvp, char *nm, vnode_t **vpp, pathname_t *pnp,
}
static const fs_operation_def_t zfsctl_tops_root[] = {
- { VOPNAME_OPEN, zfsctl_common_open },
- { VOPNAME_CLOSE, zfsctl_common_close },
- { VOPNAME_IOCTL, fs_inval },
- { VOPNAME_GETATTR, zfsctl_root_getattr },
- { VOPNAME_ACCESS, zfsctl_common_access },
- { VOPNAME_READDIR, gfs_vop_readdir },
- { VOPNAME_LOOKUP, zfsctl_root_lookup },
- { VOPNAME_SEEK, fs_seek },
- { VOPNAME_INACTIVE, (fs_generic_func_p) gfs_vop_inactive },
- { VOPNAME_FID, zfsctl_common_fid },
+ { VOPNAME_OPEN, { .vop_open = zfsctl_common_open } },
+ { VOPNAME_CLOSE, { .vop_close = zfsctl_common_close } },
+ { VOPNAME_IOCTL, { .error = fs_inval } },
+ { VOPNAME_GETATTR, { .vop_getattr = zfsctl_root_getattr } },
+ { VOPNAME_ACCESS, { .vop_access = zfsctl_common_access } },
+ { VOPNAME_READDIR, { .vop_readdir = gfs_vop_readdir } },
+ { VOPNAME_LOOKUP, { .vop_lookup = zfsctl_root_lookup } },
+ { VOPNAME_SEEK, { .vop_seek = fs_seek } },
+ { VOPNAME_INACTIVE, { .vop_inactive = gfs_vop_inactive } },
+ { VOPNAME_FID, { .vop_fid = zfsctl_common_fid } },
{ NULL }
};
@@ -788,18 +789,18 @@ zfsctl_snapdir_inactive(vnode_t *vp, cred_t *cr)
}
static const fs_operation_def_t zfsctl_tops_snapdir[] = {
- { VOPNAME_OPEN, zfsctl_common_open },
- { VOPNAME_CLOSE, zfsctl_common_close },
- { VOPNAME_IOCTL, fs_inval },
- { VOPNAME_GETATTR, zfsctl_snapdir_getattr },
- { VOPNAME_ACCESS, zfsctl_common_access },
- { VOPNAME_RENAME, zfsctl_snapdir_rename },
- { VOPNAME_RMDIR, zfsctl_snapdir_remove },
- { VOPNAME_READDIR, gfs_vop_readdir },
- { VOPNAME_LOOKUP, zfsctl_snapdir_lookup },
- { VOPNAME_SEEK, fs_seek },
- { VOPNAME_INACTIVE, (fs_generic_func_p) zfsctl_snapdir_inactive },
- { VOPNAME_FID, zfsctl_common_fid },
+ { VOPNAME_OPEN, { .vop_open = zfsctl_common_open } },
+ { VOPNAME_CLOSE, { .vop_close = zfsctl_common_close } },
+ { VOPNAME_IOCTL, { .error = fs_inval } },
+ { VOPNAME_GETATTR, { .vop_getattr = zfsctl_snapdir_getattr } },
+ { VOPNAME_ACCESS, { .vop_access = zfsctl_common_access } },
+ { VOPNAME_RENAME, { .vop_rename = zfsctl_snapdir_rename } },
+ { VOPNAME_RMDIR, { .vop_rmdir = zfsctl_snapdir_remove } },
+ { VOPNAME_READDIR, { .vop_readdir = gfs_vop_readdir } },
+ { VOPNAME_LOOKUP, { .vop_lookup = zfsctl_snapdir_lookup } },
+ { VOPNAME_SEEK, { .vop_seek = fs_seek } },
+ { VOPNAME_INACTIVE, { .vop_inactive = zfsctl_snapdir_inactive } },
+ { VOPNAME_FID, { .vop_fid = zfsctl_common_fid } },
{ NULL }
};
@@ -868,7 +869,7 @@ zfsctl_snapshot_inactive(vnode_t *vp, cred_t *cr)
* be covered.
*/
static const fs_operation_def_t zfsctl_tops_snapshot[] = {
- VOPNAME_INACTIVE, (fs_generic_func_p) zfsctl_snapshot_inactive,
+ VOPNAME_INACTIVE, { .vop_inactive = zfsctl_snapshot_inactive },
NULL, NULL
};
diff --git a/usr/src/uts/common/fs/zfs/zfs_vfsops.c b/usr/src/uts/common/fs/zfs/zfs_vfsops.c
index bdfcca28f0..e5bd45c720 100644
--- a/usr/src/uts/common/fs/zfs/zfs_vfsops.c
+++ b/usr/src/uts/common/fs/zfs/zfs_vfsops.c
@@ -34,6 +34,7 @@
#include <sys/acl.h>
#include <sys/vnode.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/mntent.h>
#include <sys/mount.h>
#include <sys/cmn_err.h>
@@ -75,20 +76,20 @@ static void zfs_freevfs(vfs_t *vfsp);
static void zfs_objset_close(zfsvfs_t *zfsvfs);
static const fs_operation_def_t zfs_vfsops_template[] = {
- VFSNAME_MOUNT, zfs_mount,
- VFSNAME_MOUNTROOT, zfs_mountroot,
- VFSNAME_UNMOUNT, zfs_umount,
- VFSNAME_ROOT, zfs_root,
- VFSNAME_STATVFS, zfs_statvfs,
- VFSNAME_SYNC, (fs_generic_func_p) zfs_sync,
- VFSNAME_VGET, zfs_vget,
- VFSNAME_FREEVFS, (fs_generic_func_p) zfs_freevfs,
- NULL, NULL
+ VFSNAME_MOUNT, { .vfs_mount = zfs_mount },
+ VFSNAME_MOUNTROOT, { .vfs_mountroot = zfs_mountroot },
+ VFSNAME_UNMOUNT, { .vfs_unmount = zfs_umount },
+ VFSNAME_ROOT, { .vfs_root = zfs_root },
+ VFSNAME_STATVFS, { .vfs_statvfs = zfs_statvfs },
+ VFSNAME_SYNC, { .vfs_sync = zfs_sync },
+ VFSNAME_VGET, { .vfs_vget = zfs_vget },
+ VFSNAME_FREEVFS, { .vfs_freevfs = zfs_freevfs },
+ NULL, NULL
};
static const fs_operation_def_t zfs_vfsops_eio_template[] = {
- VFSNAME_FREEVFS, (fs_generic_func_p) zfs_freevfs,
- NULL, NULL
+ VFSNAME_FREEVFS, { .vfs_freevfs = zfs_freevfs },
+ NULL, NULL
};
/*
diff --git a/usr/src/uts/common/fs/zfs/zfs_vnops.c b/usr/src/uts/common/fs/zfs/zfs_vnops.c
index 4299bb60f2..fd1aae2e38 100644
--- a/usr/src/uts/common/fs/zfs/zfs_vnops.c
+++ b/usr/src/uts/common/fs/zfs/zfs_vnops.c
@@ -32,6 +32,7 @@
#include <sys/sysmacros.h>
#include <sys/resource.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/vnode.h>
#include <sys/file.h>
#include <sys/stat.h>
@@ -3662,31 +3663,31 @@ zfs_isdir()
*/
vnodeops_t *zfs_dvnodeops;
const fs_operation_def_t zfs_dvnodeops_template[] = {
- VOPNAME_OPEN, zfs_open,
- VOPNAME_CLOSE, zfs_close,
- VOPNAME_READ, zfs_isdir,
- VOPNAME_WRITE, zfs_isdir,
- VOPNAME_IOCTL, zfs_ioctl,
- VOPNAME_GETATTR, zfs_getattr,
- VOPNAME_SETATTR, zfs_setattr,
- VOPNAME_ACCESS, zfs_access,
- VOPNAME_LOOKUP, zfs_lookup,
- VOPNAME_CREATE, zfs_create,
- VOPNAME_REMOVE, zfs_remove,
- VOPNAME_LINK, zfs_link,
- VOPNAME_RENAME, zfs_rename,
- VOPNAME_MKDIR, zfs_mkdir,
- VOPNAME_RMDIR, zfs_rmdir,
- VOPNAME_READDIR, zfs_readdir,
- VOPNAME_SYMLINK, zfs_symlink,
- VOPNAME_FSYNC, zfs_fsync,
- VOPNAME_INACTIVE, (fs_generic_func_p) zfs_inactive,
- VOPNAME_FID, zfs_fid,
- VOPNAME_SEEK, zfs_seek,
- VOPNAME_PATHCONF, zfs_pathconf,
- VOPNAME_GETSECATTR, zfs_getsecattr,
- VOPNAME_SETSECATTR, zfs_setsecattr,
- NULL, NULL
+ VOPNAME_OPEN, { .vop_open = zfs_open },
+ VOPNAME_CLOSE, { .vop_close = zfs_close },
+ VOPNAME_READ, { .error = zfs_isdir },
+ VOPNAME_WRITE, { .error = zfs_isdir },
+ VOPNAME_IOCTL, { .vop_ioctl = zfs_ioctl },
+ VOPNAME_GETATTR, { .vop_getattr = zfs_getattr },
+ VOPNAME_SETATTR, { .vop_setattr = zfs_setattr },
+ VOPNAME_ACCESS, { .vop_access = zfs_access },
+ VOPNAME_LOOKUP, { .vop_lookup = zfs_lookup },
+ VOPNAME_CREATE, { .vop_create = zfs_create },
+ VOPNAME_REMOVE, { .vop_remove = zfs_remove },
+ VOPNAME_LINK, { .vop_link = zfs_link },
+ VOPNAME_RENAME, { .vop_rename = zfs_rename },
+ VOPNAME_MKDIR, { .vop_mkdir = zfs_mkdir },
+ VOPNAME_RMDIR, { .vop_rmdir = zfs_rmdir },
+ VOPNAME_READDIR, { .vop_readdir = zfs_readdir },
+ VOPNAME_SYMLINK, { .vop_symlink = zfs_symlink },
+ VOPNAME_FSYNC, { .vop_fsync = zfs_fsync },
+ VOPNAME_INACTIVE, { .vop_inactive = zfs_inactive },
+ VOPNAME_FID, { .vop_fid = zfs_fid },
+ VOPNAME_SEEK, { .vop_seek = zfs_seek },
+ VOPNAME_PATHCONF, { .vop_pathconf = zfs_pathconf },
+ VOPNAME_GETSECATTR, { .vop_getsecattr = zfs_getsecattr },
+ VOPNAME_SETSECATTR, { .vop_setsecattr = zfs_setsecattr },
+ NULL, NULL
};
/*
@@ -3694,32 +3695,32 @@ const fs_operation_def_t zfs_dvnodeops_template[] = {
*/
vnodeops_t *zfs_fvnodeops;
const fs_operation_def_t zfs_fvnodeops_template[] = {
- VOPNAME_OPEN, zfs_open,
- VOPNAME_CLOSE, zfs_close,
- VOPNAME_READ, zfs_read,
- VOPNAME_WRITE, zfs_write,
- VOPNAME_IOCTL, zfs_ioctl,
- VOPNAME_GETATTR, zfs_getattr,
- VOPNAME_SETATTR, zfs_setattr,
- VOPNAME_ACCESS, zfs_access,
- VOPNAME_LOOKUP, zfs_lookup,
- VOPNAME_RENAME, zfs_rename,
- VOPNAME_FSYNC, zfs_fsync,
- VOPNAME_INACTIVE, (fs_generic_func_p)zfs_inactive,
- VOPNAME_FID, zfs_fid,
- VOPNAME_SEEK, zfs_seek,
- VOPNAME_FRLOCK, zfs_frlock,
- VOPNAME_SPACE, zfs_space,
- VOPNAME_GETPAGE, zfs_getpage,
- VOPNAME_PUTPAGE, zfs_putpage,
- VOPNAME_MAP, (fs_generic_func_p) zfs_map,
- VOPNAME_ADDMAP, (fs_generic_func_p) zfs_addmap,
- VOPNAME_DELMAP, zfs_delmap,
- VOPNAME_PATHCONF, zfs_pathconf,
- VOPNAME_GETSECATTR, zfs_getsecattr,
- VOPNAME_SETSECATTR, zfs_setsecattr,
- VOPNAME_VNEVENT, fs_vnevent_support,
- NULL, NULL
+ VOPNAME_OPEN, { .vop_open = zfs_open },
+ VOPNAME_CLOSE, { .vop_close = zfs_close },
+ VOPNAME_READ, { .vop_read = zfs_read },
+ VOPNAME_WRITE, { .vop_write = zfs_write },
+ VOPNAME_IOCTL, { .vop_ioctl = zfs_ioctl },
+ VOPNAME_GETATTR, { .vop_getattr = zfs_getattr },
+ VOPNAME_SETATTR, { .vop_setattr = zfs_setattr },
+ VOPNAME_ACCESS, { .vop_access = zfs_access },
+ VOPNAME_LOOKUP, { .vop_lookup = zfs_lookup },
+ VOPNAME_RENAME, { .vop_rename = zfs_rename },
+ VOPNAME_FSYNC, { .vop_fsync = zfs_fsync },
+ VOPNAME_INACTIVE, { .vop_inactive = zfs_inactive },
+ VOPNAME_FID, { .vop_fid = zfs_fid },
+ VOPNAME_SEEK, { .vop_seek = zfs_seek },
+ VOPNAME_FRLOCK, { .vop_frlock = zfs_frlock },
+ VOPNAME_SPACE, { .vop_space = zfs_space },
+ VOPNAME_GETPAGE, { .vop_getpage = zfs_getpage },
+ VOPNAME_PUTPAGE, { .vop_putpage = zfs_putpage },
+ VOPNAME_MAP, { .vop_map = zfs_map },
+ VOPNAME_ADDMAP, { .vop_addmap = zfs_addmap },
+ VOPNAME_DELMAP, { .vop_delmap = zfs_delmap },
+ VOPNAME_PATHCONF, { .vop_pathconf = zfs_pathconf },
+ VOPNAME_GETSECATTR, { .vop_getsecattr = zfs_getsecattr },
+ VOPNAME_SETSECATTR, { .vop_setsecattr = zfs_setsecattr },
+ VOPNAME_VNEVENT, { .vop_vnevent = fs_vnevent_support },
+ NULL, NULL
};
/*
@@ -3727,16 +3728,16 @@ const fs_operation_def_t zfs_fvnodeops_template[] = {
*/
vnodeops_t *zfs_symvnodeops;
const fs_operation_def_t zfs_symvnodeops_template[] = {
- VOPNAME_GETATTR, zfs_getattr,
- VOPNAME_SETATTR, zfs_setattr,
- VOPNAME_ACCESS, zfs_access,
- VOPNAME_RENAME, zfs_rename,
- VOPNAME_READLINK, zfs_readlink,
- VOPNAME_INACTIVE, (fs_generic_func_p) zfs_inactive,
- VOPNAME_FID, zfs_fid,
- VOPNAME_PATHCONF, zfs_pathconf,
- VOPNAME_VNEVENT, fs_vnevent_support,
- NULL, NULL
+ VOPNAME_GETATTR, { .vop_getattr = zfs_getattr },
+ VOPNAME_SETATTR, { .vop_setattr = zfs_setattr },
+ VOPNAME_ACCESS, { .vop_access = zfs_access },
+ VOPNAME_RENAME, { .vop_rename = zfs_rename },
+ VOPNAME_READLINK, { .vop_readlink = zfs_readlink },
+ VOPNAME_INACTIVE, { .vop_inactive = zfs_inactive },
+ VOPNAME_FID, { .vop_fid = zfs_fid },
+ VOPNAME_PATHCONF, { .vop_pathconf = zfs_pathconf },
+ VOPNAME_VNEVENT, { .vop_vnevent = fs_vnevent_support },
+ NULL, NULL
};
/*
@@ -3752,30 +3753,30 @@ const fs_operation_def_t zfs_symvnodeops_template[] = {
*/
vnodeops_t *zfs_xdvnodeops;
const fs_operation_def_t zfs_xdvnodeops_template[] = {
- VOPNAME_OPEN, zfs_open,
- VOPNAME_CLOSE, zfs_close,
- VOPNAME_IOCTL, zfs_ioctl,
- VOPNAME_GETATTR, zfs_getattr,
- VOPNAME_SETATTR, zfs_setattr,
- VOPNAME_ACCESS, zfs_access,
- VOPNAME_LOOKUP, zfs_lookup,
- VOPNAME_CREATE, zfs_create,
- VOPNAME_REMOVE, zfs_remove,
- VOPNAME_LINK, zfs_link,
- VOPNAME_RENAME, zfs_rename,
- VOPNAME_MKDIR, zfs_inval,
- VOPNAME_RMDIR, zfs_rmdir,
- VOPNAME_READDIR, zfs_readdir,
- VOPNAME_SYMLINK, zfs_inval,
- VOPNAME_FSYNC, zfs_fsync,
- VOPNAME_INACTIVE, (fs_generic_func_p) zfs_inactive,
- VOPNAME_FID, zfs_fid,
- VOPNAME_SEEK, zfs_seek,
- VOPNAME_PATHCONF, zfs_pathconf,
- VOPNAME_GETSECATTR, zfs_getsecattr,
- VOPNAME_SETSECATTR, zfs_setsecattr,
- VOPNAME_VNEVENT, fs_vnevent_support,
- NULL, NULL
+ VOPNAME_OPEN, { .vop_open = zfs_open },
+ VOPNAME_CLOSE, { .vop_close = zfs_close },
+ VOPNAME_IOCTL, { .vop_ioctl = zfs_ioctl },
+ VOPNAME_GETATTR, { .vop_getattr = zfs_getattr },
+ VOPNAME_SETATTR, { .vop_setattr = zfs_setattr },
+ VOPNAME_ACCESS, { .vop_access = zfs_access },
+ VOPNAME_LOOKUP, { .vop_lookup = zfs_lookup },
+ VOPNAME_CREATE, { .vop_create = zfs_create },
+ VOPNAME_REMOVE, { .vop_remove = zfs_remove },
+ VOPNAME_LINK, { .vop_link = zfs_link },
+ VOPNAME_RENAME, { .vop_rename = zfs_rename },
+ VOPNAME_MKDIR, { .error = zfs_inval },
+ VOPNAME_RMDIR, { .vop_rmdir = zfs_rmdir },
+ VOPNAME_READDIR, { .vop_readdir = zfs_readdir },
+ VOPNAME_SYMLINK, { .error = zfs_inval },
+ VOPNAME_FSYNC, { .vop_fsync = zfs_fsync },
+ VOPNAME_INACTIVE, { .vop_inactive = zfs_inactive },
+ VOPNAME_FID, { .vop_fid = zfs_fid },
+ VOPNAME_SEEK, { .vop_seek = zfs_seek },
+ VOPNAME_PATHCONF, { .vop_pathconf = zfs_pathconf },
+ VOPNAME_GETSECATTR, { .vop_getsecattr = zfs_getsecattr },
+ VOPNAME_SETSECATTR, { .vop_setsecattr = zfs_setsecattr },
+ VOPNAME_VNEVENT, { .vop_vnevent = fs_vnevent_support },
+ NULL, NULL
};
/*
@@ -3783,7 +3784,7 @@ const fs_operation_def_t zfs_xdvnodeops_template[] = {
*/
vnodeops_t *zfs_evnodeops;
const fs_operation_def_t zfs_evnodeops_template[] = {
- VOPNAME_INACTIVE, (fs_generic_func_p) zfs_inactive,
- VOPNAME_PATHCONF, zfs_pathconf,
- NULL, NULL
+ VOPNAME_INACTIVE, { .vop_inactive = zfs_inactive },
+ VOPNAME_PATHCONF, { .vop_pathconf = zfs_pathconf },
+ NULL, NULL
};
diff --git a/usr/src/uts/common/fs/zfs/zfs_znode.c b/usr/src/uts/common/fs/zfs/zfs_znode.c
index b004c1350a..a2c8bef86f 100644
--- a/usr/src/uts/common/fs/zfs/zfs_znode.c
+++ b/usr/src/uts/common/fs/zfs/zfs_znode.c
@@ -35,6 +35,7 @@
#include <sys/mntent.h>
#include <sys/mkdev.h>
#include <sys/vfs.h>
+#include <sys/vfs_opreg.h>
#include <sys/vnode.h>
#include <sys/file.h>
#include <sys/kmem.h>