summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-06-12 20:48:38 +0000
committerphk <phk@FreeBSD.org>2003-06-12 20:48:38 +0000
commitfd139fd7d009dbf6f6353b2011b0ff0bf4b32d44 (patch)
tree18550103bc5d68f2255cbfa41b2ed5008e5dd743 /sys/fs
parentc4e22440ca79ff6a8d00e3d6d31f6029efa1cb8e (diff)
downloadFreeBSD-src-fd139fd7d009dbf6f6353b2011b0ff0bf4b32d44.zip
FreeBSD-src-fd139fd7d009dbf6f6353b2011b0ff0bf4b32d44.tar.gz
Initialize struct vfsops C99-sparsely.
Submitted by: hmp Reviewed by: phk
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/cd9660/cd9660_vfsops.c23
-rw-r--r--sys/fs/coda/coda_vfsops.c20
-rw-r--r--sys/fs/coda/coda_vfsops.h24
-rw-r--r--sys/fs/devfs/devfs_vfsops.c19
-rw-r--r--sys/fs/fdescfs/fdesc_vfsops.c31
-rw-r--r--sys/fs/hpfs/hpfs_vfsops.c44
-rw-r--r--sys/fs/msdosfs/msdosfs_vfsops.c23
-rw-r--r--sys/fs/ntfs/ntfs_vfsops.c43
-rw-r--r--sys/fs/nullfs/null_vfsops.c63
-rw-r--r--sys/fs/nwfs/nwfs_vfsops.c40
-rw-r--r--sys/fs/portalfs/portal_vfsops.c29
-rw-r--r--sys/fs/pseudofs/pseudofs.h21
-rw-r--r--sys/fs/smbfs/smbfs_vfsops.c41
-rw-r--r--sys/fs/udf/udf_vfsops.c41
-rw-r--r--sys/fs/umapfs/umap_vfsops.c58
-rw-r--r--sys/fs/unionfs/union_vfsops.c33
16 files changed, 212 insertions, 341 deletions
diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c
index f62298e..c076d08 100644
--- a/sys/fs/cd9660/cd9660_vfsops.c
+++ b/sys/fs/cd9660/cd9660_vfsops.c
@@ -75,20 +75,15 @@ static vfs_fhtovp_t cd9660_fhtovp;
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_fhtovp = cd9660_fhtovp,
+ .vfs_init = cd9660_init,
+ .vfs_mount = cd9660_mount,
+ .vfs_root = cd9660_root,
+ .vfs_statfs = cd9660_statfs,
+ .vfs_uninit = cd9660_uninit,
+ .vfs_unmount = cd9660_unmount,
+ .vfs_vget = cd9660_vget,
+ .vfs_vptofh = cd9660_vptofh,
};
VFS_SET(cd9660_vfsops, cd9660, VFCF_READONLY);
MODULE_VERSION(cd9660, 1);
diff --git a/sys/fs/coda/coda_vfsops.c b/sys/fs/coda/coda_vfsops.c
index 4c03a6c..3c326bd 100644
--- a/sys/fs/coda/coda_vfsops.c
+++ b/sys/fs/coda/coda_vfsops.c
@@ -550,20 +550,12 @@ struct mount *devtomp(dev)
}
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_root = coda_root,
+ .vfs_start = coda_start,
+ .vfs_statfs = coda_nb_statfs,
+ .vfs_sync = coda_sync,
+ .vfs_unmount = coda_unmount,
};
VFS_SET(coda_vfsops, coda, VFCF_NETWORK);
diff --git a/sys/fs/coda/coda_vfsops.h b/sys/fs/coda/coda_vfsops.h
index 57b9a5a..fbbcec4 100644
--- a/sys/fs/coda/coda_vfsops.h
+++ b/sys/fs/coda/coda_vfsops.h
@@ -47,18 +47,18 @@ struct mbuf;
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);
+ int *, struct ucred **);
+
+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_nb_statfs;
+vfs_sync_t coda_sync;
+vfs_vget_t coda_vget;
+vfs_vptofh_t coda_vptofh;
+vfs_init_t coda_init;
int getNewVnode(struct vnode **vpp);
diff --git a/sys/fs/devfs/devfs_vfsops.c b/sys/fs/devfs/devfs_vfsops.c
index c1af1cd..a10efa2 100644
--- a/sys/fs/devfs/devfs_vfsops.c
+++ b/sys/fs/devfs/devfs_vfsops.c
@@ -188,21 +188,10 @@ devfs_statfs(mp, sbp, td)
}
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_nmount = devfs_nmount,
+ .vfs_root = devfs_root,
+ .vfs_statfs = devfs_statfs,
+ .vfs_unmount = devfs_unmount,
};
VFS_SET(devfs_vfsops, devfs, VFCF_SYNTHETIC);
diff --git a/sys/fs/fdescfs/fdesc_vfsops.c b/sys/fs/fdescfs/fdesc_vfsops.c
index fbe73d9..ff9396d 100644
--- a/sys/fs/fdescfs/fdesc_vfsops.c
+++ b/sys/fs/fdescfs/fdesc_vfsops.c
@@ -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 @@ fdesc_statfs(mp, sbp, td)
}
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_init = fdesc_init,
+ .vfs_nmount = fdesc_mount,
+ .vfs_root = fdesc_root,
+ .vfs_statfs = fdesc_statfs,
+ .vfs_unmount = fdesc_unmount,
};
VFS_SET(fdesc_vfsops, fdescfs, VFCF_SYNTHETIC);
diff --git a/sys/fs/hpfs/hpfs_vfsops.c b/sys/fs/hpfs/hpfs_vfsops.c
index 225f340..a838909 100644
--- a/sys/fs/hpfs/hpfs_vfsops.c
+++ b/sys/fs/hpfs/hpfs_vfsops.c
@@ -55,19 +55,18 @@ MALLOC_DEFINE(M_HPFSNO, "HPFS node", "HPFS node structure");
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 +570,14 @@ hpfs_vget(
}
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_fhtovp = hpfs_fhtovp,
+ .vfs_init = hpfs_init,
+ .vfs_mount = hpfs_mount,
+ .vfs_root = hpfs_root,
+ .vfs_statfs = hpfs_statfs,
+ .vfs_uninit = hpfs_uninit,
+ .vfs_unmount = hpfs_unmount,
+ .vfs_vget = hpfs_vget,
+ .vfs_vptofh = hpfs_vptofh,
};
VFS_SET(hpfs_vfsops, hpfs, 0);
diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c
index 3c5565e..ac092b8 100644
--- a/sys/fs/msdosfs/msdosfs_vfsops.c
+++ b/sys/fs/msdosfs/msdosfs_vfsops.c
@@ -832,20 +832,15 @@ msdosfs_vptofh(vp, fhp)
}
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_fhtovp = msdosfs_fhtovp,
+ .vfs_init = msdosfs_init,
+ .vfs_mount = msdosfs_mount,
+ .vfs_root = msdosfs_root,
+ .vfs_statfs = msdosfs_statfs,
+ .vfs_sync = msdosfs_sync,
+ .vfs_uninit = msdosfs_uninit,
+ .vfs_unmount = msdosfs_unmount,
+ .vfs_vptofh = msdosfs_vptofh,
};
VFS_SET(msdosfs_vfsops, msdosfs, 0);
diff --git a/sys/fs/ntfs/ntfs_vfsops.c b/sys/fs/ntfs/ntfs_vfsops.c
index 2506b28..0f3e60e 100644
--- a/sys/fs/ntfs/ntfs_vfsops.c
+++ b/sys/fs/ntfs/ntfs_vfsops.c
@@ -64,18 +64,18 @@ MALLOC_DEFINE(M_NTFSDIR,"NTFS dir", "NTFS dir buffer");
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 +775,14 @@ ntfs_vget(
}
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_fhtovp = ntfs_fhtovp,
+ .vfs_init = ntfs_init,
+ .vfs_mount = ntfs_mount,
+ .vfs_root = ntfs_root,
+ .vfs_statfs = ntfs_statfs,
+ .vfs_uninit = ntfs_uninit,
+ .vfs_unmount = ntfs_unmount,
+ .vfs_vget = ntfs_vget,
+ .vfs_vptofh = ntfs_vptofh,
};
VFS_SET(ntfs_vfsops, ntfs, 0);
diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c
index 6ace172..19fed32 100644
--- a/sys/fs/nullfs/null_vfsops.c
+++ b/sys/fs/nullfs/null_vfsops.c
@@ -58,28 +58,18 @@
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_statfs_t nullfs_statfs;
+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 +402,20 @@ nullfs_extattrctl(mp, cmd, filename_vp, namespace, attrname, td)
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_checkexp = nullfs_checkexp,
+ .vfs_extattrctl = nullfs_extattrctl,
+ .vfs_fhtovp = nullfs_fhtovp,
+ .vfs_init = nullfs_init,
+ .vfs_nmount = nullfs_mount,
+ .vfs_quotactl = nullfs_quotactl,
+ .vfs_root = nullfs_root,
+ .vfs_start = nullfs_start,
+ .vfs_statfs = nullfs_statfs,
+ .vfs_sync = nullfs_sync,
+ .vfs_uninit = nullfs_uninit,
+ .vfs_unmount = nullfs_unmount,
+ .vfs_vget = nullfs_vget,
+ .vfs_vptofh = nullfs_vptofh,
};
VFS_SET(null_vfsops, nullfs, VFCF_LOOPBACK);
diff --git a/sys/fs/nwfs/nwfs_vfsops.c b/sys/fs/nwfs/nwfs_vfsops.c
index 7979410..ee040c9 100644
--- a/sys/fs/nwfs/nwfs_vfsops.c
+++ b/sys/fs/nwfs/nwfs_vfsops.c
@@ -70,31 +70,25 @@ SYSCTL_INT(_vfs_nwfs, OID_AUTO, debuglevel, CTLFLAG_RW, &nwfs_debuglevel, 0, "")
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_init = nwfs_init,
+ .vfs_mount = nwfs_mount,
+ .vfs_quotactl = nwfs_quotactl,
+ .vfs_root = nwfs_root,
+ .vfs_start = nwfs_start,
+ .vfs_statfs = nwfs_statfs,
+ .vfs_sync = vfs_stdsync,
+ .vfs_uninit = nwfs_uninit,
+ .vfs_unmount = nwfs_unmount,
};
diff --git a/sys/fs/portalfs/portal_vfsops.c b/sys/fs/portalfs/portal_vfsops.c
index f731dc0..20f684f 100644
--- a/sys/fs/portalfs/portal_vfsops.c
+++ b/sys/fs/portalfs/portal_vfsops.c
@@ -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 @@ portal_statfs(mp, sbp, td)
}
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_root = portal_root,
+ .vfs_statfs = portal_statfs,
+ .vfs_unmount = portal_unmount,
};
VFS_SET(portal_vfsops, portalfs, VFCF_SYNTHETIC);
diff --git a/sys/fs/pseudofs/pseudofs.h b/sys/fs/pseudofs/pseudofs.h
index 3c9b34a..021ea3f 100644
--- a/sys/fs/pseudofs/pseudofs.h
+++ b/sys/fs/pseudofs/pseudofs.h
@@ -250,21 +250,12 @@ _##name##_uninit(struct vfsconf *vfc) { \
} \
\
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_init = _##name##_init, \
+ .vfs_nmount = _##name##_mount, \
+ .vfs_root = pfs_root, \
+ .vfs_statfs = pfs_statfs, \
+ .vfs_uninit = _##name##_uninit, \
+ .vfs_unmount = pfs_unmount, \
}; \
VFS_SET(name##_vfsops, name, VFCF_SYNTHETIC); \
MODULE_VERSION(name, version); \
diff --git a/sys/fs/smbfs/smbfs_vfsops.c b/sys/fs/smbfs/smbfs_vfsops.c
index 753efe8..2d8b3ac 100644
--- a/sys/fs/smbfs/smbfs_vfsops.c
+++ b/sys/fs/smbfs/smbfs_vfsops.c
@@ -76,32 +76,25 @@ SYSCTL_INT(_vfs_smbfs, OID_AUTO, debuglevel, CTLFLAG_RW, &smbfs_debuglevel, 0, "
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_init = smbfs_init,
+ .vfs_mount = smbfs_mount,
+ .vfs_quotactl = smbfs_quotactl,
+ .vfs_root = smbfs_root,
+ .vfs_start = smbfs_start,
+ .vfs_statfs = smbfs_statfs,
+ .vfs_sync = vfs_stdsync,
+ .vfs_uninit = smbfs_uninit,
+ .vfs_unmount = smbfs_unmount,
};
diff --git a/sys/fs/udf/udf_vfsops.c b/sys/fs/udf/udf_vfsops.c
index e047d75..2810bb8 100644
--- a/sys/fs/udf/udf_vfsops.c
+++ b/sys/fs/udf/udf_vfsops.c
@@ -101,32 +101,27 @@ uma_zone_t udf_zone_trans = NULL;
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_fhtovp = udf_fhtovp,
+ .vfs_init = udf_init,
+ .vfs_nmount = udf_mount,
+ .vfs_root = udf_root,
+ .vfs_statfs = udf_statfs,
+ .vfs_uninit = udf_uninit,
+ .vfs_unmount = udf_unmount,
+ .vfs_vget = udf_vget,
+ .vfs_vptofh = udf_vptofh,
};
VFS_SET(udf_vfsops, udf, VFCF_READONLY);
diff --git a/sys/fs/umapfs/umap_vfsops.c b/sys/fs/umapfs/umap_vfsops.c
index 5fb2d01..e42d590 100644
--- a/sys/fs/umapfs/umap_vfsops.c
+++ b/sys/fs/umapfs/umap_vfsops.c
@@ -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 @@ umapfs_extattrctl(mp, cmd, filename_vp, namespace, attrname, td)
}
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_checkexp = umapfs_checkexp,
+ .vfs_extattrctl = umapfs_extattrctl,
+ .vfs_fhtovp = umapfs_fhtovp,
+ .vfs_init = umapfs_init,
+ .vfs_mount = umapfs_mount,
+ .vfs_quotactl = umapfs_quotactl,
+ .vfs_root = umapfs_root,
+ .vfs_start = umapfs_start,
+ .vfs_statfs = umapfs_statfs,
+ .vfs_unmount = umapfs_unmount,
+ .vfs_vget = umapfs_vget,
+ .vfs_vptofh = umapfs_vptofh,
};
VFS_SET(umap_vfsops, umapfs, VFCF_LOOPBACK);
diff --git a/sys/fs/unionfs/union_vfsops.c b/sys/fs/unionfs/union_vfsops.c
index 0da935e..dae39b5 100644
--- a/sys/fs/unionfs/union_vfsops.c
+++ b/sys/fs/unionfs/union_vfsops.c
@@ -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_root_t union_root;
+static vfs_nmount_t union_mount;
+static vfs_statfs_t union_statfs;
+static vfs_unmount_t union_unmount;
/*
* Mount union filesystem.
@@ -496,21 +493,11 @@ union_statfs(mp, sbp, td)
}
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_init = union_init,
+ .vfs_nmount = union_mount,
+ .vfs_root = union_root,
+ .vfs_statfs = union_statfs,
+ .vfs_unmount = union_unmount,
};
VFS_SET(union_vfsops, unionfs, VFCF_LOOPBACK);
OpenPOWER on IntegriCloud