From: Chris Pressey Date: Tue, 18 May 2004 00:16:46 +0000 (+0000) Subject: Style(9) cleanup to src/sys/vfs, stage 19/21: ufs. X-Git-Tag: v2.0.1~11285 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/0973c589915cf8301457f3548918653990ee7caf Style(9) cleanup to src/sys/vfs, stage 19/21: ufs. - Convert K&R-style function definitions to ANSI style. Submitted-by: Andre Nathan Additional-reformatting-by: cpressey --- diff --git a/sys/vfs/ufs/ffs_alloc.c b/sys/vfs/ufs/ffs_alloc.c index 83c96b0d1e..850a4a606d 100644 --- a/sys/vfs/ufs/ffs_alloc.c +++ b/sys/vfs/ufs/ffs_alloc.c @@ -32,7 +32,7 @@ * * @(#)ffs_alloc.c 8.18 (Berkeley) 5/26/95 * $FreeBSD: src/sys/ufs/ffs/ffs_alloc.c,v 1.64.2.2 2001/09/21 19:15:21 dillon Exp $ - * $DragonFly: src/sys/vfs/ufs/ffs_alloc.c,v 1.8 2003/12/27 19:23:02 drhodus Exp $ + * $DragonFly: src/sys/vfs/ufs/ffs_alloc.c,v 1.9 2004/05/18 00:16:46 cpressey Exp $ */ #include "opt_quota.h" @@ -98,12 +98,8 @@ static ufs_daddr_t ffs_mapsearch (struct fs *, struct cg *, ufs_daddr_t, * available block is located. */ int -ffs_alloc(ip, lbn, bpref, size, cred, bnp) - struct inode *ip; - ufs_daddr_t lbn, bpref; - int size; - struct ucred *cred; - ufs_daddr_t *bnp; +ffs_alloc(struct inode *ip, ufs_daddr_t lbn, ufs_daddr_t bpref, int size, + struct ucred *cred, ufs_daddr_t *bnp) { struct fs *fs; ufs_daddr_t bno; @@ -169,13 +165,8 @@ nospace: * invoked to get an appropriate block. */ int -ffs_realloccg(ip, lbprev, bpref, osize, nsize, cred, bpp) - struct inode *ip; - ufs_daddr_t lbprev; - ufs_daddr_t bpref; - int osize, nsize; - struct ucred *cred; - struct buf **bpp; +ffs_realloccg(struct inode *ip, ufs_daddr_t lbprev, ufs_daddr_t bpref, + int osize, int nsize, struct ucred *cred, struct buf **bpp) { struct fs *fs; struct buf *bp; @@ -350,12 +341,11 @@ SYSCTL_INT(_vfs_ffs, FFS_REALLOCBLKS, doreallocblks, CTLFLAG_RW, &doreallocblks, static volatile int prtrealloc = 0; #endif +/* + * ffs_reallocblks(struct vnode *a_vp, struct cluster_save *a_buflist) + */ int -ffs_reallocblks(ap) - struct vop_reallocblks_args /* { - struct vnode *a_vp; - struct cluster_save *a_buflist; - } */ *ap; +ffs_reallocblks(struct vop_reallocblks_args *ap) { struct fs *fs; struct inode *ip; @@ -569,11 +559,7 @@ fail: * available inode is located. */ int -ffs_valloc(pvp, mode, cred, vpp) - struct vnode *pvp; - int mode; - struct ucred *cred; - struct vnode **vpp; +ffs_valloc(struct vnode *pvp, int mode, struct ucred *cred, struct vnode **vpp) { struct inode *pip; struct fs *fs; @@ -652,8 +638,7 @@ noinodes: * in another cylinder group. */ static ino_t -ffs_dirpref(pip) - struct inode *pip; +ffs_dirpref(struct inode *pip) { struct fs *fs; int cg, prefcg, dirsize, cgsize; @@ -774,11 +759,7 @@ ffs_dirpref(pip) * schedule another I/O transfer. */ ufs_daddr_t -ffs_blkpref(ip, lbn, indx, bap) - struct inode *ip; - ufs_daddr_t lbn; - int indx; - ufs_daddr_t *bap; +ffs_blkpref(struct inode *ip, ufs_daddr_t lbn, int indx, ufs_daddr_t *bap) { struct fs *fs; int cg; @@ -846,12 +827,9 @@ ffs_blkpref(ip, lbn, indx, bap) */ /*VARARGS5*/ static u_long -ffs_hashalloc(ip, cg, pref, size, allocator) - struct inode *ip; - int cg; - long pref; - int size; /* size for data blocks, mode for inodes */ - allocfcn_t *allocator; +ffs_hashalloc(struct inode *ip, int cg, long pref, + int size, /* size for data blocks, mode for inodes */ + allocfcn_t *allocator) { struct fs *fs; long result; /* XXX why not same type as we return? */ @@ -899,11 +877,7 @@ ffs_hashalloc(ip, cg, pref, size, allocator) * if they are, allocate them. */ static ufs_daddr_t -ffs_fragextend(ip, cg, bprev, osize, nsize) - struct inode *ip; - int cg; - long bprev; - int osize, nsize; +ffs_fragextend(struct inode *ip, int cg, long bprev, int osize, int nsize) { struct fs *fs; struct cg *cgp; @@ -974,11 +948,7 @@ ffs_fragextend(ip, cg, bprev, osize, nsize) * and if it is, allocate it. */ static ufs_daddr_t -ffs_alloccg(ip, cg, bpref, size) - struct inode *ip; - int cg; - ufs_daddr_t bpref; - int size; +ffs_alloccg(struct inode *ip, int cg, ufs_daddr_t bpref, int size) { struct fs *fs; struct cg *cgp; @@ -1075,10 +1045,7 @@ ffs_alloccg(ip, cg, bpref, size) * blocks may be fragmented by the routine that allocates them. */ static ufs_daddr_t -ffs_alloccgblk(ip, bp, bpref) - struct inode *ip; - struct buf *bp; - ufs_daddr_t bpref; +ffs_alloccgblk(struct inode *ip, struct buf *bp, ufs_daddr_t bpref) { struct fs *fs; struct cg *cgp; @@ -1195,11 +1162,7 @@ gotit: * take the first one that we find following bpref. */ static ufs_daddr_t -ffs_clusteralloc(ip, cg, bpref, len) - struct inode *ip; - int cg; - ufs_daddr_t bpref; - int len; +ffs_clusteralloc(struct inode *ip, int cg, ufs_daddr_t bpref, int len) { struct fs *fs; struct cg *cgp; @@ -1309,11 +1272,7 @@ fail: * inode in the specified cylinder group. */ static ino_t -ffs_nodealloccg(ip, cg, ipref, mode) - struct inode *ip; - int cg; - ufs_daddr_t ipref; - int mode; +ffs_nodealloccg(struct inode *ip, int cg, ufs_daddr_t ipref, int mode) { struct fs *fs; struct cg *cgp; @@ -1394,10 +1353,7 @@ gotit: * block reassembly is checked. */ void -ffs_blkfree(ip, bno, size) - struct inode *ip; - ufs_daddr_t bno; - long size; +ffs_blkfree(struct inode *ip, ufs_daddr_t bno, long size) { struct fs *fs; struct cg *cgp; @@ -1507,10 +1463,7 @@ ffs_blkfree(ip, bno, size) * fragment is allocated, false if it is free. */ static int -ffs_checkblk(ip, bno, size) - struct inode *ip; - ufs_daddr_t bno; - long size; +ffs_checkblk(struct inode *ip, ufs_daddr_t bno, long size) { struct fs *fs; struct cg *cgp; @@ -1555,10 +1508,7 @@ ffs_checkblk(ip, bno, size) * Free an inode. */ int -ffs_vfree( pvp, ino, mode) - struct vnode *pvp; - ino_t ino; - int mode; +ffs_vfree(struct vnode *pvp, ino_t ino, int mode) { if (DOINGSOFTDEP(pvp)) { softdep_freefile(pvp, ino, mode); @@ -1571,11 +1521,8 @@ ffs_vfree( pvp, ino, mode) * Do the actual free operation. * The specified inode is placed back in the free map. */ - int - ffs_freefile( pvp, ino, mode) - struct vnode *pvp; - ino_t ino; - int mode; +int +ffs_freefile(struct vnode *pvp, ino_t ino, int mode) { struct fs *fs; struct cg *cgp; @@ -1634,11 +1581,7 @@ ffs_vfree( pvp, ino, mode) * available. */ static ufs_daddr_t -ffs_mapsearch(fs, cgp, bpref, allocsiz) - struct fs *fs; - struct cg *cgp; - ufs_daddr_t bpref; - int allocsiz; +ffs_mapsearch(struct fs *fs, struct cg *cgp, ufs_daddr_t bpref, int allocsiz) { ufs_daddr_t bno; int start, len, loc, i; @@ -1700,11 +1643,7 @@ ffs_mapsearch(fs, cgp, bpref, allocsiz) * Cnt == 1 means free; cnt == -1 means allocating. */ static void -ffs_clusteracct(fs, cgp, blkno, cnt) - struct fs *fs; - struct cg *cgp; - ufs_daddr_t blkno; - int cnt; +ffs_clusteracct(struct fs *fs, struct cg *cgp, ufs_daddr_t blkno, int cnt) { int32_t *sump; int32_t *lp; @@ -1793,10 +1732,7 @@ ffs_clusteracct(fs, cgp, blkno, cnt) * fs: error message */ static void -ffs_fserr(fs, uid, cp) - struct fs *fs; - u_int uid; - char *cp; +ffs_fserr(struct fs *fs, u_int uid, char *cp) { struct thread *td = curthread; struct proc *p; diff --git a/sys/vfs/ufs/ffs_balloc.c b/sys/vfs/ufs/ffs_balloc.c index 8086610906..95a333877c 100644 --- a/sys/vfs/ufs/ffs_balloc.c +++ b/sys/vfs/ufs/ffs_balloc.c @@ -32,7 +32,7 @@ * * @(#)ffs_balloc.c 8.8 (Berkeley) 6/16/95 * $FreeBSD: src/sys/ufs/ffs/ffs_balloc.c,v 1.26.2.1 2002/10/10 19:48:20 dillon Exp $ - * $DragonFly: src/sys/vfs/ufs/ffs_balloc.c,v 1.6 2003/08/07 21:17:44 dillon Exp $ + * $DragonFly: src/sys/vfs/ufs/ffs_balloc.c,v 1.7 2004/05/18 00:16:46 cpressey Exp $ */ #include @@ -54,17 +54,12 @@ * Balloc defines the structure of file system storage * by allocating the physical blocks on a device given * the inode and the logical block number in a file. + * + * ffs_balloc(struct vnode *a_vp, ufs_daddr_t a_lbn, int a_size, + * struct ucred *a_cred, int a_flags, struct buf *a_bpp) */ int -ffs_balloc(ap) - struct vop_balloc_args /* { - struct vnode *a_vp; - ufs_daddr_t a_lbn; - int a_size; - struct ucred *a_cred; - int a_flags; - struct buf *a_bpp; - } */ *ap; +ffs_balloc(struct vop_balloc_args *ap) { struct inode *ip; ufs_daddr_t lbn; diff --git a/sys/vfs/ufs/ffs_inode.c b/sys/vfs/ufs/ffs_inode.c index 2df849e1c7..5ebe847402 100644 --- a/sys/vfs/ufs/ffs_inode.c +++ b/sys/vfs/ufs/ffs_inode.c @@ -32,7 +32,7 @@ * * @(#)ffs_inode.c 8.13 (Berkeley) 4/21/95 * $FreeBSD: src/sys/ufs/ffs/ffs_inode.c,v 1.56.2.5 2002/02/05 18:35:03 dillon Exp $ - * $DragonFly: src/sys/vfs/ufs/ffs_inode.c,v 1.9 2003/08/20 09:56:34 rob Exp $ + * $DragonFly: src/sys/vfs/ufs/ffs_inode.c,v 1.10 2004/05/18 00:16:46 cpressey Exp $ */ #include "opt_quota.h" @@ -74,9 +74,7 @@ static int ffs_indirtrunc (struct inode *, ufs_daddr_t, ufs_daddr_t, * set, then wait for the write to complete. */ int -ffs_update(vp, waitfor) - struct vnode *vp; - int waitfor; +ffs_update(struct vnode *vp, int waitfor) { struct fs *fs; struct buf *bp; @@ -131,12 +129,8 @@ ffs_update(vp, waitfor) * disk blocks. */ int -ffs_truncate(vp, length, flags, cred, td) - struct vnode *vp; - off_t length; - int flags; - struct ucred *cred; - struct thread *td; +ffs_truncate(struct vnode *vp, off_t length, int flags, struct ucred *cred, + struct thread *td) { struct vnode *ovp = vp; ufs_daddr_t lastblock; @@ -424,12 +418,8 @@ done: * NB: triple indirect blocks are untested. */ static int -ffs_indirtrunc(ip, lbn, dbn, lastbn, level, countp) - struct inode *ip; - ufs_daddr_t lbn, lastbn; - ufs_daddr_t dbn; - int level; - long *countp; +ffs_indirtrunc(struct inode *ip, ufs_daddr_t lbn, ufs_daddr_t dbn, + ufs_daddr_t lastbn, int level, long *countp) { int i; struct buf *bp; diff --git a/sys/vfs/ufs/ffs_softdep_stub.c b/sys/vfs/ufs/ffs_softdep_stub.c index c9f5504e93..080bbe8f48 100644 --- a/sys/vfs/ufs/ffs_softdep_stub.c +++ b/sys/vfs/ufs/ffs_softdep_stub.c @@ -33,7 +33,7 @@ * * from: @(#)ffs_softdep_stub.c 9.1 (McKusick) 7/10/97 * $FreeBSD: src/sys/ufs/ffs/ffs_softdep_stub.c,v 1.7.2.1 2000/12/28 11:01:45 ps Exp $ - * $DragonFly: src/sys/vfs/ufs/ffs_softdep_stub.c,v 1.4 2003/08/07 21:17:44 dillon Exp $ + * $DragonFly: src/sys/vfs/ufs/ffs_softdep_stub.c,v 1.5 2004/05/18 00:16:46 cpressey Exp $ */ /* @@ -74,182 +74,118 @@ softdep_initialize(void) } void -softdep_setup_inomapdep(bp, ip, newinum) - struct buf *bp; - struct inode *ip; - ino_t newinum; +softdep_setup_inomapdep(struct buf *bp, struct inode *ip, ino_t newinum) { - panic("softdep_setup_inomapdep called"); } void -softdep_setup_blkmapdep(bp, fs, newblkno) - struct buf *bp; - struct fs *fs; - ufs_daddr_t newblkno; +softdep_setup_blkmapdep(struct buf *bp, struct fs *fs, ufs_daddr_t newblkno) { - panic("softdep_setup_blkmapdep called"); } void -softdep_setup_allocdirect(ip, lbn, newblkno, oldblkno, newsize, oldsize, bp) - struct inode *ip; - ufs_lbn_t lbn; - ufs_daddr_t newblkno; - ufs_daddr_t oldblkno; - long newsize; - long oldsize; - struct buf *bp; -{ - +softdep_setup_allocdirect(struct inode *ip, ufs_lbn_t lbn, + ufs_daddr_t newblkno, ufs_daddr_t oldblkno, + long newsize, long oldsize, struct buf *bp) +{ panic("softdep_setup_allocdirect called"); } void -softdep_setup_allocindir_page(ip, lbn, bp, ptrno, newblkno, oldblkno, nbp) - struct inode *ip; - ufs_lbn_t lbn; - struct buf *bp; - int ptrno; - ufs_daddr_t newblkno; - ufs_daddr_t oldblkno; - struct buf *nbp; +softdep_setup_allocindir_page(struct inode *ip, ufs_lbn_t lbn, struct buf *bp, + int ptrno, ufs_daddr_t newblkno, + ufs_daddr_t oldblkno, struct buf *nbp) { - panic("softdep_setup_allocindir_page called"); } void -softdep_setup_allocindir_meta(nbp, ip, bp, ptrno, newblkno) - struct buf *nbp; - struct inode *ip; - struct buf *bp; - int ptrno; - ufs_daddr_t newblkno; +softdep_setup_allocindir_meta(struct buf *nbp, struct inode *ip, struct buf *bp, + int ptrno, ufs_daddr_t newblkno) { - panic("softdep_setup_allocindir_meta called"); } void -softdep_setup_freeblocks(ip, length) - struct inode *ip; - off_t length; +softdep_setup_freeblocks(struct inode *ip, off_t length) { - panic("softdep_setup_freeblocks called"); } /* XXX needed to change this for FreeBSD.. hit poul */ void -softdep_freefile(pvp, ino, mode) - struct vnode *pvp; - ino_t ino; - int mode; +softdep_freefile(struct vnode *pvp, ino_t ino, int mode) { - panic("softdep_freefile called"); } void -softdep_setup_directory_add(bp, dp, diroffset, newinum, newdirbp) - struct buf *bp; - struct inode *dp; - off_t diroffset; - long newinum; - struct buf *newdirbp; +softdep_setup_directory_add(struct buf *bp, struct inode *dp, off_t diroffset, + long newinum, struct buf *newdirbp) { - panic("softdep_setup_directory_add called"); } void -softdep_change_directoryentry_offset(dp, base, oldloc, newloc, entrysize) - struct inode *dp; - caddr_t base; - caddr_t oldloc; - caddr_t newloc; - int entrysize; +softdep_change_directoryentry_offset(struct inode *dp, caddr_t base, + caddr_t oldloc, caddr_t newloc, + int entrysize) { - panic("softdep_change_directoryentry_offset called"); } void -softdep_setup_remove(bp, dp, ip, isrmdir) - struct buf *bp; - struct inode *dp; - struct inode *ip; - int isrmdir; +softdep_setup_remove(struct buf *bp, struct inode *dp, struct inode *ip, + int isrmdir) { - panic("softdep_setup_remove called"); } void -softdep_setup_directory_change(bp, dp, ip, newinum, isrmdir) - struct buf *bp; - struct inode *dp; - struct inode *ip; - long newinum; - int isrmdir; +softdep_setup_directory_change(struct buf *bp, struct inode *dp, + struct inode *ip, long newinum, int isrmdir) { - panic("softdep_setup_directory_change called"); } void -softdep_change_linkcnt(ip) - struct inode *ip; +softdep_change_linkcnt(struct inode *ip) { - panic("softdep_change_linkcnt called"); } void -softdep_load_inodeblock(ip) - struct inode *ip; +softdep_load_inodeblock(struct inode *ip) { - panic("softdep_load_inodeblock called"); } void -softdep_update_inodeblock(ip, bp, waitfor) - struct inode *ip; - struct buf *bp; - int waitfor; +softdep_update_inodeblock(struct inode *ip, struct buf *bp, int waitfor) { - panic("softdep_update_inodeblock called"); } void -softdep_fsync_mountdev(vp) - struct vnode *vp; +softdep_fsync_mountdev(struct vnode *vp) { - return; } +/* + * softdep_sync_metadata(struct vnode *a_vp, struct ucred *a_cred, + * int a_waitfor, struct proc *a_p) + */ int -softdep_sync_metadata(ap) - struct vop_fsync_args /* { - struct vnode *a_vp; - struct ucred *a_cred; - int a_waitfor; - struct proc *a_p; - } */ *ap; +softdep_sync_metadata(struct vop_fsync_args *ap) { - return (0); } int -softdep_slowdown(vp) - struct vnode *vp; +softdep_slowdown(struct vnode *vp) { panic("softdep_slowdown called"); } diff --git a/sys/vfs/ufs/ffs_subr.c b/sys/vfs/ufs/ffs_subr.c index a77f80efeb..e0f321abd0 100644 --- a/sys/vfs/ufs/ffs_subr.c +++ b/sys/vfs/ufs/ffs_subr.c @@ -32,7 +32,7 @@ * * @(#)ffs_subr.c 8.5 (Berkeley) 3/21/95 * $FreeBSD: src/sys/ufs/ffs/ffs_subr.c,v 1.25 1999/12/29 04:55:04 peter Exp $ - * $DragonFly: src/sys/vfs/ufs/ffs_subr.c,v 1.6 2003/08/20 09:56:34 rob Exp $ + * $DragonFly: src/sys/vfs/ufs/ffs_subr.c,v 1.7 2004/05/18 00:16:46 cpressey Exp $ */ #include @@ -63,11 +63,7 @@ void ffs_checkoverlap (struct buf *, struct inode *); * remaining space in the directory. */ int -ffs_blkatoff(vp, offset, res, bpp) - struct vnode *vp; - off_t offset; - char **res; - struct buf **bpp; +ffs_blkatoff(struct vnode *vp, off_t offset, char **res, struct buf **bpp) { struct inode *ip; struct fs *fs; @@ -98,11 +94,7 @@ ffs_blkatoff(vp, offset, res, bpp) * of some frags. */ void -ffs_fragacct(fs, fragmap, fraglist, cnt) - struct fs *fs; - int fragmap; - int32_t fraglist[]; - int cnt; +ffs_fragacct(struct fs *fs, int fragmap, int32_t fraglist[], int cnt) { int inblk; int field, subfield; @@ -130,9 +122,7 @@ ffs_fragacct(fs, fragmap, fraglist, cnt) #ifdef DDB void -ffs_checkoverlap(bp, ip) - struct buf *bp; - struct inode *ip; +ffs_checkoverlap(struct buf *bp, struct inode *ip) { struct buf *ebp, *ep; ufs_daddr_t start, last; @@ -169,10 +159,7 @@ ffs_checkoverlap(bp, ip) * check if a block is available */ int -ffs_isblock(fs, cp, h) - struct fs *fs; - unsigned char *cp; - ufs_daddr_t h; +ffs_isblock(struct fs *fs, unsigned char *cp, ufs_daddr_t h) { unsigned char mask; @@ -197,12 +184,8 @@ ffs_isblock(fs, cp, h) * check if a block is free */ int -ffs_isfreeblock(fs, cp, h) - struct fs *fs; - unsigned char *cp; - ufs_daddr_t h; +ffs_isfreeblock(struct fs *fs, unsigned char *cp, ufs_daddr_t h) { - switch ((int)fs->fs_frag) { case 8: return (cp[h] == 0); @@ -221,12 +204,8 @@ ffs_isfreeblock(fs, cp, h) * take a block out of the map */ void -ffs_clrblock(fs, cp, h) - struct fs *fs; - u_char *cp; - ufs_daddr_t h; +ffs_clrblock(struct fs *fs, u_char *cp, ufs_daddr_t h) { - switch ((int)fs->fs_frag) { case 8: cp[h] = 0; @@ -249,14 +228,9 @@ ffs_clrblock(fs, cp, h) * put a block into the map */ void -ffs_setblock(fs, cp, h) - struct fs *fs; - unsigned char *cp; - ufs_daddr_t h; +ffs_setblock(struct fs *fs, unsigned char *cp, ufs_daddr_t h) { - switch ((int)fs->fs_frag) { - case 8: cp[h] = 0xff; return; diff --git a/sys/vfs/ufs/ffs_vfsops.c b/sys/vfs/ufs/ffs_vfsops.c index 86ad6ed052..53d08dcd85 100644 --- a/sys/vfs/ufs/ffs_vfsops.c +++ b/sys/vfs/ufs/ffs_vfsops.c @@ -32,7 +32,7 @@ * * @(#)ffs_vfsops.c 8.31 (Berkeley) 5/20/95 * $FreeBSD: src/sys/ufs/ffs/ffs_vfsops.c,v 1.117.2.10 2002/06/23 22:34:52 iedowse Exp $ - * $DragonFly: src/sys/vfs/ufs/ffs_vfsops.c,v 1.16 2004/04/24 04:32:05 drhodus Exp $ + * $DragonFly: src/sys/vfs/ufs/ffs_vfsops.c,v 1.17 2004/05/18 00:16:46 cpressey Exp $ */ #include "opt_quota.h" @@ -128,12 +128,11 @@ VFS_SET(ufs_vfsops, ufs, 0); * namei() if it is a genuine NULL from the user. */ static int -ffs_mount( mp, path, data, ndp, td) - struct mount *mp; /* mount struct pointer*/ - char *path; /* path to mount point*/ - caddr_t data; /* arguments to FS specific mount*/ - struct nameidata *ndp; /* mount point credentials*/ - struct thread *td; /* process requesting mount*/ +ffs_mount(struct mount *mp, /* mount struct pointer */ + char *path, /* path to mount point */ + caddr_t data, /* arguments to FS specific mount */ + struct nameidata *ndp, /* mount point credentials */ + struct thread *td) /* process requesting mount */ { size_t size; int err = 0; @@ -604,11 +603,8 @@ ffs_reload_scan2(struct mount *mp, struct vnode *vp, lwkt_tokref_t vlock, void * * Common code for mount and mountroot */ int -ffs_mountfs(devvp, mp, td, malloctype) - struct vnode *devvp; - struct mount *mp; - struct thread *td; - struct malloc_type *malloctype; +ffs_mountfs(struct vnode *devvp, struct mount *mp, struct thread *td, + struct malloc_type *malloctype) { struct ufsmount *ump; struct buf *bp; @@ -830,10 +826,8 @@ out: * XXX - goes away some day. */ static int -ffs_oldfscompat(fs) - struct fs *fs; +ffs_oldfscompat(struct fs *fs) { - fs->fs_npsect = max(fs->fs_npsect, fs->fs_nsect); /* XXX */ fs->fs_interleave = max(fs->fs_interleave, 1); /* XXX */ if (fs->fs_postblformat == FS_42POSTBLFMT) /* XXX */ @@ -1058,7 +1052,7 @@ ffs_sync_scan1(struct mount *mp, struct vnode *vp, void *data) static int ffs_sync_scan2(struct mount *mp, struct vnode *vp, - lwkt_tokref_t vlock, void *data) + lwkt_tokref_t vlock, void *data) { struct scaninfo *info = data; thread_t td = curthread; /* XXX */ @@ -1110,10 +1104,7 @@ ffs_sync_scan2(struct mount *mp, struct vnode *vp, static int ffs_inode_hash_lock; int -ffs_vget(mp, ino, vpp) - struct mount *mp; - ino_t ino; - struct vnode **vpp; +ffs_vget(struct mount *mp, ino_t ino, struct vnode **vpp) { struct fs *fs; struct inode *ip; @@ -1264,10 +1255,7 @@ restart: * those rights via. exflagsp and credanonp */ int -ffs_fhtovp(mp, fhp, vpp) - struct mount *mp; - struct fid *fhp; - struct vnode **vpp; +ffs_fhtovp(struct mount *mp, struct fid *fhp, struct vnode **vpp) { struct ufid *ufhp; struct fs *fs; @@ -1285,9 +1273,7 @@ ffs_fhtovp(mp, fhp, vpp) */ /* ARGSUSED */ int -ffs_vptofh(vp, fhp) - struct vnode *vp; - struct fid *fhp; +ffs_vptofh(struct vnode *vp, struct fid *fhp) { struct inode *ip; struct ufid *ufhp; @@ -1304,10 +1290,8 @@ ffs_vptofh(vp, fhp) * Initialize the filesystem; just use ufs_init. */ static int -ffs_init(vfsp) - struct vfsconf *vfsp; +ffs_init(struct vfsconf *vfsp) { - softdep_initialize(); return (ufs_init(vfsp)); } @@ -1316,9 +1300,7 @@ ffs_init(vfsp) * Write a superblock and associated information back to disk. */ static int -ffs_sbupdate(mp, waitfor) - struct ufsmount *mp; - int waitfor; +ffs_sbupdate(struct ufsmount *mp, int waitfor) { struct fs *dfs, *fs = mp->um_fs; struct buf *bp; diff --git a/sys/vfs/ufs/ffs_vnops.c b/sys/vfs/ufs/ffs_vnops.c index 4ef47b6cde..a35670bd30 100644 --- a/sys/vfs/ufs/ffs_vnops.c +++ b/sys/vfs/ufs/ffs_vnops.c @@ -32,7 +32,7 @@ * * @(#)ffs_vnops.c 8.15 (Berkeley) 5/14/95 * $FreeBSD: src/sys/ufs/ffs/ffs_vnops.c,v 1.64 2000/01/10 12:04:25 phk Exp $ - * $DragonFly: src/sys/vfs/ufs/ffs_vnops.c,v 1.6 2003/08/20 09:56:34 rob Exp $ + * $DragonFly: src/sys/vfs/ufs/ffs_vnops.c,v 1.7 2004/05/18 00:16:46 cpressey Exp $ */ #include @@ -112,16 +112,13 @@ VNODEOP_SET(ffs_fifoop_opv_desc); /* * Synch an open file. + * + * ffs_fsync(struct vnode *a_vp, struct ucred *a_cred, int a_waitfor, + * struct proc *a_p) */ /* ARGSUSED */ static int -ffs_fsync(ap) - struct vop_fsync_args /* { - struct vnode *a_vp; - struct ucred *a_cred; - int a_waitfor; - struct proc *a_p; - } */ *ap; +ffs_fsync(struct vop_fsync_args *ap) { struct vnode *vp = ap->a_vp; struct buf *bp; diff --git a/sys/vfs/ufs/ufs_bmap.c b/sys/vfs/ufs/ufs_bmap.c index dde8d38b68..f9529d1520 100644 --- a/sys/vfs/ufs/ufs_bmap.c +++ b/sys/vfs/ufs/ufs_bmap.c @@ -37,7 +37,7 @@ * * @(#)ufs_bmap.c 8.7 (Berkeley) 3/21/95 * $FreeBSD: src/sys/ufs/ufs/ufs_bmap.c,v 1.34.2.1 2000/03/17 10:12:14 ps Exp $ - * $DragonFly: src/sys/vfs/ufs/ufs_bmap.c,v 1.5 2003/08/07 21:17:44 dillon Exp $ + * $DragonFly: src/sys/vfs/ufs/ufs_bmap.c,v 1.6 2004/05/18 00:16:46 cpressey Exp $ */ #include @@ -58,17 +58,12 @@ * Bmap converts a the logical block number of a file to its physical block * number on the disk. The conversion is done by using the logical block * number to index into the array of block pointers described by the dinode. + * + * ufs_bmap(struct vnode *a_vp, ufs_daddr_t a_bn, struct vnode **a_vpp, + * ufs_daddr_t *a_bnp, int *a_runp, int *a_runb) */ int -ufs_bmap(ap) - struct vop_bmap_args /* { - struct vnode *a_vp; - ufs_daddr_t a_bn; - struct vnode **a_vpp; - ufs_daddr_t *a_bnp; - int *a_runp; - int *a_runb; - } */ *ap; +ufs_bmap(struct vop_bmap_args *ap) { /* * Check for underlying vnode requests and ensure that logical @@ -98,14 +93,8 @@ ufs_bmap(ap) */ int -ufs_bmaparray(vp, bn, bnp, ap, nump, runp, runb) - struct vnode *vp; - ufs_daddr_t bn; - ufs_daddr_t *bnp; - struct indir *ap; - int *nump; - int *runp; - int *runb; +ufs_bmaparray(struct vnode *vp, ufs_daddr_t bn, ufs_daddr_t *bnp, + struct indir *ap, int *nump, int *runp, int *runb) { struct inode *ip; struct buf *bp; @@ -239,11 +228,7 @@ ufs_bmaparray(vp, bn, bnp, ap, nump, runp, runb) * once with the offset into the page itself. */ int -ufs_getlbns(vp, bn, ap, nump) - struct vnode *vp; - ufs_daddr_t bn; - struct indir *ap; - int *nump; +ufs_getlbns(struct vnode *vp, ufs_daddr_t bn, struct indir *ap, int *nump) { long blockcnt, metalbn, realbn; struct ufsmount *ump; diff --git a/sys/vfs/ufs/ufs_dirhash.c b/sys/vfs/ufs/ufs_dirhash.c index 26db2f5544..060e3b4760 100644 --- a/sys/vfs/ufs/ufs_dirhash.c +++ b/sys/vfs/ufs/ufs_dirhash.c @@ -23,7 +23,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/ufs/ufs/ufs_dirhash.c,v 1.3.2.6 2002/04/10 21:41:14 dwmalone Exp $ - * $DragonFly: src/sys/vfs/ufs/ufs_dirhash.c,v 1.3 2003/08/07 21:17:44 dillon Exp $ + * $DragonFly: src/sys/vfs/ufs/ufs_dirhash.c,v 1.4 2004/05/18 00:16:46 cpressey Exp $ */ /* * This implements a hash-based lookup scheme for UFS directories. @@ -282,7 +282,7 @@ ufsdirhash_free(struct inode *ip) */ int ufsdirhash_lookup(struct inode *ip, char *name, int namelen, doff_t *offp, - struct buf **bpp, doff_t *prevoffp) + struct buf **bpp, doff_t *prevoffp) { struct dirhash *dh, *dh_next; struct direct *dp; @@ -517,7 +517,6 @@ ufsdirhash_findfree(struct inode *ip, int slotneeded, int *slotsize) doff_t ufsdirhash_enduseful(struct inode *ip) { - struct dirhash *dh; int i; @@ -615,7 +614,7 @@ ufsdirhash_remove(struct inode *ip, struct direct *dirp, doff_t offset) */ void ufsdirhash_move(struct inode *ip, struct direct *dirp, doff_t oldoff, - doff_t newoff) + doff_t newoff) { struct dirhash *dh; int slot; @@ -972,7 +971,7 @@ ufsdirhash_recycle(int wanted) static void -ufsdirhash_init() +ufsdirhash_init(void) { ufsdirhash_zone = zinit("DIRHASH", DH_NBLKOFF * sizeof(daddr_t), 0, 0, 1); diff --git a/sys/vfs/ufs/ufs_ihash.c b/sys/vfs/ufs/ufs_ihash.c index 8f6261d822..2e6fa44717 100644 --- a/sys/vfs/ufs/ufs_ihash.c +++ b/sys/vfs/ufs/ufs_ihash.c @@ -32,7 +32,7 @@ * * @(#)ufs_ihash.c 8.7 (Berkeley) 5/17/95 * $FreeBSD: src/sys/ufs/ufs/ufs_ihash.c,v 1.20 1999/08/28 00:52:29 peter Exp $ - * $DragonFly: src/sys/vfs/ufs/ufs_ihash.c,v 1.11 2004/03/01 06:33:23 dillon Exp $ + * $DragonFly: src/sys/vfs/ufs/ufs_ihash.c,v 1.12 2004/05/18 00:16:46 cpressey Exp $ */ #include @@ -60,7 +60,7 @@ static struct lwkt_token ufs_ihash_token; * Initialize inode hash table. */ void -ufs_ihashinit() +ufs_ihashinit(void) { ihashtbl = hashinit(desiredvnodes, M_UFSIHASH, &ihash); lwkt_token_init(&ufs_ihash_token); @@ -71,9 +71,7 @@ ufs_ihashinit() * to it. If it is in core, return it, even if it is locked. */ struct vnode * -ufs_ihashlookup(dev, inum) - dev_t dev; - ino_t inum; +ufs_ihashlookup(dev_t dev, ino_t inum) { struct inode *ip; lwkt_tokref ilock; @@ -160,8 +158,7 @@ ufs_ihashins(struct inode *ip) * Remove the inode from the hash table. */ void -ufs_ihashrem(ip) - struct inode *ip; +ufs_ihashrem(struct inode *ip) { lwkt_tokref ilock; diff --git a/sys/vfs/ufs/ufs_inode.c b/sys/vfs/ufs/ufs_inode.c index cb62aaedb4..bf2ae8731e 100644 --- a/sys/vfs/ufs/ufs_inode.c +++ b/sys/vfs/ufs/ufs_inode.c @@ -37,7 +37,7 @@ * * @(#)ufs_inode.c 8.9 (Berkeley) 5/14/95 * $FreeBSD: src/sys/ufs/ufs/ufs_inode.c,v 1.25.2.3 2002/07/05 22:42:31 dillon Exp $ - * $DragonFly: src/sys/vfs/ufs/ufs_inode.c,v 1.7 2004/03/01 06:33:23 dillon Exp $ + * $DragonFly: src/sys/vfs/ufs/ufs_inode.c,v 1.8 2004/05/18 00:16:46 cpressey Exp $ */ #include "opt_quota.h" @@ -61,13 +61,11 @@ int prtactive = 0; /* 1 => print out reclaim of active vnodes */ /* * Last reference to an inode. If necessary, write or delete it. + * + * ufs_inactive(struct vnode *a_vp, struct thread *a_td) */ int -ufs_inactive(ap) - struct vop_inactive_args /* { - struct vnode *a_vp; - struct thread *a_td; - } */ *ap; +ufs_inactive(struct vop_inactive_args *ap) { struct vnode *vp = ap->a_vp; struct inode *ip = VTOI(vp); @@ -109,13 +107,11 @@ out: /* * Reclaim an inode so that it can be used for other purposes. + * + * ufs_reclaim(struct vnode *a_vp, struct thread *a_td) */ int -ufs_reclaim(ap) - struct vop_reclaim_args /* { - struct vnode *a_vp; - struct thread *a_td; - } */ *ap; +ufs_reclaim(struct vop_reclaim_args *ap) { struct inode *ip; struct vnode *vp = ap->a_vp; diff --git a/sys/vfs/ufs/ufs_lookup.c b/sys/vfs/ufs/ufs_lookup.c index 4508e3e016..cb800c880a 100644 --- a/sys/vfs/ufs/ufs_lookup.c +++ b/sys/vfs/ufs/ufs_lookup.c @@ -37,7 +37,7 @@ * * @(#)ufs_lookup.c 8.15 (Berkeley) 6/16/95 * $FreeBSD: src/sys/ufs/ufs/ufs_lookup.c,v 1.33.2.7 2001/09/22 19:22:13 iedowse Exp $ - * $DragonFly: src/sys/vfs/ufs/ufs_lookup.c,v 1.11 2004/04/24 04:32:05 drhodus Exp $ + * $DragonFly: src/sys/vfs/ufs/ufs_lookup.c,v 1.12 2004/05/18 00:16:46 cpressey Exp $ */ #include "opt_ufs.h" @@ -120,14 +120,12 @@ SYSCTL_INT(_debug, OID_AUTO, dircheck, CTLFLAG_RW, &dirchk, 0, ""); * inode and return info to allow rewrite * if not at end, add name to cache; if at end and neither creating * nor deleting, add name to cache + * + * ufs_lookup(struct vnode *a_dvp, struct vnode **a_vpp, + * struct componentname *a_cnp) */ int -ufs_lookup(ap) - struct vop_cachedlookup_args /* { - struct vnode *a_dvp; - struct vnode **a_vpp; - struct componentname *a_cnp; - } */ *ap; +ufs_lookup(struct vop_cachedlookup_args *ap) { struct vnode *vdp; /* vnode for directory being searched */ struct inode *dp; /* inode for directory being searched */ @@ -629,10 +627,7 @@ found: } void -ufs_dirbad(ip, offset, how) - struct inode *ip; - doff_t offset; - char *how; +ufs_dirbad(struct inode *ip, doff_t offset, char *how) { struct mount *mp; @@ -652,10 +647,7 @@ ufs_dirbad(ip, offset, how) * name must be as long as advertised, and null terminated */ int -ufs_dirbadentry(dp, ep, entryoffsetinblock) - struct vnode *dp; - struct direct *ep; - int entryoffsetinblock; +ufs_dirbadentry(struct vnode *dp, struct direct *ep, int entryoffsetinblock) { int i; int namlen; @@ -696,10 +688,8 @@ bad: * argument ip is the inode to which the new directory entry will refer. */ void -ufs_makedirentry(ip, cnp, newdirp) - struct inode *ip; - struct componentname *cnp; - struct direct *newdirp; +ufs_makedirentry(struct inode *ip, struct componentname *cnp, + struct direct *newdirp) { #ifdef DIAGNOSTIC @@ -731,12 +721,8 @@ ufs_makedirentry(ip, cnp, newdirp) * soft dependency code). */ int -ufs_direnter(dvp, tvp, dirp, cnp, newdirbp) - struct vnode *dvp; - struct vnode *tvp; - struct direct *dirp; - struct componentname *cnp; - struct buf *newdirbp; +ufs_direnter(struct vnode *dvp, struct vnode *tvp, struct direct *dirp, + struct componentname *cnp, struct buf *newdirbp) { struct ucred *cred; struct thread *td = curthread; /* XXX */ @@ -971,11 +957,7 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdirbp) * to the size of the previous entry. */ int -ufs_dirremove(dvp, ip, flags, isrmdir) - struct vnode *dvp; - struct inode *ip; - int flags; - int isrmdir; +ufs_dirremove(struct vnode *dvp, struct inode *ip, int flags, int isrmdir) { struct inode *dp; struct direct *ep; @@ -1062,11 +1044,8 @@ out: * set up by a call to namei. */ int -ufs_dirrewrite(dp, oip, newinum, newtype, isrmdir) - struct inode *dp, *oip; - ino_t newinum; - int newtype; - int isrmdir; +ufs_dirrewrite(struct inode *dp, struct inode *oip, ino_t newinum, int newtype, + int isrmdir) { struct buf *bp; struct direct *ep; @@ -1108,10 +1087,7 @@ ufs_dirrewrite(dp, oip, newinum, newtype, isrmdir) * NB: does not handle corrupted directories. */ int -ufs_dirempty(ip, parentino, cred) - struct inode *ip; - ino_t parentino; - struct ucred *cred; +ufs_dirempty(struct inode *ip, ino_t parentino, struct ucred *cred) { off_t off; struct dirtemplate dbuf; @@ -1167,9 +1143,7 @@ ufs_dirempty(ip, parentino, cred) * The target is always vput before returning. */ int -ufs_checkpath(source, target, cred) - struct inode *source, *target; - struct ucred *cred; +ufs_checkpath(struct inode *source, struct inode *target, struct ucred *cred) { struct vnode *vp; int error, rootino, namlen; diff --git a/sys/vfs/ufs/ufs_quota.c b/sys/vfs/ufs/ufs_quota.c index e031d425b1..dabbf00408 100644 --- a/sys/vfs/ufs/ufs_quota.c +++ b/sys/vfs/ufs/ufs_quota.c @@ -35,7 +35,7 @@ * * @(#)ufs_quota.c 8.5 (Berkeley) 5/20/95 * $FreeBSD: src/sys/ufs/ufs/ufs_quota.c,v 1.27.2.3 2002/01/15 10:33:32 phk Exp $ - * $DragonFly: src/sys/vfs/ufs/ufs_quota.c,v 1.12 2004/03/01 06:33:23 dillon Exp $ + * $DragonFly: src/sys/vfs/ufs/ufs_quota.c,v 1.13 2004/05/18 00:16:46 cpressey Exp $ */ #include @@ -81,8 +81,7 @@ static void chkdquot (struct inode *); * additional dquots set up here. */ int -getinoquota(ip) - struct inode *ip; +getinoquota(struct inode *ip) { struct ufsmount *ump; struct vnode *vp = ITOV(ip); @@ -114,11 +113,7 @@ getinoquota(ip) * Update disk usage, and take corrective action. */ int -chkdq(ip, change, cred, flags) - struct inode *ip; - long change; - struct ucred *cred; - int flags; +chkdq(struct inode *ip, long change, struct ucred *cred, int flags) { struct dquot *dq; int i; @@ -180,11 +175,7 @@ chkdq(ip, change, cred, flags) * Issue an error message if appropriate. */ static int -chkdqchg(ip, change, cred, type) - struct inode *ip; - long change; - struct ucred *cred; - int type; +chkdqchg(struct inode *ip, long change, struct ucred *cred, int type) { struct dquot *dq = ip->i_dquot[type]; long ncurblocks = dq->dq_curblocks + change; @@ -235,11 +226,7 @@ chkdqchg(ip, change, cred, type) * Check the inode limit, applying corrective action. */ int -chkiq(ip, change, cred, flags) - struct inode *ip; - long change; - struct ucred *cred; - int flags; +chkiq(struct inode *ip, long change, struct ucred *cred, int flags) { struct dquot *dq; int i; @@ -301,11 +288,7 @@ chkiq(ip, change, cred, flags) * Issue an error message if appropriate. */ static int -chkiqchg(ip, change, cred, type) - struct inode *ip; - long change; - struct ucred *cred; - int type; +chkiqchg(struct inode *ip, long change, struct ucred *cred, int type) { struct dquot *dq = ip->i_dquot[type]; long ncurinodes = dq->dq_curinodes + change; @@ -358,8 +341,7 @@ chkiqchg(ip, change, cred, type) * size and not to have a dquot structure associated with it. */ static void -chkdquot(ip) - struct inode *ip; +chkdquot(struct inode *ip) { struct ufsmount *ump = VFSTOUFS(ITOV(ip)->v_mount); int i; @@ -393,11 +375,7 @@ static int quotaon_scan(struct mount *mp, struct vnode *vp, lwkt_tokref_t vlock, void *data); int -quotaon(td, mp, type, fname) - struct thread *td; - struct mount *mp; - int type; - caddr_t fname; +quotaon(struct thread *td, struct mount *mp, int type, caddr_t fname) { struct ufsmount *ump = VFSTOUFS(mp); struct vnode *vp, **vpp; @@ -464,7 +442,7 @@ quotaon(td, mp, type, fname) static int quotaon_scan(struct mount *mp, struct vnode *vp, - lwkt_tokref_t vlock, void *data) + lwkt_tokref_t vlock, void *data) { int error; struct scaninfo *info = data; @@ -487,7 +465,7 @@ quotaon_scan(struct mount *mp, struct vnode *vp, */ static int quotaoff_scan(struct mount *mp, struct vnode *vp, - lwkt_tokref_t vlock, void *data); + lwkt_tokref_t vlock, void *data); int quotaoff(struct thread *td, struct mount *mp, int type) @@ -535,7 +513,7 @@ quotaoff(struct thread *td, struct mount *mp, int type) static int quotaoff_scan(struct mount *mp, struct vnode *vp, - lwkt_tokref_t vlock, void *data) + lwkt_tokref_t vlock, void *data) { struct scaninfo *info = data; struct dquot *dq; @@ -561,11 +539,7 @@ quotaoff_scan(struct mount *mp, struct vnode *vp, * Q_GETQUOTA - return current values in a dqblk structure. */ int -getquota(mp, id, type, addr) - struct mount *mp; - u_long id; - int type; - caddr_t addr; +getquota(struct mount *mp, u_long id, int type, caddr_t addr) { struct dquot *dq; int error; @@ -582,11 +556,7 @@ getquota(mp, id, type, addr) * Q_SETQUOTA - assign an entire dqblk structure. */ int -setquota(mp, id, type, addr) - struct mount *mp; - u_long id; - int type; - caddr_t addr; +setquota(struct mount *mp, u_long id, int type, caddr_t addr) { struct dquot *dq; struct dquot *ndq; @@ -643,11 +613,7 @@ setquota(mp, id, type, addr) * Q_SETUSE - set current inode and block usage. */ int -setuse(mp, id, type, addr) - struct mount *mp; - u_long id; - int type; - caddr_t addr; +setuse(struct mount *mp, u_long id, int type, caddr_t addr) { struct dquot *dq; struct ufsmount *ump = VFSTOUFS(mp); @@ -726,7 +692,7 @@ qsync(struct mount *mp) static int qsync_scan(struct mount *mp, struct vnode *vp, - lwkt_tokref_t vlock, void *data) + lwkt_tokref_t vlock, void *data) { struct scaninfo *info = data; struct dquot *dq; @@ -771,7 +737,7 @@ static long numdquot, desireddquot = DQUOTINC; * Initialize the quota system. */ void -dqinit() +dqinit(void) { dqhashtbl = hashinit(desiredvnodes, M_DQUOT, &dqhash); @@ -783,12 +749,8 @@ dqinit() * reading the information from the file if necessary. */ static int -dqget(vp, id, ump, type, dqp) - struct vnode *vp; - u_long id; - struct ufsmount *ump; - int type; - struct dquot **dqp; +dqget(struct vnode *vp, u_long id, struct ufsmount *ump, int type, + struct dquot **dqp) { struct thread *td = curthread; /* XXX */ struct dquot *dq; @@ -903,10 +865,8 @@ dqget(vp, id, ump, type, dqp) * Obtain a reference to a dquot. */ static void -dqref(dq) - struct dquot *dq; +dqref(struct dquot *dq) { - dq->dq_cnt++; } #endif @@ -915,11 +875,8 @@ dqref(dq) * Release a reference to a dquot. */ void -dqrele(vp, dq) - struct vnode *vp; - struct dquot *dq; +dqrele(struct vnode *vp, struct dquot *dq) { - if (dq == NODQUOT) return; if (dq->dq_cnt > 1) { @@ -987,8 +944,7 @@ dqsync(struct vnode *vp, struct dquot *dq) * Flush all entries from the cache for a particular vnode. */ static void -dqflush(vp) - struct vnode *vp; +dqflush(struct vnode *vp) { struct dquot *dq, *nextdq; struct dqhash *dqh; diff --git a/sys/vfs/ufs/ufs_readwrite.c b/sys/vfs/ufs/ufs_readwrite.c index b681f08c15..d9ad5e1455 100644 --- a/sys/vfs/ufs/ufs_readwrite.c +++ b/sys/vfs/ufs/ufs_readwrite.c @@ -32,7 +32,7 @@ * * @(#)ufs_readwrite.c 8.11 (Berkeley) 5/8/95 * $FreeBSD: src/sys/ufs/ufs/ufs_readwrite.c,v 1.65.2.14 2003/04/04 22:21:29 tegge Exp $ - * $DragonFly: src/sys/vfs/ufs/ufs_readwrite.c,v 1.10 2004/04/23 06:23:46 dillon Exp $ + * $DragonFly: src/sys/vfs/ufs/ufs_readwrite.c,v 1.11 2004/05/18 00:16:46 cpressey Exp $ */ #define BLKSIZE(a, b, c) blksize(a, b, c) @@ -59,16 +59,13 @@ extern int ffs_rawread(struct vnode *vp, struct uio *uio, int *workdone); /* * Vnode op for reading. + * + * ffs_read(struct vnode *a_vp, struct uio *a_uio, int a_ioflag, + * struct ucred *a_cred) */ /* ARGSUSED */ int -ffs_read(ap) - struct vop_read_args /* { - struct vnode *a_vp; - struct uio *a_uio; - int a_ioflag; - struct ucred *a_cred; - } */ *ap; +ffs_read(struct vop_read_args *ap) { struct vnode *vp; struct inode *ip; @@ -394,15 +391,12 @@ ffs_read(ap) /* * Vnode op for writing. + * + * ffs_write(struct vnode *a_vp, struct uio *a_uio, int a_ioflag, + * struct ucred *a_cred) */ int -ffs_write(ap) - struct vop_write_args /* { - struct vnode *a_vp; - struct uio *a_uio; - int a_ioflag; - struct ucred *a_cred; - } */ *ap; +ffs_write(struct vop_write_args *ap) { struct vnode *vp; struct uio *uio; @@ -613,8 +607,7 @@ ffs_write(ap) * get page routine */ int -ffs_getpages(ap) - struct vop_getpages_args *ap; +ffs_getpages(struct vop_getpages_args *ap) { off_t foff, physoffset; int i, size, bsize; @@ -750,8 +743,7 @@ ffs_getpages(ap) * XXX has been). */ int -ffs_putpages(ap) - struct vop_putpages_args *ap; +ffs_putpages(struct vop_putpages_args *ap) { return vnode_pager_generic_putpages(ap->a_vp, ap->a_m, ap->a_count, ap->a_sync, ap->a_rtvals); diff --git a/sys/vfs/ufs/ufs_vfsops.c b/sys/vfs/ufs/ufs_vfsops.c index b8bff2a7c6..92e222b8fc 100644 --- a/sys/vfs/ufs/ufs_vfsops.c +++ b/sys/vfs/ufs/ufs_vfsops.c @@ -37,7 +37,7 @@ * * @(#)ufs_vfsops.c 8.8 (Berkeley) 5/20/95 * $FreeBSD: src/sys/ufs/ufs/ufs_vfsops.c,v 1.17.2.3 2001/10/14 19:08:16 iedowse Exp $ - * $DragonFly: src/sys/vfs/ufs/ufs_vfsops.c,v 1.6 2004/03/01 06:33:23 dillon Exp $ + * $DragonFly: src/sys/vfs/ufs/ufs_vfsops.c,v 1.7 2004/05/18 00:16:46 cpressey Exp $ */ #include "opt_quota.h" @@ -70,9 +70,7 @@ ufs_start(struct mount *mp, int flags, struct thread *td) * Return the root of a filesystem. */ int -ufs_root(mp, vpp) - struct mount *mp; - struct vnode **vpp; +ufs_root(struct mount *mp, struct vnode **vpp) { struct vnode *nvp; int error; @@ -88,12 +86,8 @@ ufs_root(mp, vpp) * Do operations associated with quotas */ int -ufs_quotactl(mp, cmds, uid, arg, td) - struct mount *mp; - int cmds; - uid_t uid; - caddr_t arg; - struct thread *td; +ufs_quotactl(struct mount *mp, int cmds, uid_t uid, caddr_t arg, + struct thread *td) { #ifndef QUOTA return (EOPNOTSUPP); @@ -165,8 +159,7 @@ ufs_quotactl(mp, cmds, uid, arg, td) * Initial UFS filesystems, done only once. */ int -ufs_init(vfsp) - struct vfsconf *vfsp; +ufs_init(struct vfsconf *vfsp) { static int done; @@ -187,10 +180,7 @@ ufs_init(vfsp) * Call the VFS_CHECKEXP beforehand to verify access. */ int -ufs_fhtovp(mp, ufhp, vpp) - struct mount *mp; - struct ufid *ufhp; - struct vnode **vpp; +ufs_fhtovp(struct mount *mp, struct ufid *ufhp, struct vnode **vpp) { struct inode *ip; struct vnode *nvp; @@ -222,11 +212,8 @@ ufs_fhtovp(mp, ufhp, vpp) * Verify that a host should have access to a filesystem. */ int -ufs_check_export(mp, nam, exflagsp, credanonp) - struct mount *mp; - struct sockaddr *nam; - int *exflagsp; - struct ucred **credanonp; +ufs_check_export(struct mount *mp, struct sockaddr *nam, int *exflagsp, + struct ucred **credanonp) { struct netcred *np; struct ufsmount *ump;; diff --git a/sys/vfs/ufs/ufs_vnops.c b/sys/vfs/ufs/ufs_vnops.c index 89fd02a73e..818cf84494 100644 --- a/sys/vfs/ufs/ufs_vnops.c +++ b/sys/vfs/ufs/ufs_vnops.c @@ -37,7 +37,7 @@ * * @(#)ufs_vnops.c 8.27 (Berkeley) 5/27/95 * $FreeBSD: src/sys/ufs/ufs/ufs_vnops.c,v 1.131.2.8 2003/01/02 17:26:19 bde Exp $ - * $DragonFly: src/sys/vfs/ufs/ufs_vnops.c,v 1.12 2004/04/24 04:32:05 drhodus Exp $ + * $DragonFly: src/sys/vfs/ufs/ufs_vnops.c,v 1.13 2004/05/18 00:16:46 cpressey Exp $ */ #include "opt_quota.h" @@ -147,8 +147,7 @@ static struct odirtemplate omastertemplate = { }; void -ufs_itimes(vp) - struct vnode *vp; +ufs_itimes(struct vnode *vp) { struct inode *ip; struct timespec ts; @@ -181,15 +180,12 @@ ufs_itimes(vp) /* * Create a regular file + * + * ufs_create(struct vnode *a_dvp, struct vnode **a_vpp, + * struct componentname *a_cnp, struct vattr *a_vap) */ int -ufs_create(ap) - struct vop_create_args /* { - struct vnode *a_dvp; - struct vnode **a_vpp; - struct componentname *a_cnp; - struct vattr *a_vap; - } */ *ap; +ufs_create(struct vop_create_args *ap) { int error; @@ -204,16 +200,13 @@ ufs_create(ap) /* * Mknod vnode call + * + * ufs_mknod(struct vnode *a_dvp, struct vnode **a_vpp, + * struct componentname *a_cnp, struct vattr *a_vap) */ /* ARGSUSED */ int -ufs_mknod(ap) - struct vop_mknod_args /* { - struct vnode *a_dvp; - struct vnode **a_vpp; - struct componentname *a_cnp; - struct vattr *a_vap; - } */ *ap; +ufs_mknod(struct vop_mknod_args *ap) { struct vattr *vap = ap->a_vap; struct vnode **vpp = ap->a_vpp; @@ -256,18 +249,14 @@ ufs_mknod(ap) * Open called. * * Nothing to do. + * + * ufs_open(struct vnode *a_vp, int a_mode, struct ucred *a_cred, + * struct thread *a_td) */ /* ARGSUSED */ int -ufs_open(ap) - struct vop_open_args /* { - struct vnode *a_vp; - int a_mode; - struct ucred *a_cred; - struct thread *a_td; - } */ *ap; +ufs_open(struct vop_open_args *ap) { - /* * Files marked append-only must be opened for appending. */ @@ -281,16 +270,13 @@ ufs_open(ap) * Close called. * * Update the times on the inode. + * + * ufs_close(struct vnode *a_vp, int a_fflag, struct ucred *a_cred, + * struct thread *a_td) */ /* ARGSUSED */ int -ufs_close(ap) - struct vop_close_args /* { - struct vnode *a_vp; - int a_fflag; - struct ucred *a_cred; - struct thread *a_td; - } */ *ap; +ufs_close(struct vop_close_args *ap) { struct vnode *vp = ap->a_vp; lwkt_tokref vlock; @@ -302,14 +288,12 @@ ufs_close(ap) return (0); } +/* + * ufs_access(struct vnode *a_vp, int a_mode, struct ucred *a_cred, + * struct thread *a_td) + */ int -ufs_access(ap) - struct vop_access_args /* { - struct vnode *a_vp; - int a_mode; - struct ucred *a_cred; - struct thread *a_td; - } */ *ap; +ufs_access(struct vop_access_args *ap) { struct vnode *vp = ap->a_vp; struct inode *ip = VTOI(vp); @@ -386,14 +370,13 @@ ufs_access(ap) return ((ip->i_mode & mask) == mask ? 0 : EACCES); } +/* + * ufs_getattr(struct vnode *a_vp, struct vattr *a_vap, + * struct thread *a_td) + */ /* ARGSUSED */ int -ufs_getattr(ap) - struct vop_getattr_args /* { - struct vnode *a_vp; - struct vattr *a_vap; - struct thread *a_td; - } */ *ap; +ufs_getattr(struct vop_getattr_args *ap) { struct vnode *vp = ap->a_vp; struct inode *ip = VTOI(vp); @@ -429,15 +412,12 @@ ufs_getattr(ap) /* * Set attribute vnode op. called from several syscalls + * + * ufs_setattr(struct vnode *a_vp, struct vattr *a_vap, + * struct ucred *a_cred, struct thread *a_td) */ int -ufs_setattr(ap) - struct vop_setattr_args /* { - struct vnode *a_vp; - struct vattr *a_vap; - struct ucred *a_cred; - struct thread *a_td; - } */ *ap; +ufs_setattr(struct vop_setattr_args *ap) { struct vattr *vap = ap->a_vap; struct vnode *vp = ap->a_vp; @@ -577,12 +557,8 @@ ufs_chmod(struct vnode *vp, int mode, struct ucred *cred, struct thread *td) * inode must be locked prior to call. */ static int -ufs_chown(vp, uid, gid, cred, td) - struct vnode *vp; - uid_t uid; - gid_t gid; - struct ucred *cred; - struct thread *td; +ufs_chown(struct vnode *vp, uid_t uid, gid_t gid, struct ucred *cred, + struct thread *td) { struct inode *ip = VTOI(vp); uid_t ouid; @@ -680,28 +656,23 @@ good: * Mmap a file * * NB Currently unsupported. + * + * ufs_mmap(struct vnode *a_vp, int a_fflags, struct ucred *a_cred, + * struct thread *a_td) */ /* ARGSUSED */ int -ufs_mmap(ap) - struct vop_mmap_args /* { - struct vnode *a_vp; - int a_fflags; - struct ucred *a_cred; - struct thread *a_td; - } */ *ap; +ufs_mmap(struct vop_mmap_args *ap) { - return (EINVAL); } +/* + * ufs_remove(struct vnode *a_dvp, struct vnode *a_vp, + * struct componentname *a_cnp) + */ int -ufs_remove(ap) - struct vop_remove_args /* { - struct vnode *a_dvp; - struct vnode *a_vp; - struct componentname *a_cnp; - } */ *ap; +ufs_remove(struct vop_remove_args *ap) { struct inode *ip; struct vnode *vp = ap->a_vp; @@ -723,14 +694,12 @@ out: /* * link vnode call + * + * ufs_link(struct vnode *a_tdvp, struct vnode *a_vp, + * struct componentname *a_cnp) */ int -ufs_link(ap) - struct vop_link_args /* { - struct vnode *a_tdvp; - struct vnode *a_vp; - struct componentname *a_cnp; - } */ *ap; +ufs_link(struct vop_link_args *ap) { struct vnode *vp = ap->a_vp; struct vnode *tdvp = ap->a_tdvp; @@ -789,14 +758,11 @@ out2: /* * whiteout vnode call + * + * ufs_whiteout(struct vnode *a_dvp, struct componentname *a_cnp, int a_flags) */ int -ufs_whiteout(ap) - struct vop_whiteout_args /* { - struct vnode *a_dvp; - struct componentname *a_cnp; - int a_flags; - } */ *ap; +ufs_whiteout(struct vop_whiteout_args *ap) { struct vnode *dvp = ap->a_dvp; struct componentname *cnp = ap->a_cnp; @@ -865,17 +831,13 @@ ufs_whiteout(ap) * directory was moved and the parent of the destination * is different from the source, patch the ".." entry in the * directory. + * + * ufs_rename(struct vnode *a_fdvp, struct vnode *a_fvp, + * struct componentname *a_fcnp, struct vnode *a_tdvp, + * struct vnode *a_tvp, struct componentname *a_tcnp) */ int -ufs_rename(ap) - struct vop_rename_args /* { - struct vnode *a_fdvp; - struct vnode *a_fvp; - struct componentname *a_fcnp; - struct vnode *a_tdvp; - struct vnode *a_tvp; - struct componentname *a_tcnp; - } */ *ap; +ufs_rename(struct vop_rename_args *ap) { struct vnode *tvp = ap->a_tvp; struct vnode *tdvp = ap->a_tdvp; @@ -1231,15 +1193,12 @@ out: /* * Mkdir system call + * + * ufs_mkdir(struct vnode *a_dvp, struct vnode **a_vpp, + * struct componentname *a_cnp, struct vattr *a_vap) */ int -ufs_mkdir(ap) - struct vop_mkdir_args /* { - struct vnode *a_dvp; - struct vnode **a_vpp; - struct componentname *a_cnp; - struct vattr *a_vap; - } */ *ap; +ufs_mkdir(struct vop_mkdir_args *ap) { struct vnode *dvp = ap->a_dvp; struct vattr *vap = ap->a_vap; @@ -1435,14 +1394,12 @@ out: /* * Rmdir system call. + * + * ufs_rmdir(struct vnode *a_dvp, struct vnode *a_vp, + * struct componentname *a_cnp) */ int -ufs_rmdir(ap) - struct vop_rmdir_args /* { - struct vnode *a_dvp; - struct vnode *a_vp; - struct componentname *a_cnp; - } */ *ap; +ufs_rmdir(struct vop_rmdir_args *ap) { struct vnode *vp = ap->a_vp; struct vnode *dvp = ap->a_dvp; @@ -1532,16 +1489,13 @@ out: /* * symlink -- make a symbolic link + * + * ufs_symlink(struct vnode *a_dvp, struct vnode **a_vpp, + * struct componentname *a_cnp, struct vattr *a_vap, + * char *a_target) */ int -ufs_symlink(ap) - struct vop_symlink_args /* { - struct vnode *a_dvp; - struct vnode **a_vpp; - struct componentname *a_cnp; - struct vattr *a_vap; - char *a_target; - } */ *ap; +ufs_symlink(struct vop_symlink_args *ap) { struct vnode *vp, **vpp = ap->a_vpp; struct inode *ip; @@ -1576,17 +1530,12 @@ ufs_symlink(ap) * format changes, then it will be necessary to do a conversion * from the on-disk format that read returns to the format defined * by . + * + * ufs_readdir(struct vnode *a_vp, struct uio *a_uio, struct ucred *a_cred, + * int *a_eofflag, int *ncookies, u_long **a_cookies) */ int -ufs_readdir(ap) - struct vop_readdir_args /* { - struct vnode *a_vp; - struct uio *a_uio; - struct ucred *a_cred; - int *a_eofflag; - int *ncookies; - u_long **a_cookies; - } */ *ap; +ufs_readdir(struct vop_readdir_args *ap) { struct uio *uio = ap->a_uio; int error; @@ -1686,14 +1635,11 @@ ufs_readdir(ap) /* * Return target name of a symbolic link + * + * ufs_readlink(struct vnode *a_vp, struct uio *a_uio, struct ucred *a_cred) */ int -ufs_readlink(ap) - struct vop_readlink_args /* { - struct vnode *a_vp; - struct uio *a_uio; - struct ucred *a_cred; - } */ *ap; +ufs_readlink(struct vop_readlink_args *ap) { struct vnode *vp = ap->a_vp; struct inode *ip = VTOI(vp); @@ -1714,13 +1660,11 @@ ufs_readlink(ap) * * In order to be able to swap to a file, the VOP_BMAP operation may not * deadlock on memory. See ufs_bmap() for details. + * + * ufs_strategy(struct vnode *a_vp, struct buf *a_bp) */ int -ufs_strategy(ap) - struct vop_strategy_args /* { - struct vnode *a_vp; - struct buf *a_bp; - } */ *ap; +ufs_strategy(struct vop_strategy_args *ap) { struct buf *bp = ap->a_bp; struct vnode *vp = ap->a_vp; @@ -1753,12 +1697,11 @@ ufs_strategy(ap) /* * Print out the contents of an inode. + * + * ufs_print(struct vnode *a_vp) */ int -ufs_print(ap) - struct vop_print_args /* { - struct vnode *a_vp; - } */ *ap; +ufs_print(struct vop_print_args *ap) { struct vnode *vp = ap->a_vp; struct inode *ip = VTOI(vp); @@ -1775,15 +1718,12 @@ ufs_print(ap) /* * Read wrapper for special devices. + * + * ufsspec_read(struct vnode *a_vp, struct uio *a_uio, int a_ioflag, + * struct ucred *a_cred) */ int -ufsspec_read(ap) - struct vop_read_args /* { - struct vnode *a_vp; - struct uio *a_uio; - int a_ioflag; - struct ucred *a_cred; - } */ *ap; +ufsspec_read(struct vop_read_args *ap) { int error, resid; struct inode *ip; @@ -1804,15 +1744,12 @@ ufsspec_read(ap) /* * Write wrapper for special devices. + * + * ufsspec_write(struct vnode *a_vp, struct uio *a_uio, int a_ioflag, + * struct ucred *a_cred) */ int -ufsspec_write(ap) - struct vop_write_args /* { - struct vnode *a_vp; - struct uio *a_uio; - int a_ioflag; - struct ucred *a_cred; - } */ *ap; +ufsspec_write(struct vop_write_args *ap) { int error, resid; struct inode *ip; @@ -1831,15 +1768,12 @@ ufsspec_write(ap) * Close wrapper for special devices. * * Update the times on the inode then do device close. + * + * ufsspec_close(struct vnode *a_vp, int a_fflag, struct ucred *a_cred, + * struct thread *a_td) */ int -ufsspec_close(ap) - struct vop_close_args /* { - struct vnode *a_vp; - int a_fflag; - struct ucred *a_cred; - struct thread *a_td; - } */ *ap; +ufsspec_close(struct vop_close_args *ap) { struct vnode *vp = ap->a_vp; lwkt_tokref vlock; @@ -1853,15 +1787,12 @@ ufsspec_close(ap) /* * Read wrapper for fifos. + * + * ufsfifo_read(struct vnode *a_vp, struct uio *a_uio, int a_ioflag, + * struct ucred *a_cred) */ int -ufsfifo_read(ap) - struct vop_read_args /* { - struct vnode *a_vp; - struct uio *a_uio; - int a_ioflag; - struct ucred *a_cred; - } */ *ap; +ufsfifo_read(struct vop_read_args *ap) { int error, resid; struct inode *ip; @@ -1879,15 +1810,12 @@ ufsfifo_read(ap) /* * Write wrapper for fifos. + * + * ufsfifo_write(struct vnode *a_vp, struct uio *a_uio, int a_ioflag, + * struct ucred *a_cred) */ int -ufsfifo_write(ap) - struct vop_write_args /* { - struct vnode *a_vp; - struct uio *a_uio; - int a_ioflag; - struct ucred *a_cred; - } */ *ap; +ufsfifo_write(struct vop_write_args *ap) { int error, resid; struct inode *ip; @@ -1906,15 +1834,12 @@ ufsfifo_write(ap) * Close wrapper for fifos. * * Update the times on the inode then do device close. + * + * ufsfifo_close(struct vnode *a_vp, int a_fflag, struct ucred *a_cred, + * struct thread *a_td) */ int -ufsfifo_close(ap) - struct vop_close_args /* { - struct vnode *a_vp; - int a_fflag; - struct ucred *a_cred; - struct thread *a_td; - } */ *ap; +ufsfifo_close(struct vop_close_args *ap) { struct vnode *vp = ap->a_vp; lwkt_tokref vlock; @@ -1932,8 +1857,7 @@ ufsfifo_close(ap) * Fall through to ufs kqfilter routines if needed */ int -ufsfifo_kqfilter(ap) - struct vop_kqfilter_args *ap; +ufsfifo_kqfilter(struct vop_kqfilter_args *ap) { int error; @@ -1945,16 +1869,12 @@ ufsfifo_kqfilter(ap) /* * Return POSIX pathconf information applicable to ufs filesystems. + * + * ufs_pathconf(struct vnode *a_vp, int a_name, int *a_retval) */ int -ufs_pathconf(ap) - struct vop_pathconf_args /* { - struct vnode *a_vp; - int a_name; - int *a_retval; - } */ *ap; +ufs_pathconf(struct vop_pathconf_args *ap) { - switch (ap->a_name) { case _PC_LINK_MAX: *ap->a_retval = LINK_MAX; @@ -1982,16 +1902,12 @@ ufs_pathconf(ap) /* * Advisory record locking support + * + * ufs_advlock(struct vnode *a_vp, caddr_t a_id, int a_op, struct flock *a_fl, + * int a_flags) */ int -ufs_advlock(ap) - struct vop_advlock_args /* { - struct vnode *a_vp; - caddr_t a_id; - int a_op; - struct flock *a_fl; - int a_flags; - } */ *ap; +ufs_advlock(struct vop_advlock_args *ap) { struct inode *ip = VTOI(ap->a_vp); @@ -2003,11 +1919,8 @@ ufs_advlock(ap) * vnodes. */ int -ufs_vinit(mntp, specops, fifoops, vpp) - struct mount *mntp; - vop_t **specops; - vop_t **fifoops; - struct vnode **vpp; +ufs_vinit(struct mount *mntp, vop_t **specops, vop_t **fifoops, + struct vnode **vpp) { struct inode *ip; struct vnode *vp; @@ -2044,11 +1957,8 @@ ufs_vinit(mntp, specops, fifoops, vpp) * Allocate a new inode. */ int -ufs_makeinode(mode, dvp, vpp, cnp) - int mode; - struct vnode *dvp; - struct vnode **vpp; - struct componentname *cnp; +ufs_makeinode(int mode, struct vnode *dvp, struct vnode **vpp, + struct componentname *cnp) { struct inode *ip, *pdir; struct direct newdir; @@ -2167,10 +2077,8 @@ bad: } static int -ufs_missingop(ap) - struct vop_generic_args *ap; +ufs_missingop(struct vop_generic_args *ap) { - panic("no vop function for %s in ufs child", ap->a_desc->vdesc_name); return (EOPNOTSUPP); } @@ -2182,12 +2090,11 @@ static struct filterops ufswrite_filtops = static struct filterops ufsvnode_filtops = { 1, NULL, filt_ufsdetach, filt_ufsvnode }; +/* + * ufs_kqfilter(struct vnode *a_vp, struct knote *a_kn) + */ static int -ufs_kqfilter(ap) - struct vop_kqfilter_args /* { - struct vnode *a_vp; - struct knote *a_kn; - } */ *ap; +ufs_kqfilter(struct vop_kqfilter_args *ap) { struct vnode *vp = ap->a_vp; struct knote *kn = ap->a_kn; @@ -2252,7 +2159,6 @@ filt_ufsread(struct knote *kn, long hint) static int filt_ufswrite(struct knote *kn, long hint) { - /* * filesystem is gone, so set the EOF flag and schedule * the knote for deletion. @@ -2267,7 +2173,6 @@ filt_ufswrite(struct knote *kn, long hint) static int filt_ufsvnode(struct knote *kn, long hint) { - if (kn->kn_sfflags & hint) kn->kn_fflags |= hint; if (hint == NOTE_REVOKE) { @@ -2368,29 +2273,29 @@ VNODEOP_SET(ufs_vnodeop_opv_desc); VNODEOP_SET(ufs_specop_opv_desc); VNODEOP_SET(ufs_fifoop_opv_desc); +/* + * ufs_vnoperate(struct vnodeop_desc *a_desc) + */ int -ufs_vnoperate(ap) - struct vop_generic_args /* { - struct vnodeop_desc *a_desc; - } */ *ap; +ufs_vnoperate(struct vop_generic_args *ap) { return (VOCALL(ufs_vnodeop_p, ap->a_desc->vdesc_offset, ap)); } +/* + * ufs_vnoperatefifo(struct vnodeop_desc *a_desc) + */ int -ufs_vnoperatefifo(ap) - struct vop_generic_args /* { - struct vnodeop_desc *a_desc; - } */ *ap; +ufs_vnoperatefifo(struct vop_generic_args *ap) { return (VOCALL(ufs_fifoop_p, ap->a_desc->vdesc_offset, ap)); } +/* + * ufs_vnoperatespec(struct vnodeop_desc *a_desc) + */ int -ufs_vnoperatespec(ap) - struct vop_generic_args /* { - struct vnodeop_desc *a_desc; - } */ *ap; +ufs_vnoperatespec(struct vop_generic_args *ap) { return (VOCALL(ufs_specop_p, ap->a_desc->vdesc_offset, ap)); }