Index: coda/coda_vfsops.c =================================================================== RCS file: /home/ncvs/src/sys/coda/coda_vfsops.c,v retrieving revision 1.43 diff -u -r1.43 coda_vfsops.c --- coda/coda_vfsops.c 7 Mar 2003 09:18:15 -0000 1.43 +++ coda/coda_vfsops.c 1 Jun 2003 18:11:21 -0000 @@ -551,20 +551,12 @@ } struct vfsops coda_vfsops = { - coda_mount, - coda_start, - coda_unmount, - coda_root, - vfs_stdquotactl, - coda_nb_statfs, - coda_sync, - vfs_stdvget, - vfs_stdfhtovp, - vfs_stdcheckexp, - vfs_stdvptofh, - vfs_stdinit, - vfs_stduninit, - vfs_stdextattrctl, + .vfs_mount = coda_mount, + .vfs_start = coda_start, + .vfs_unmount = coda_unmount, + .vfs_root = coda_root, + .vfs_statfs = coda_nb_statfs, + .vfs_sync = coda_sync, }; VFS_SET(coda_vfsops, coda, VFCF_NETWORK); Index: coda/coda_vfsops.h =================================================================== RCS file: /home/ncvs/src/sys/coda/coda_vfsops.h,v retrieving revision 1.6 diff -u -r1.6 coda_vfsops.h --- coda/coda_vfsops.h 12 Sep 2001 08:36:56 -0000 1.6 +++ coda/coda_vfsops.h 1 Jun 2003 18:15:57 -0000 @@ -47,18 +47,17 @@ struct mount; int coda_vfsopstats_init(void); -int coda_mount(struct mount *, char *, caddr_t, struct nameidata *, - struct thread *); -int coda_start(struct mount *, int, struct thread *); -int coda_unmount(struct mount *, int, struct thread *); -int coda_root(struct mount *, struct vnode **); -int coda_quotactl(struct mount *, int, uid_t, caddr_t, struct thread *); -int coda_nb_statfs(struct mount *, struct statfs *, struct thread *); -int coda_sync(struct mount *, int, struct ucred *, struct thread *); -int coda_vget(struct mount *, ino_t, struct vnode **); -int coda_fhtovp(struct mount *, struct fid *, struct mbuf *, struct vnode **, - int *, struct ucred **); -int coda_vptofh(struct vnode *, struct fid *); -int coda_init(struct vfsconf *vfsp); + +vfs_mount_t coda_mount; +vfs_start_t coda_start; +vfs_unmount_t coda_unmount; +vfs_root_t coda_root; +vfs_quotactl_t coda_quotactl; +vfs_statfs_t coda_statfs; +vfs_sync_t coda_sync; +vfs_vget_t coda_vget; +vfs_fhtovp_t coda_fhtovp; +vfs_vptofh_t coda_vptofh; +vfs_init_t coda_init; int getNewVnode(struct vnode **vpp); Index: fs/devfs/devfs_vfsops.c =================================================================== RCS file: /home/ncvs/src/sys/fs/devfs/devfs_vfsops.c,v retrieving revision 1.30 diff -u -r1.30 devfs_vfsops.c --- fs/devfs/devfs_vfsops.c 11 Mar 2003 22:15:08 -0000 1.30 +++ fs/devfs/devfs_vfsops.c 1 Jun 2003 18:06:35 -0000 @@ -188,21 +188,10 @@ } static struct vfsops devfs_vfsops = { - NULL, - vfs_stdstart, - devfs_unmount, - devfs_root, - vfs_stdquotactl, - devfs_statfs, - vfs_stdnosync, - vfs_stdvget, - vfs_stdfhtovp, - vfs_stdcheckexp, - vfs_stdvptofh, - vfs_stdinit, - vfs_stduninit, - vfs_stdextattrctl, - devfs_nmount, + .vfs_unmount = devfs_unmount, + .vfs_root = devfs_root, + .vfs_statfs = devfs_statfs, + .vfs_nmount = devfs_nmount, }; VFS_SET(devfs_vfsops, devfs, VFCF_SYNTHETIC); Index: fs/fdescfs/fdesc_vfsops.c =================================================================== RCS file: /home/ncvs/src/sys/fs/fdescfs/fdesc_vfsops.c,v retrieving revision 1.39 diff -u -r1.39 fdesc_vfsops.c --- fs/fdescfs/fdesc_vfsops.c 11 Mar 2003 22:15:08 -0000 1.39 +++ fs/fdescfs/fdesc_vfsops.c 1 Jun 2003 18:41:23 -0000 @@ -58,13 +58,10 @@ static MALLOC_DEFINE(M_FDESCMNT, "FDESC mount", "FDESC mount structure"); -static int fdesc_mount(struct mount *mp, struct nameidata *ndp, - struct thread *td); -static int fdesc_unmount(struct mount *mp, int mntflags, - struct thread *td); -static int fdesc_statfs(struct mount *mp, struct statfs *sbp, - struct thread *td); - +static vfs_nmount_t fdesc_mount; +static vfs_unmount_t fdesc_unmount; +static vfs_statfs_t fdesc_statfs; + /* * Mount the per-process file descriptors (/dev/fd) */ @@ -207,21 +204,11 @@ } static struct vfsops fdesc_vfsops = { - NULL, - vfs_stdstart, - fdesc_unmount, - fdesc_root, - vfs_stdquotactl, - fdesc_statfs, - vfs_stdnosync, - vfs_stdvget, - vfs_stdfhtovp, - vfs_stdcheckexp, - vfs_stdvptofh, - fdesc_init, - vfs_stduninit, - vfs_stdextattrctl, - fdesc_mount, + .vfs_unmount = fdesc_unmount, + .vfs_root = fdesc_root, + .vfs_statfs = fdesc_statfs, + .vfs_init = fdesc_init, + .vfs_nmount = fdesc_mount, }; VFS_SET(fdesc_vfsops, fdescfs, VFCF_SYNTHETIC); Index: fs/hpfs/hpfs_vfsops.c =================================================================== RCS file: /home/ncvs/src/sys/fs/hpfs/hpfs_vfsops.c,v retrieving revision 1.33 diff -u -r1.33 hpfs_vfsops.c --- fs/hpfs/hpfs_vfsops.c 11 Mar 2003 22:15:08 -0000 1.33 +++ fs/hpfs/hpfs_vfsops.c 1 Jun 2003 18:36:04 -0000 @@ -55,19 +55,15 @@ struct sockaddr; -static int hpfs_root(struct mount *, struct vnode **); -static int hpfs_statfs(struct mount *, struct statfs *, struct thread *); -static int hpfs_unmount(struct mount *, int, struct thread *); -static int hpfs_vget(struct mount *mp, ino_t ino, int flags, - struct vnode **vpp); -static int hpfs_mountfs(register struct vnode *, struct mount *, - struct hpfs_args *, struct thread *); -static int hpfs_vptofh(struct vnode *, struct fid *); -static int hpfs_fhtovp(struct mount *, struct fid *, struct vnode **); -static int hpfs_mount(struct mount *, char *, caddr_t, - struct nameidata *, struct thread *); -static int hpfs_init(struct vfsconf *); -static int hpfs_uninit(struct vfsconf *); +static vfs_init_t hpfs_init; +static vfs_uninit_t hpfs_uninit; +static vfs_fhtovp_t hpfs_fhtovp; +static vfs_vget_t hpfs_vget; +static vfs_mount_t hpfs_mount; +static vfs_root_t hpfs_root; +static vfs_statfs_t hpfs_statfs; +static vfs_unmount_t hpfs_unmount; +static vfs_vptofh_t hpfs_vptofh; static int hpfs_init ( @@ -571,19 +567,14 @@ } static struct vfsops hpfs_vfsops = { - hpfs_mount, - vfs_stdstart, - hpfs_unmount, - hpfs_root, - vfs_stdquotactl, - hpfs_statfs, - vfs_stdnosync, - hpfs_vget, - hpfs_fhtovp, - vfs_stdcheckexp, - hpfs_vptofh, - hpfs_init, - hpfs_uninit, - vfs_stdextattrctl, + .vfs_mount = hpfs_mount, + .vfs_unmount = hpfs_unmount, + .vfs_root = hpfs_root, + .vfs_statfs = hpfs_statfs, + .vfs_vget = hpfs_vget, + .vfs_fhtovp = hpfs_fhtovp, + .vfs_vptofh = hpfs_vptofh, + .vfs_init = hpfs_init, + .vfs_uninit = hpfs_uninit, }; VFS_SET(hpfs_vfsops, hpfs, 0); Index: fs/msdosfs/msdosfs_vfsops.c =================================================================== RCS file: /home/ncvs/src/sys/fs/msdosfs/msdosfs_vfsops.c,v retrieving revision 1.101 diff -u -r1.101 msdosfs_vfsops.c --- fs/msdosfs/msdosfs_vfsops.c 24 Apr 2003 18:19:19 -0000 1.101 +++ fs/msdosfs/msdosfs_vfsops.c 1 Jun 2003 18:04:37 -0000 @@ -832,20 +832,15 @@ } static struct vfsops msdosfs_vfsops = { - msdosfs_mount, - vfs_stdstart, - msdosfs_unmount, - msdosfs_root, - vfs_stdquotactl, - msdosfs_statfs, - msdosfs_sync, - vfs_stdvget, - msdosfs_fhtovp, - vfs_stdcheckexp, - msdosfs_vptofh, - msdosfs_init, - msdosfs_uninit, - vfs_stdextattrctl, + .vfs_mount = msdosfs_mount, + .vfs_unmount = msdosfs_unmount, + .vfs_root = msdosfs_root, + .vfs_statfs = msdosfs_statfs, + .vfs_sync = msdosfs_sync, + .vfs_fhtovp = msdosfs_fhtovp, + .vfs_vptofh = msdosfs_vptofh, + .vfs_init = msdosfs_init, + .vfs_uninit = msdosfs_uninit, }; VFS_SET(msdosfs_vfsops, msdosfs, 0); Index: fs/ntfs/ntfs_vfsops.c =================================================================== RCS file: /home/ncvs/src/sys/fs/ntfs/ntfs_vfsops.c,v retrieving revision 1.53 diff -u -r1.53 ntfs_vfsops.c --- fs/ntfs/ntfs_vfsops.c 11 Mar 2003 22:15:08 -0000 1.53 +++ fs/ntfs/ntfs_vfsops.c 1 Jun 2003 18:35:19 -0000 @@ -64,18 +64,15 @@ struct sockaddr; -static int ntfs_root(struct mount *, struct vnode **); -static int ntfs_statfs(struct mount *, struct statfs *, struct thread *); -static int ntfs_unmount(struct mount *, int, struct thread *); -static int ntfs_vget(struct mount *mp, ino_t ino, int lkflags, - struct vnode **vpp); -static int ntfs_mountfs(register struct vnode *, struct mount *, - struct ntfs_args *, struct thread *); -static int ntfs_vptofh(struct vnode *, struct fid *); -static int ntfs_fhtovp(struct mount *, struct fid *, struct vnode **); -static int ntfs_mount(struct mount *, char *, caddr_t, - struct nameidata *, struct thread *); -static int ntfs_init(struct vfsconf *); +static vfs_init_t ntfs_init; +static vfs_uninit_t ntfs_uninit; +static vfs_vget_t ntfs_vget; +static vfs_fhtovp_t ntfs_fhtovp; +static vfs_mount_t ntfs_mount; +static vfs_root_t ntfs_root; +static vfs_statfs_t ntfs_statfs; +static vfs_unmount_t ntfs_unmount; +static vfs_vptofh_t ntfs_vptofh; static int ntfs_init ( @@ -775,19 +772,14 @@ } static struct vfsops ntfs_vfsops = { - ntfs_mount, - vfs_stdstart, - ntfs_unmount, - ntfs_root, - vfs_stdquotactl, - ntfs_statfs, - vfs_stdnosync, - ntfs_vget, - ntfs_fhtovp, - vfs_stdcheckexp, - ntfs_vptofh, - ntfs_init, - ntfs_uninit, - vfs_stdextattrctl, + .vfs_mount = ntfs_mount, + .vfs_unmount = ntfs_unmount, + .vfs_root = ntfs_root, + .vfs_statfs = ntfs_statfs, + .vfs_vget = ntfs_vget, + .vfs_fhtovp = ntfs_fhtovp, + .vfs_vptofh = ntfs_vptofh, + .vfs_init = ntfs_init, + .vfs_uninit = ntfs_uninit, }; VFS_SET(ntfs_vfsops, ntfs, 0); Index: fs/nullfs/null_vfsops.c =================================================================== RCS file: /home/ncvs/src/sys/fs/nullfs/null_vfsops.c,v retrieving revision 1.58 diff -u -r1.58 null_vfsops.c --- fs/nullfs/null_vfsops.c 31 May 2003 18:44:24 -0000 1.58 +++ fs/nullfs/null_vfsops.c 1 Jun 2003 18:43:58 -0000 @@ -58,28 +58,17 @@ static MALLOC_DEFINE(M_NULLFSMNT, "NULLFS mount", "NULLFS mount structure"); -static int nullfs_fhtovp(struct mount *mp, struct fid *fidp, - struct vnode **vpp); -static int nullfs_checkexp(struct mount *mp, struct sockaddr *nam, - int *extflagsp, struct ucred **credanonp); -static int nullfs_mount(struct mount *mp, struct nameidata *ndp, - struct thread *td); -static int nullfs_quotactl(struct mount *mp, int cmd, uid_t uid, - caddr_t arg, struct thread *td); -static int nullfs_root(struct mount *mp, struct vnode **vpp); -static int nullfs_start(struct mount *mp, int flags, struct thread *td); -static int nullfs_statfs(struct mount *mp, struct statfs *sbp, - struct thread *td); -static int nullfs_sync(struct mount *mp, int waitfor, - struct ucred *cred, struct thread *td); -static int nullfs_unmount(struct mount *mp, int mntflags, struct thread *td); -static int nullfs_vget(struct mount *mp, ino_t ino, int flags, - struct vnode **vpp); -static int nullfs_vptofh(struct vnode *vp, struct fid *fhp); -static int nullfs_extattrctl(struct mount *mp, int cmd, - struct vnode *filename_vp, - int namespace, const char *attrname, - struct thread *td); +static vfs_fhtovp_t nullfs_fhtovp; +static vfs_checkexp_t nullfs_checkexp; +static vfs_nmount_t nullfs_mount; +static vfs_quotactl_t nullfs_quotactl; +static vfs_root_t nullfs_root; +static vfs_start_t nullfs_start; +static vfs_sync_t nullfs_sync; +static vfs_unmount_t nullfs_unmount; +static vfs_vget_t nullfs_vget; +static vfs_vptofh_t nullfs_vptofh; +static vfs_extattrctl_t nullfs_extattrctl; /* * Mount null layer @@ -412,21 +401,20 @@ static struct vfsops null_vfsops = { - NULL, - nullfs_start, - nullfs_unmount, - nullfs_root, - nullfs_quotactl, - nullfs_statfs, - nullfs_sync, - nullfs_vget, - nullfs_fhtovp, - nullfs_checkexp, - nullfs_vptofh, - nullfs_init, - nullfs_uninit, - nullfs_extattrctl, - nullfs_mount, + .vfs_start = nullfs_start, + .vfs_unmount = nullfs_unmount, + .vfs_root = nullfs_root, + .vfs_quotactl = nullfs_quotactl, + .vfs_statfs = nullfs_statfs, + .vfs_sync = nullfs_sync, + .vfs_vget = nullfs_vget, + .vfs_fhtovp = nullfs_fhtovp, + .vfs_checkexp = nullfs_checkexp, + .vfs_vptofh = nullfs_vptofh, + .vfs_init = nullfs_init, + .vfs_uninit = nullfs_uninit, + .vfs_extattrctl = nullfs_extattrctl, + .vfs_nmount = nullfs_mount, }; VFS_SET(null_vfsops, nullfs, VFCF_LOOPBACK); Index: fs/nwfs/nwfs_vfsops.c =================================================================== RCS file: /home/ncvs/src/sys/fs/nwfs/nwfs_vfsops.c,v retrieving revision 1.29 diff -u -r1.29 nwfs_vfsops.c --- fs/nwfs/nwfs_vfsops.c 1 Apr 2003 02:47:09 -0000 1.29 +++ fs/nwfs/nwfs_vfsops.c 1 Jun 2003 18:20:03 -0000 @@ -70,31 +70,24 @@ MODULE_DEPEND(nwfs, ncp, 1, 1, 1); MODULE_DEPEND(nwfs, libmchain, 1, 1, 1); -static int nwfs_mount(struct mount *, char *, caddr_t, - struct nameidata *, struct thread *); -static int nwfs_quotactl(struct mount *, int, uid_t, caddr_t, struct thread *); -static int nwfs_root(struct mount *, struct vnode **); -static int nwfs_start(struct mount *, int, struct thread *); -static int nwfs_statfs(struct mount *, struct statfs *, struct thread *); -static int nwfs_unmount(struct mount *, int, struct thread *); -static int nwfs_init(struct vfsconf *vfsp); -static int nwfs_uninit(struct vfsconf *vfsp); +static vfs_mount_t nwfs_mount; +static vfs_quotactl_t nwfs_quotactl; +static vfs_root_t nwfs_root; +static vfs_start_t nwfs_start; +static vfs_statfs_t nwfs_statfs; +static vfs_unmount_t nwfs_unmount; +static vfs_init_t nwfs_init; +static vfs_uninit_t nwfs_uninit; static struct vfsops nwfs_vfsops = { - nwfs_mount, - nwfs_start, - nwfs_unmount, - nwfs_root, - nwfs_quotactl, - nwfs_statfs, - vfs_stdsync, - vfs_stdvget, - vfs_stdfhtovp, /* shouldn't happen */ - vfs_stdcheckexp, - vfs_stdvptofh, /* shouldn't happen */ - nwfs_init, - nwfs_uninit, - vfs_stdextattrctl, + .vfs_mount = nwfs_mount, + .vfs_start = nwfs_start, + .vfs_unmount = nwfs_unmount, + .vf_root = nwfs_root, + .vfs_quotactl = nwfs_quotactl, + .vfs_statfs = nwfs_statfs, + .vfs_init = nwfs_init, + .vfs_uninit = nwfs_uninit, }; Index: fs/portalfs/portal_vfsops.c =================================================================== RCS file: /home/ncvs/src/sys/fs/portalfs/portal_vfsops.c,v retrieving revision 1.46 diff -u -r1.46 portal_vfsops.c --- fs/portalfs/portal_vfsops.c 11 Mar 2003 22:15:09 -0000 1.46 +++ fs/portalfs/portal_vfsops.c 1 Jun 2003 18:44:16 -0000 @@ -62,13 +62,10 @@ static MALLOC_DEFINE(M_PORTALFSMNT, "PORTAL mount", "PORTAL mount structure"); -static int portal_mount(struct mount *mp, char *path, caddr_t data, - struct nameidata *ndp, struct thread *td); -static int portal_unmount(struct mount *mp, int mntflags, - struct thread *td); -static int portal_root(struct mount *mp, struct vnode **vpp); -static int portal_statfs(struct mount *mp, struct statfs *sbp, - struct thread *td); +static vfs_mount_t portal_mount; +static vfs_unmount_t portal_unmount; +static vfs_root_t portal_root; +static vfs_statfs_t portal_statfs; /* * Mount the per-process file descriptors (/dev/fd) @@ -243,20 +240,10 @@ } static struct vfsops portal_vfsops = { - portal_mount, - vfs_stdstart, - portal_unmount, - portal_root, - vfs_stdquotactl, - portal_statfs, - vfs_stdnosync, - vfs_stdvget, - vfs_stdfhtovp, - vfs_stdcheckexp, - vfs_stdvptofh, - vfs_stdinit, - vfs_stduninit, - vfs_stdextattrctl, + .vfs_mount = portal_mount, + .vfs_unmount = portal_unmount, + .vfs_root = portal_root, + .vfs_statfs = portal_statfs, }; VFS_SET(portal_vfsops, portalfs, VFCF_SYNTHETIC); Index: fs/pseudofs/pseudofs.h =================================================================== RCS file: /home/ncvs/src/sys/fs/pseudofs/pseudofs.h,v retrieving revision 1.24 diff -u -r1.24 pseudofs.h --- fs/pseudofs/pseudofs.h 11 Mar 2003 22:15:09 -0000 1.24 +++ fs/pseudofs/pseudofs.h 1 Jun 2003 17:55:45 -0000 @@ -250,21 +250,11 @@ } \ \ static struct vfsops name##_vfsops = { \ - NULL, \ - vfs_stdstart, \ - pfs_unmount, \ - pfs_root, \ - vfs_stdquotactl, \ - pfs_statfs, \ - vfs_stdnosync, \ - vfs_stdvget, \ - vfs_stdfhtovp, \ - vfs_stdcheckexp, \ - vfs_stdvptofh, \ - _##name##_init, \ - _##name##_uninit, \ - vfs_stdextattrctl, \ - _##name##_mount, \ + .vfs_unmount = pfs_unmount, \ + .vfs_root = pfs_root, \ + .vfs_init = _##name##_init, \ + .vfs_uninit = _##name##_uninit, \ + .vfs_nmount = _##name##_mount, \ }; \ VFS_SET(name##_vfsops, name, VFCF_SYNTHETIC); \ MODULE_VERSION(name, version); \ Index: fs/smbfs/smbfs_vfsops.c =================================================================== RCS file: /home/ncvs/src/sys/fs/smbfs/smbfs_vfsops.c,v retrieving revision 1.18 diff -u -r1.18 smbfs_vfsops.c --- fs/smbfs/smbfs_vfsops.c 1 Apr 2003 02:42:02 -0000 1.18 +++ fs/smbfs/smbfs_vfsops.c 1 Jun 2003 18:25:16 -0000 @@ -76,32 +76,24 @@ static MALLOC_DEFINE(M_SMBFSHASH, "SMBFS hash", "SMBFS hash table"); - -static int smbfs_mount(struct mount *, char *, caddr_t, - struct nameidata *, struct thread *); -static int smbfs_quotactl(struct mount *, int, uid_t, caddr_t, struct thread *); -static int smbfs_root(struct mount *, struct vnode **); -static int smbfs_start(struct mount *, int, struct thread *); -static int smbfs_statfs(struct mount *, struct statfs *, struct thread *); -static int smbfs_unmount(struct mount *, int, struct thread *); -static int smbfs_init(struct vfsconf *vfsp); -static int smbfs_uninit(struct vfsconf *vfsp); +static vfs_init_t smbfs_init; +static vfs_uninit_t smbfs_uninit; +static vfs_mount_t smbfs_mount; +static vfs_start_t smbfs_start; +static vfs_root_t smbfs_root; +static vfs_quotactl_t smbfs_quotactl; +static vfs_statfs_t smbfs_statfs; +static vfs_unmount_t smbfs_unmount; static struct vfsops smbfs_vfsops = { - smbfs_mount, - smbfs_start, - smbfs_unmount, - smbfs_root, - smbfs_quotactl, - smbfs_statfs, - vfs_stdsync, - vfs_stdvget, - vfs_stdfhtovp, /* shouldn't happen */ - vfs_stdcheckexp, - vfs_stdvptofh, /* shouldn't happen */ - smbfs_init, - smbfs_uninit, - vfs_stdextattrctl + .vfs_mount = smbfs_mount, + .vfs_start = smbfs_start, + .vfs_unmount = smbfs_unmount, + .vfs_root = smbfs_root, + .vfs_quotactl = smbfs_quotactl, + .vfs_statfs = smbfs_statfs, + .vfs_init = smbfs_init, + .vfs_uninit = smbfs_uninit, }; Index: fs/udf/udf_vfsops.c =================================================================== RCS file: /home/ncvs/src/sys/fs/udf/udf_vfsops.c,v retrieving revision 1.12 diff -u -r1.12 udf_vfsops.c --- fs/udf/udf_vfsops.c 4 May 2003 07:41:07 -0000 1.12 +++ fs/udf/udf_vfsops.c 1 Jun 2003 18:43:43 -0000 @@ -101,32 +101,27 @@ uma_zone_t udf_zone_node = NULL; uma_zone_t udf_zone_ds = NULL; -static int udf_init(struct vfsconf *); -static int udf_uninit(struct vfsconf *); -static int udf_mount(struct mount *, struct nameidata *, struct thread *); -static int udf_unmount(struct mount *, int, struct thread *); -static int udf_root(struct mount *, struct vnode **); -static int udf_statfs(struct mount *, struct statfs *, struct thread *); -static int udf_fhtovp(struct mount *, struct fid *, struct vnode **); -static int udf_vptofh(struct vnode *, struct fid *); +static vfs_init_t udf_init; +static vfs_uninit_t udf_uninit; +static vfs_nmount_t udf_mount; +static vfs_root_t udf_root; +static vfs_statfs_t udf_statfs; +static vfs_unmount_t udf_unmount; +static vfs_fhtovp_t udf_fhtovp; +static vfs_vptofh_t udf_vptofh; + static int udf_find_partmaps(struct udf_mnt *, struct logvol_desc *); static struct vfsops udf_vfsops = { - NULL, - vfs_stdstart, - udf_unmount, - udf_root, - vfs_stdquotactl, - udf_statfs, - vfs_stdnosync, - udf_vget, - udf_fhtovp, - vfs_stdcheckexp, - udf_vptofh, - udf_init, - udf_uninit, - vfs_stdextattrctl, - udf_mount, + .vfs_unmount = udf_unmount, + .vfs_root = udf_root, + .vfs_statfs = udf_statfs, + .vfs_vget = udf_vget, + .vfs_fhtovp = udf_fhtovp, + .vfs_vptofh = udf_vptofh, + .vfs_init = udf_init, + .vfs_uninit = udf_uninit, + .vfs_nmount = udf_mount, }; VFS_SET(udf_vfsops, udf, VFCF_READONLY); Index: fs/umapfs/umap_vfsops.c =================================================================== RCS file: /home/ncvs/src/sys/fs/umapfs/umap_vfsops.c,v retrieving revision 1.54 diff -u -r1.54 umap_vfsops.c --- fs/umapfs/umap_vfsops.c 31 May 2003 18:46:45 -0000 1.54 +++ fs/umapfs/umap_vfsops.c 1 Jun 2003 18:28:13 -0000 @@ -57,27 +57,17 @@ static MALLOC_DEFINE(M_UMAPFSMNT, "UMAP mount", "UMAP mount structure"); -static int umapfs_fhtovp(struct mount *mp, struct fid *fidp, - struct vnode **vpp); -static int umapfs_checkexp(struct mount *mp, struct sockaddr *nam, - int *extflagsp, struct ucred **credanonp); -static int umapfs_mount(struct mount *mp, char *path, caddr_t data, - struct nameidata *ndp, struct thread *td); -static int umapfs_quotactl(struct mount *mp, int cmd, uid_t uid, - caddr_t arg, struct thread *td); -static int umapfs_root(struct mount *mp, struct vnode **vpp); -static int umapfs_start(struct mount *mp, int flags, struct thread *td); -static int umapfs_statfs(struct mount *mp, struct statfs *sbp, - struct thread *td); -static int umapfs_unmount(struct mount *mp, int mntflags, - struct thread *td); -static int umapfs_vget(struct mount *mp, ino_t ino, int flags, - struct vnode **vpp); -static int umapfs_vptofh(struct vnode *vp, struct fid *fhp); -static int umapfs_extattrctl(struct mount *mp, int cmd, - struct vnode *filename_vp, - int namespace, const char *attrname, - struct thread *td); +static vfs_mount_t umapfs_mount; +static vfs_start_t umapfs_start; +static vfs_root_t umapfs_root; +static vfs_quotactl_t umapfs_quotactl; +static vfs_statfs_t umapfs_statfs; +static vfs_unmount_t umapfs_unmount; +static vfs_fhtovp_t umapfs_fhtovp; +static vfs_vptofh_t umapfs_vptofh; +static vfs_checkexp_t umapfs_checkexp; +static vfs_vget_t umapfs_vget; +static vfs_extattrctl_t umapfs_extattrctl; /* * Mount umap layer @@ -439,20 +429,18 @@ } static struct vfsops umap_vfsops = { - umapfs_mount, - umapfs_start, - umapfs_unmount, - umapfs_root, - umapfs_quotactl, - umapfs_statfs, - vfs_stdnosync, - umapfs_vget, - umapfs_fhtovp, - umapfs_checkexp, - umapfs_vptofh, - umapfs_init, - vfs_stduninit, - umapfs_extattrctl, + .vfs_mount = umapfs_mount, + .vfs_start = umapfs_start, + .vfs_unmount = umapfs_unmount, + .vfs_root = umapfs_root, + .vfs_quotactl = umapfs_quotactl, + .vfs_statfs = umapfs_statfs, + .vfs_vget = umapfs_vget, + .vfs_fhtovp = umapfs_fhtovp, + .vfs_checkexp = umapfs_checkexp, + .vfs_vptofh = umapfs_vptofh, + .vfs_init = umapfs_init, + .vfs_extattrctl = umapfs_extattrctl, }; VFS_SET(umap_vfsops, umapfs, VFCF_LOOPBACK); Index: fs/unionfs/union_vfsops.c =================================================================== RCS file: /home/ncvs/src/sys/fs/unionfs/union_vfsops.c,v retrieving revision 1.61 diff -u -r1.61 union_vfsops.c --- fs/unionfs/union_vfsops.c 11 Mar 2003 22:15:09 -0000 1.61 +++ fs/unionfs/union_vfsops.c 1 Jun 2003 18:45:20 -0000 @@ -57,14 +57,11 @@ static MALLOC_DEFINE(M_UNIONFSMNT, "UNION mount", "UNION mount structure"); -extern int union_init(struct vfsconf *); -static int union_mount(struct mount *mp, struct nameidata *ndp, - struct thread *td); -static int union_root(struct mount *mp, struct vnode **vpp); -static int union_statfs(struct mount *mp, struct statfs *sbp, - struct thread *td); -static int union_unmount(struct mount *mp, int mntflags, - struct thread *td); +extern vfs_init_t union_init; +static vfs_uninit_t union_uninit; +static vfs_root_t union_root; +static vfs_nmount_t union_mount; +static vfs_unmount_t union_unmount; /* * Mount union filesystem. @@ -496,21 +493,11 @@ } static struct vfsops union_vfsops = { - NULL, - vfs_stdstart, /* underlying start already done */ - union_unmount, - union_root, - vfs_stdquotactl, - union_statfs, - vfs_stdnosync, /* XXX assumes no cached data on union level */ - vfs_stdvget, - vfs_stdfhtovp, - vfs_stdcheckexp, - vfs_stdvptofh, - union_init, - vfs_stduninit, - vfs_stdextattrctl, - union_mount, + .vfs_unmount = union_unmount, + .vfs_root = union_root, + .vfs_statfs = union_statfs, + .vfs_init = union_init, + .vfs_nmount = union_mount, }; VFS_SET(union_vfsops, unionfs, VFCF_LOOPBACK); Index: isofs/cd9660/cd9660_vfsops.c =================================================================== RCS file: /home/ncvs/src/sys/isofs/cd9660/cd9660_vfsops.c,v retrieving revision 1.109 diff -u -r1.109 cd9660_vfsops.c --- isofs/cd9660/cd9660_vfsops.c 11 Mar 2003 22:15:09 -0000 1.109 +++ isofs/cd9660/cd9660_vfsops.c 1 Jun 2003 18:09:42 -0000 @@ -73,20 +73,15 @@ static vfs_vptofh_t cd9660_vptofh; static struct vfsops cd9660_vfsops = { - cd9660_mount, - vfs_stdstart, - cd9660_unmount, - cd9660_root, - vfs_stdquotactl, - cd9660_statfs, - vfs_stdnosync, - cd9660_vget, - cd9660_fhtovp, - vfs_stdcheckexp, - cd9660_vptofh, - cd9660_init, - cd9660_uninit, - vfs_stdextattrctl, + .vfs_mount = cd9660_mount, + .vfs_unmount = cd9660_unmount, + .vfs_root = cd9660_root, + .vfs_statfs = cd9660_statfs, + .vfs_vget = cd9660_vget, + .vfs_fhtovp = cd9660_fhtovp, + .vfs_vptofh = cd9660_vptofh, + .vfs_init = cd9660_init, + .vfs_uninit = cd9660_uninit, }; VFS_SET(cd9660_vfsops, cd9660, VFCF_READONLY); MODULE_VERSION(cd9660, 1); Index: kern/vfs_init.c =================================================================== RCS file: /home/ncvs/src/sys/kern/vfs_init.c,v retrieving revision 1.63 diff -u -r1.63 vfs_init.c --- kern/vfs_init.c 19 Feb 2003 05:47:26 -0000 1.63 +++ kern/vfs_init.c 1 Jun 2003 17:07:38 -0000 @@ -372,7 +372,8 @@ { struct sysctl_oid *oidp; struct vfsconf *vfsp; - + struct vfsops *vfsops; + vfsp = NULL; if (vfsconf) for (vfsp = vfsconf; vfsp->vfc_next; vfsp = vfsp->vfc_next) @@ -403,6 +404,56 @@ sysctl_register_oid(oidp); } + KASSERT(vfc->vfs_vfsops != NULL, ("NULL vfsops vector!")); + vfsops = vfc->vfc_vfsops; + + /* + * Initialise unfilled ``struct vfsops'' fields, to use + * the vfs_std*() functions. Note, we need the mount + * and unmount operations, at the least. + */ + KASSERT(vfsops->vfs_mount != NULL || vfsops->vfs_nmount != NULL, + ("Filesystem: %s has no mount operation!")); + KASSERT(vfsops->vfs_unmount != NULL, + ("Filesystem: %s has no unmount operation!")); + + if (vfsops->vfs_start == NULL) + /* make a file system operational */ + vfsops->vfs_start = vfs_stdstart; + if (vfsops->vfs_root == NULL) + /* return file system's root vnode */ + vfsops->vfs_root = vfs_stdroot; + if (vfsops->vfs_quotactl == NULL) + /* quota control */ + vfsops->vfs_quotactl = vfs_stdquotactl; + if (vfsops->vfs_statfs == NULL) + /* return file system's status */ + vfsops->vfs_statfs = vfs_stdstatfs; + if (vfsops->vfs_sync == NULL) + /* flush unwritten data */ + vfsops->vfs_sync = vfs_stdsync; + if (vfsops->vfs_vget == NULL) + /* convert an inode number to a vnode */ + vfsops->vfs_vget = vfs_stdvget; + if (vfsops->vfs_fhtovp == NULL) + /* turn an NFS file handle into a vnode */ + vfsops->vfs_fhtovp = vfs_stdfhtovp; + if (vfsops->vfs_checkexp == NULL) + /* check if file system is exported */ + vfsops->vfs_checkexp = vfs_stdcheckexp; + if (vfsops->vfs_vptofh == NULL) + /* turn a vnode into an NFS file handle */ + vfsops->vfs_vptofh = vfs_stdvptofh; + if (vfsops->vfs_init == NULL) + /* file system specific initialisation */ + vfsops->vfs_init = vfs_stdinit; + if (vfsops->vfs_uninit == NULL) + /* file system specific uninitialisation */ + vfsops->vfs_uninit = vfs_stduninit; + if (vfsops->vfs_extattrctl == NULL) + /* extended attribute control */ + vfsops->vfs_extattrctl = vfs_stdextattrctl; + /* * Call init function for this VFS... */ Index: ufs/ffs/ffs_vfsops.c =================================================================== RCS file: /home/ncvs/src/sys/ufs/ffs/ffs_vfsops.c,v retrieving revision 1.212 diff -u -r1.212 ffs_vfsops.c --- ufs/ffs/ffs_vfsops.c 31 May 2003 18:17:32 -0000 1.212 +++ ufs/ffs/ffs_vfsops.c 1 Jun 2003 17:20:38 -0000 @@ -81,20 +81,19 @@ static vfs_extattrctl_t ffs_extattrctl; static struct vfsops ufs_vfsops = { - ffs_mount, - ufs_start, - ffs_unmount, - ufs_root, - ufs_quotactl, - ffs_statfs, - ffs_sync, - ffs_vget, - ffs_fhtovp, - vfs_stdcheckexp, - ffs_vptofh, - ffs_init, - ffs_uninit, - ffs_extattrctl, + .vfs_mount = ffs_mount, + .vfs_start = ufs_start, + .vfs_unmount = ffs_unmount, + .vfs_root = ufs_root, + .vfs_quotactl = ufs_quotactl, + .vfs_statfs = ffs_statfs, + .vfs_sync = ffs_sync, + .vfs_vget = ffs_vget, + .vfs_fhtovp = ffs_fhtovp, + .vfs_vptofh = ffs_vptofh, + .vfs_init = ffs_init, + .vfs_uninit = ffs_uninit, + .vfs_extattrctl = ffs_extattrctl, }; VFS_SET(ufs_vfsops, ufs, 0);