From 064e6b4303d8aec9cfd27653d4dd2abea829a6c7 Mon Sep 17 00:00:00 2001 From: Kirk McKusick Date: Wed, 13 Jul 2022 14:06:43 -0700 Subject: [PATCH] Rewrite function definitions in the UFS/FFS code base with identifier lists. The K&R style in UFS and other places in the tree's days are numbered as this syntax is removed in C2x proposal N2432: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2432.pdf Though running to nearly 6000 lines of diffs this update should cause no functional change to the code. Requested by: Warner Losh MFC after: 2 weeks --- sys/ufs/ffs/ffs_alloc.c | 278 +++--- sys/ufs/ffs/ffs_inode.c | 25 +- sys/ufs/ffs/ffs_snapshot.c | 255 +++--- sys/ufs/ffs/ffs_softdep.c | 1751 +++++++++++++++--------------------- sys/ufs/ffs/ffs_vfsops.c | 83 +- sys/ufs/ffs/ffs_vnops.c | 152 ++-- sys/ufs/ufs/ufs_bmap.c | 43 +- sys/ufs/ufs/ufs_extattr.c | 60 +- sys/ufs/ufs/ufs_inode.c | 11 +- sys/ufs/ufs/ufs_lookup.c | 46 +- sys/ufs/ufs/ufs_quota.c | 12 +- sys/ufs/ufs/ufs_vfsops.c | 18 +- sys/ufs/ufs/ufs_vnops.c | 111 +-- 13 files changed, 1209 insertions(+), 1636 deletions(-) diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c index 8049657dc13d..6eaec9edf17b 100644 --- a/sys/ufs/ffs/ffs_alloc.c +++ b/sys/ufs/ffs/ffs_alloc.c @@ -148,12 +148,13 @@ static void ffs_ckhash_cg(struct buf *); * available block is located. */ int -ffs_alloc(ip, lbn, bpref, size, flags, cred, bnp) - struct inode *ip; - ufs2_daddr_t lbn, bpref; - int size, flags; - struct ucred *cred; - ufs2_daddr_t *bnp; +ffs_alloc(struct inode *ip, + ufs2_daddr_t lbn, + ufs2_daddr_t bpref, + int size, + int flags, + struct ucred *cred, + ufs2_daddr_t *bnp) { struct fs *fs; struct ufsmount *ump; @@ -248,14 +249,15 @@ ffs_alloc(ip, lbn, bpref, size, flags, cred, bnp) * invoked to get an appropriate block. */ int -ffs_realloccg(ip, lbprev, bprev, bpref, osize, nsize, flags, cred, bpp) - struct inode *ip; - ufs2_daddr_t lbprev; - ufs2_daddr_t bprev; - ufs2_daddr_t bpref; - int osize, nsize, flags; - struct ucred *cred; - struct buf **bpp; +ffs_realloccg(struct inode *ip, + ufs2_daddr_t lbprev, + ufs2_daddr_t bprev, + ufs2_daddr_t bpref, + int osize, + int nsize, + int flags, + struct ucred *cred, + struct buf **bpp) { struct vnode *vp; struct fs *fs; @@ -514,11 +516,11 @@ SYSCTL_INT(_debug, OID_AUTO, ffs_prtrealloc, CTLFLAG_RW, &prtrealloc, 0, #endif int -ffs_reallocblks(ap) +ffs_reallocblks( struct vop_reallocblks_args /* { struct vnode *a_vp; struct cluster_save *a_buflist; - } */ *ap; + } */ *ap) { struct ufsmount *ump; int error; @@ -559,11 +561,11 @@ ffs_reallocblks(ap) } static int -ffs_reallocblks_ufs1(ap) +ffs_reallocblks_ufs1( struct vop_reallocblks_args /* { struct vnode *a_vp; struct cluster_save *a_buflist; - } */ *ap; + } */ *ap) { struct fs *fs; struct inode *ip; @@ -825,11 +827,11 @@ ffs_reallocblks_ufs1(ap) } static int -ffs_reallocblks_ufs2(ap) +ffs_reallocblks_ufs2( struct vop_reallocblks_args /* { struct vnode *a_vp; struct cluster_save *a_buflist; - } */ *ap; + } */ *ap) { struct fs *fs; struct inode *ip; @@ -1104,11 +1106,10 @@ ffs_reallocblks_ufs2(ap) * 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; @@ -1234,8 +1235,7 @@ ffs_valloc(pvp, mode, cred, vpp) * 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; @@ -1381,11 +1381,10 @@ ffs_dirpref(pip) * allocate blocks contiguously within the section if possible. */ ufs2_daddr_t -ffs_blkpref_ufs1(ip, lbn, indx, bap) - struct inode *ip; - ufs_lbn_t lbn; - int indx; - ufs1_daddr_t *bap; +ffs_blkpref_ufs1(struct inode *ip, + ufs_lbn_t lbn, + int indx, + ufs1_daddr_t *bap) { struct fs *fs; u_int cg, inocg; @@ -1494,11 +1493,10 @@ ffs_blkpref_ufs1(ip, lbn, indx, bap) * Same as above, but for UFS2 */ ufs2_daddr_t -ffs_blkpref_ufs2(ip, lbn, indx, bap) - struct inode *ip; - ufs_lbn_t lbn; - int indx; - ufs2_daddr_t *bap; +ffs_blkpref_ufs2(struct inode *ip, + ufs_lbn_t lbn, + int indx, + ufs2_daddr_t *bap) { struct fs *fs; u_int cg, inocg; @@ -1616,13 +1614,12 @@ ffs_blkpref_ufs2(ip, lbn, indx, bap) */ /*VARARGS5*/ static ufs2_daddr_t -ffs_hashalloc(ip, cg, pref, size, rsize, allocator) - struct inode *ip; - u_int cg; - ufs2_daddr_t pref; - int size; /* Search size for data blocks, mode for inodes */ - int rsize; /* Real allocated size. */ - allocfcn_t *allocator; +ffs_hashalloc(struct inode *ip, + u_int cg, + ufs2_daddr_t pref, + int size, /* Search size for data blocks, mode for inodes */ + int rsize, /* Real allocated size. */ + allocfcn_t *allocator) { struct fs *fs; ufs2_daddr_t result; @@ -1675,11 +1672,11 @@ ffs_hashalloc(ip, cg, pref, size, rsize, allocator) * if they are, allocate them. */ static ufs2_daddr_t -ffs_fragextend(ip, cg, bprev, osize, nsize) - struct inode *ip; - u_int cg; - ufs2_daddr_t bprev; - int osize, nsize; +ffs_fragextend(struct inode *ip, + u_int cg, + ufs2_daddr_t bprev, + int osize, + int nsize) { struct fs *fs; struct cg *cgp; @@ -1752,12 +1749,11 @@ ffs_fragextend(ip, cg, bprev, osize, nsize) * and if it is, allocate it. */ static ufs2_daddr_t -ffs_alloccg(ip, cg, bpref, size, rsize) - struct inode *ip; - u_int cg; - ufs2_daddr_t bpref; - int size; - int rsize; +ffs_alloccg(struct inode *ip, + u_int cg, + ufs2_daddr_t bpref, + int size, + int rsize) { struct fs *fs; struct cg *cgp; @@ -1849,11 +1845,10 @@ ffs_alloccg(ip, cg, bpref, size, rsize) * blocks may be fragmented by the routine that allocates them. */ static ufs2_daddr_t -ffs_alloccgblk(ip, bp, bpref, size) - struct inode *ip; - struct buf *bp; - ufs2_daddr_t bpref; - int size; +ffs_alloccgblk(struct inode *ip, + struct buf *bp, + ufs2_daddr_t bpref, + int size) { struct fs *fs; struct cg *cgp; @@ -1932,11 +1927,10 @@ ffs_alloccgblk(ip, bp, bpref, size) * take the first one that we find following bpref. */ static ufs2_daddr_t -ffs_clusteralloc(ip, cg, bpref, len) - struct inode *ip; - u_int cg; - ufs2_daddr_t bpref; - int len; +ffs_clusteralloc(struct inode *ip, + u_int cg, + ufs2_daddr_t bpref, + int len) { struct fs *fs; struct cg *cgp; @@ -2043,7 +2037,10 @@ ffs_clusteralloc(ip, cg, bpref, len) } static inline struct buf * -getinobuf(struct inode *ip, u_int cg, u_int32_t cginoblk, int gbflags) +getinobuf(struct inode *ip, + u_int cg, + u_int32_t cginoblk, + int gbflags) { struct fs *fs; @@ -2073,12 +2070,11 @@ SYSCTL_INT(_vfs_ffs, OID_AUTO, doasyncinodeinit, CTLFLAG_RWTUN, * inode in the specified cylinder group. */ static ufs2_daddr_t -ffs_nodealloccg(ip, cg, ipref, mode, unused) - struct inode *ip; - u_int cg; - ufs2_daddr_t ipref; - int mode; - int unused; +ffs_nodealloccg(struct inode *ip, + u_int cg, + ufs2_daddr_t ipref, + int mode, + int unused) { struct fs *fs; struct cg *cgp; @@ -2230,14 +2226,13 @@ ffs_nodealloccg(ip, cg, ipref, mode, unused) * block reassembly is checked. */ static void -ffs_blkfree_cg(ump, fs, devvp, bno, size, inum, dephd) - struct ufsmount *ump; - struct fs *fs; - struct vnode *devvp; - ufs2_daddr_t bno; - long size; - ino_t inum; - struct workhead *dephd; +ffs_blkfree_cg(struct ufsmount *ump, + struct fs *fs, + struct vnode *devvp, + ufs2_daddr_t bno, + long size, + ino_t inum, + struct workhead *dephd) { struct mount *mp; struct cg *cgp; @@ -2422,8 +2417,7 @@ static void ffs_blkfree_sendtrim(struct ffs_blkfree_trim_params *); * Called on trim completion to start a task to free the associated block(s). */ static void -ffs_blkfree_trim_completed(bp) - struct buf *bp; +ffs_blkfree_trim_completed(struct buf *bp) { struct ffs_blkfree_trim_params *tp; @@ -2437,9 +2431,7 @@ ffs_blkfree_trim_completed(bp) * Trim completion task that free associated block(s). */ static void -ffs_blkfree_trim_task(ctx, pending) - void *ctx; - int pending; +ffs_blkfree_trim_task(void *ctx, int pending) { struct ffs_blkfree_trim_params *tp; struct trim_blkreq *blkelm; @@ -2466,14 +2458,13 @@ ffs_blkfree_trim_task(ctx, pending) * Allocate if requested (NEW, REPLACE, SINGLE). */ static struct ffs_blkfree_trim_params * -trim_lookup(ump, devvp, bno, size, inum, key, alloctype) - struct ufsmount *ump; - struct vnode *devvp; - ufs2_daddr_t bno; - long size; - ino_t inum; - u_long key; - int alloctype; +trim_lookup(struct ufsmount *ump, + struct vnode *devvp, + ufs2_daddr_t bno, + long size, + ino_t inum, + u_long key, + int alloctype) { struct trimlist_hashhead *tphashhead; struct ffs_blkfree_trim_params *tp, *ntp; @@ -2527,9 +2518,8 @@ trim_lookup(ump, devvp, bno, size, inum, key, alloctype) * Dispatch a trim request. */ static void -ffs_blkfree_sendtrim(tp) - struct ffs_blkfree_trim_params *tp; -{ +ffs_blkfree_sendtrim(struct ffs_blkfree_trim_params *tp) +{ struct ufsmount *ump; struct mount *mp; struct buf *bp; @@ -2563,10 +2553,9 @@ ffs_blkfree_sendtrim(tp) * Allocate a new key to use to identify a range of blocks. */ u_long -ffs_blkrelease_start(ump, devvp, inum) - struct ufsmount *ump; - struct vnode *devvp; - ino_t inum; +ffs_blkrelease_start(struct ufsmount *ump, + struct vnode *devvp, + ino_t inum) { static u_long masterkey; u_long key; @@ -2584,9 +2573,7 @@ ffs_blkrelease_start(ump, devvp, inum) * Deallocate a key that has been used to identify a range of blocks. */ void -ffs_blkrelease_finish(ump, key) - struct ufsmount *ump; - u_long key; +ffs_blkrelease_finish(struct ufsmount *ump, u_long key) { struct ffs_blkfree_trim_params *tp; @@ -2632,16 +2619,15 @@ ffs_blkrelease_finish(ump, key) * aggregate consecutive blocks into a single trim request. */ void -ffs_blkfree(ump, fs, devvp, bno, size, inum, vtype, dephd, key) - struct ufsmount *ump; - struct fs *fs; - struct vnode *devvp; - ufs2_daddr_t bno; - long size; - ino_t inum; - enum vtype vtype; - struct workhead *dephd; - u_long key; +ffs_blkfree(struct ufsmount *ump, + struct fs *fs, + struct vnode *devvp, + ufs2_daddr_t bno, + long size, + ino_t inum, + enum vtype vtype, + struct workhead *dephd, + u_long key) { struct ffs_blkfree_trim_params *tp, *ntp; struct trim_blkreq *blkelm; @@ -2740,10 +2726,9 @@ ffs_blkfree(ump, fs, devvp, bno, size, inum, vtype, dephd, key) * fragment is allocated, false if it is free. */ static int -ffs_checkblk(ip, bno, size) - struct inode *ip; - ufs2_daddr_t bno; - long size; +ffs_checkblk(struct inode *ip, + ufs2_daddr_t bno, + long size) { struct fs *fs; struct cg *cgp; @@ -2784,10 +2769,9 @@ 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) { struct ufsmount *ump; @@ -2804,13 +2788,12 @@ ffs_vfree(pvp, ino, mode) * The specified inode is placed back in the free map. */ int -ffs_freefile(ump, fs, devvp, ino, mode, wkhd) - struct ufsmount *ump; - struct fs *fs; - struct vnode *devvp; - ino_t ino; - int mode; - struct workhead *wkhd; +ffs_freefile(struct ufsmount *ump, + struct fs *fs, + struct vnode *devvp, + ino_t ino, + int mode, + struct workhead *wkhd) { struct cg *cgp; struct buf *bp; @@ -2886,10 +2869,9 @@ ffs_freefile(ump, fs, devvp, ino, mode, wkhd) * Used to check for allocated files in snapshots. */ int -ffs_checkfreefile(fs, devvp, ino) - struct fs *fs; - struct vnode *devvp; - ino_t ino; +ffs_checkfreefile(struct fs *fs, + struct vnode *devvp, + ino_t ino) { struct cg *cgp; struct buf *bp; @@ -2918,11 +2900,10 @@ ffs_checkfreefile(fs, devvp, ino) * available. */ static ufs1_daddr_t -ffs_mapsearch(fs, cgp, bpref, allocsiz) - struct fs *fs; - struct cg *cgp; - ufs2_daddr_t bpref; - int allocsiz; +ffs_mapsearch(struct fs *fs, + struct cg *cgp, + ufs2_daddr_t bpref, + int allocsiz) { ufs1_daddr_t bno; int start, len, loc, i; @@ -2991,13 +2972,12 @@ ffs_getmntstat(struct vnode *devvp) * Fetch and verify a cylinder group. */ int -ffs_getcg(fs, devvp, cg, flags, bpp, cgpp) - struct fs *fs; - struct vnode *devvp; - u_int cg; - int flags; - struct buf **bpp; - struct cg **cgpp; +ffs_getcg(struct fs *fs, + struct vnode *devvp, + u_int cg, + int flags, + struct buf **bpp, + struct cg **cgpp) { struct buf *bp; struct cg *cgp; @@ -3068,8 +3048,7 @@ ffs_getcg(fs, devvp, cg, flags, bpp, cgpp) } static void -ffs_ckhash_cg(bp) - struct buf *bp; +ffs_ckhash_cg(struct buf *bp) { uint32_t ckhash; struct cg *cgp; @@ -3088,10 +3067,9 @@ ffs_ckhash_cg(bp) * fs: error message */ void -ffs_fserr(fs, inum, cp) - struct fs *fs; - ino_t inum; - char *cp; +ffs_fserr(struct fs *fs, + ino_t inum, + char *cp) { struct thread *td = curthread; /* XXX */ struct proc *p = td->td_proc; diff --git a/sys/ufs/ffs/ffs_inode.c b/sys/ufs/ffs/ffs_inode.c index 91d1b78e3d93..517b6084319c 100644 --- a/sys/ufs/ffs/ffs_inode.c +++ b/sys/ufs/ffs/ffs_inode.c @@ -95,9 +95,7 @@ ffs_inode_bwrite(struct vnode *vp, struct buf *bp, int flags) * 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; @@ -234,11 +232,10 @@ ffs_update(vp, waitfor) * disk blocks. */ int -ffs_truncate(vp, length, flags, cred) - struct vnode *vp; - off_t length; - int flags; - struct ucred *cred; +ffs_truncate(struct vnode *vp, + off_t length, + int flags, + struct ucred *cred) { struct inode *ip; ufs2_daddr_t bn, lbn, lastblock, lastiblock[UFS_NIADDR]; @@ -695,12 +692,12 @@ ffs_truncate(vp, length, flags, cred) * blocks. */ static int -ffs_indirtrunc(ip, lbn, dbn, lastbn, level, countp) - struct inode *ip; - ufs2_daddr_t lbn, lastbn; - ufs2_daddr_t dbn; - int level; - ufs2_daddr_t *countp; +ffs_indirtrunc(struct inode *ip, + ufs2_daddr_t lbn, + ufs2_daddr_t lastbn, + ufs2_daddr_t dbn, + int level, + ufs2_daddr_t *countp) { struct buf *bp; struct fs *fs; diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c index 2d3e77df4d7c..a23c4ab02bf6 100644 --- a/sys/ufs/ffs/ffs_snapshot.c +++ b/sys/ufs/ffs/ffs_snapshot.c @@ -80,62 +80,51 @@ __FBSDID("$FreeBSD$"); #ifdef NO_FFS_SNAPSHOT int -ffs_snapshot(mp, snapfile) - struct mount *mp; - char *snapfile; +ffs_snapshot(struct mount *mp, char *snapfile) { return (EINVAL); } int -ffs_snapblkfree(fs, devvp, bno, size, inum, vtype, wkhd) - struct fs *fs; - struct vnode *devvp; - ufs2_daddr_t bno; - long size; - ino_t inum; - enum vtype vtype; - struct workhead *wkhd; +ffs_snapblkfree(struct fs *fs, + struct vnode *devvp, + ufs2_daddr_t bno, + long size, + ino_t inum, + enum vtype vtype, + struct workhead *wkhd) { return (EINVAL); } void -ffs_snapremove(vp) - struct vnode *vp; +ffs_snapremove(struct vnode *vp) { } void -ffs_snapshot_mount(mp) - struct mount *mp; +ffs_snapshot_mount(struct mount *mp) { } void -ffs_snapshot_unmount(mp) - struct mount *mp; +ffs_snapshot_unmount(struct mount *mp) { } void -ffs_snapgone(ip) - struct inode *ip; +ffs_snapgone(struct inode *ip) { } int -ffs_copyonwrite(devvp, bp) - struct vnode *devvp; - struct buf *bp; +ffs_copyonwrite(struct vnode *devvp, struct buf *bp) { return (EINVAL); } void -ffs_sync_snap(mp, waitfor) - struct mount *mp; - int waitfor; +ffs_sync_snap(struct mount *mp, int waitfor) { } @@ -204,9 +193,7 @@ SYSCTL_INT(_debug, OID_AUTO, collectsnapstats, CTLFLAG_RW, &collectsnapstats, * Create a snapshot file and initialize it for the filesystem. */ int -ffs_snapshot(mp, snapfile) - struct mount *mp; - char *snapfile; +ffs_snapshot(struct mount *mp, char *snapfile) { ufs2_daddr_t numblks, blkno, *blkp, *snapblklist; int error, cg, snaploc; @@ -906,11 +893,10 @@ ffs_snapshot(mp, snapfile) * replacement pass is done. */ static int -cgaccount(cg, vp, nbp, passno) - int cg; - struct vnode *vp; - struct buf *nbp; - int passno; +cgaccount(int cg, + struct vnode *vp, + struct buf *nbp, + int passno) { struct buf *bp, *ibp; struct inode *ip; @@ -1026,14 +1012,13 @@ cgaccount(cg, vp, nbp, passno) * is reproduced once each for UFS1 and UFS2. */ static int -expunge_ufs1(snapvp, cancelip, fs, acctfunc, expungetype, clearmode) - struct vnode *snapvp; - struct inode *cancelip; - struct fs *fs; +expunge_ufs1(struct vnode *snapvp, + struct inode *cancelip, + struct fs *fs, int (*acctfunc)(struct vnode *, ufs1_daddr_t *, ufs1_daddr_t *, - struct fs *, ufs_lbn_t, int); - int expungetype; - int clearmode; + struct fs *, ufs_lbn_t, int), + int expungetype, + int clearmode) { int i, error, indiroff; ufs_lbn_t lbn, rlbn; @@ -1122,20 +1107,18 @@ expunge_ufs1(snapvp, cancelip, fs, acctfunc, expungetype, clearmode) * its indirect blocks in snapvp. */ static int -indiracct_ufs1(snapvp, cancelvp, level, blkno, lbn, rlbn, remblks, - blksperindir, fs, acctfunc, expungetype) - struct vnode *snapvp; - struct vnode *cancelvp; - int level; - ufs1_daddr_t blkno; - ufs_lbn_t lbn; - ufs_lbn_t rlbn; - ufs_lbn_t remblks; - ufs_lbn_t blksperindir; - struct fs *fs; +indiracct_ufs1(struct vnode *snapvp, + struct vnode *cancelvp, + int level, + ufs1_daddr_t blkno, + ufs_lbn_t lbn, + ufs_lbn_t rlbn, + ufs_lbn_t remblks, + ufs_lbn_t blksperindir, + struct fs *fs, int (*acctfunc)(struct vnode *, ufs1_daddr_t *, ufs1_daddr_t *, - struct fs *, ufs_lbn_t, int); - int expungetype; + struct fs *, ufs_lbn_t, int), + int expungetype) { int error, num, i; ufs_lbn_t subblksperindir; @@ -1199,12 +1182,12 @@ indiracct_ufs1(snapvp, cancelvp, level, blkno, lbn, rlbn, remblks, * Do both snap accounting and map accounting. */ static int -fullacct_ufs1(vp, oldblkp, lastblkp, fs, lblkno, exptype) - struct vnode *vp; - ufs1_daddr_t *oldblkp, *lastblkp; - struct fs *fs; - ufs_lbn_t lblkno; - int exptype; /* BLK_SNAP or BLK_NOCOPY */ +fullacct_ufs1(struct vnode *vp, + ufs1_daddr_t *oldblkp, + ufs1_daddr_t *lastblkp, + struct fs *fs, + ufs_lbn_t lblkno, + int exptype) /* BLK_SNAP or BLK_NOCOPY */ { int error; @@ -1217,12 +1200,12 @@ fullacct_ufs1(vp, oldblkp, lastblkp, fs, lblkno, exptype) * Identify a set of blocks allocated in a snapshot inode. */ static int -snapacct_ufs1(vp, oldblkp, lastblkp, fs, lblkno, expungetype) - struct vnode *vp; - ufs1_daddr_t *oldblkp, *lastblkp; - struct fs *fs; - ufs_lbn_t lblkno; - int expungetype; /* BLK_SNAP or BLK_NOCOPY */ +snapacct_ufs1(struct vnode *vp, + ufs1_daddr_t *oldblkp, + ufs1_daddr_t *lastblkp, + struct fs *fs, + ufs_lbn_t lblkno, + int expungetype) /* BLK_SNAP or BLK_NOCOPY */ { struct inode *ip = VTOI(vp); ufs1_daddr_t blkno, *blkp; @@ -1270,12 +1253,12 @@ snapacct_ufs1(vp, oldblkp, lastblkp, fs, lblkno, expungetype) * Account for a set of blocks allocated in a snapshot inode. */ static int -mapacct_ufs1(vp, oldblkp, lastblkp, fs, lblkno, expungetype) - struct vnode *vp; - ufs1_daddr_t *oldblkp, *lastblkp; - struct fs *fs; - ufs_lbn_t lblkno; - int expungetype; +mapacct_ufs1(struct vnode *vp, + ufs1_daddr_t *oldblkp, + ufs1_daddr_t *lastblkp, + struct fs *fs, + ufs_lbn_t lblkno, + int expungetype) { ufs1_daddr_t blkno; struct inode *ip; @@ -1311,14 +1294,13 @@ mapacct_ufs1(vp, oldblkp, lastblkp, fs, lblkno, expungetype) * is reproduced once each for UFS1 and UFS2. */ static int -expunge_ufs2(snapvp, cancelip, fs, acctfunc, expungetype, clearmode) - struct vnode *snapvp; - struct inode *cancelip; - struct fs *fs; +expunge_ufs2(struct vnode *snapvp, + struct inode *cancelip, + struct fs *fs, int (*acctfunc)(struct vnode *, ufs2_daddr_t *, ufs2_daddr_t *, - struct fs *, ufs_lbn_t, int); - int expungetype; - int clearmode; + struct fs *, ufs_lbn_t, int), + int expungetype, + int clearmode) { int i, error, indiroff; ufs_lbn_t lbn, rlbn; @@ -1409,20 +1391,18 @@ expunge_ufs2(snapvp, cancelip, fs, acctfunc, expungetype, clearmode) * its indirect blocks in snapvp. */ static int -indiracct_ufs2(snapvp, cancelvp, level, blkno, lbn, rlbn, remblks, - blksperindir, fs, acctfunc, expungetype) - struct vnode *snapvp; - struct vnode *cancelvp; - int level; - ufs2_daddr_t blkno; - ufs_lbn_t lbn; - ufs_lbn_t rlbn; - ufs_lbn_t remblks; - ufs_lbn_t blksperindir; - struct fs *fs; +indiracct_ufs2(struct vnode *snapvp, + struct vnode *cancelvp, + int level, + ufs2_daddr_t blkno, + ufs_lbn_t lbn, + ufs_lbn_t rlbn, + ufs_lbn_t remblks, + ufs_lbn_t blksperindir, + struct fs *fs, int (*acctfunc)(struct vnode *, ufs2_daddr_t *, ufs2_daddr_t *, - struct fs *, ufs_lbn_t, int); - int expungetype; + struct fs *, ufs_lbn_t, int), + int expungetype) { int error, num, i; ufs_lbn_t subblksperindir; @@ -1486,12 +1466,12 @@ indiracct_ufs2(snapvp, cancelvp, level, blkno, lbn, rlbn, remblks, * Do both snap accounting and map accounting. */ static int -fullacct_ufs2(vp, oldblkp, lastblkp, fs, lblkno, exptype) - struct vnode *vp; - ufs2_daddr_t *oldblkp, *lastblkp; - struct fs *fs; - ufs_lbn_t lblkno; - int exptype; /* BLK_SNAP or BLK_NOCOPY */ +fullacct_ufs2(struct vnode *vp, + ufs2_daddr_t *oldblkp, + ufs2_daddr_t *lastblkp, + struct fs *fs, + ufs_lbn_t lblkno, + int exptype) /* BLK_SNAP or BLK_NOCOPY */ { int error; @@ -1504,12 +1484,12 @@ fullacct_ufs2(vp, oldblkp, lastblkp, fs, lblkno, exptype) * Identify a set of blocks allocated in a snapshot inode. */ static int -snapacct_ufs2(vp, oldblkp, lastblkp, fs, lblkno, expungetype) - struct vnode *vp; - ufs2_daddr_t *oldblkp, *lastblkp; - struct fs *fs; - ufs_lbn_t lblkno; - int expungetype; /* BLK_SNAP or BLK_NOCOPY */ +snapacct_ufs2(struct vnode *vp, + ufs2_daddr_t *oldblkp, + ufs2_daddr_t *lastblkp, + struct fs *fs, + ufs_lbn_t lblkno, + int expungetype) /* BLK_SNAP or BLK_NOCOPY */ { struct inode *ip = VTOI(vp); ufs2_daddr_t blkno, *blkp; @@ -1557,12 +1537,12 @@ snapacct_ufs2(vp, oldblkp, lastblkp, fs, lblkno, expungetype) * Account for a set of blocks allocated in a snapshot inode. */ static int -mapacct_ufs2(vp, oldblkp, lastblkp, fs, lblkno, expungetype) - struct vnode *vp; - ufs2_daddr_t *oldblkp, *lastblkp; - struct fs *fs; - ufs_lbn_t lblkno; - int expungetype; +mapacct_ufs2(struct vnode *vp, + ufs2_daddr_t *oldblkp, + ufs2_daddr_t *lastblkp, + struct fs *fs, + ufs_lbn_t lblkno, + int expungetype) { ufs2_daddr_t blkno; struct inode *ip; @@ -1595,8 +1575,7 @@ mapacct_ufs2(vp, oldblkp, lastblkp, fs, lblkno, expungetype) * It will not be freed until the last open reference goes away. */ void -ffs_snapgone(ip) - struct inode *ip; +ffs_snapgone(struct inode *ip) { struct inode *xp; struct fs *fs; @@ -1644,8 +1623,7 @@ ffs_snapgone(ip) * Prepare a snapshot file for being removed. */ void -ffs_snapremove(vp) - struct vnode *vp; +ffs_snapremove(struct vnode *vp) { struct inode *ip; struct vnode *devvp; @@ -1774,14 +1752,13 @@ ffs_snapremove(vp) * must always have been allocated from a BLK_NOCOPY location. */ int -ffs_snapblkfree(fs, devvp, bno, size, inum, vtype, wkhd) - struct fs *fs; - struct vnode *devvp; - ufs2_daddr_t bno; - long size; - ino_t inum; - enum vtype vtype; - struct workhead *wkhd; +ffs_snapblkfree(struct fs *fs, + struct vnode *devvp, + ufs2_daddr_t bno, + long size, + ino_t inum, + enum vtype vtype, + struct workhead *wkhd) { struct buf *ibp, *cbp, *savedcbp = NULL; struct thread *td = curthread; @@ -1993,8 +1970,7 @@ ffs_snapblkfree(fs, devvp, bno, size, inum, vtype, wkhd) * Associate snapshot files when mounting. */ void -ffs_snapshot_mount(mp) - struct mount *mp; +ffs_snapshot_mount(struct mount *mp) { struct ufsmount *ump = VFSTOUFS(mp); struct vnode *devvp = ump->um_devvp; @@ -2133,8 +2109,7 @@ ffs_snapshot_mount(mp) * Disassociate snapshot files when unmounting. */ void -ffs_snapshot_unmount(mp) - struct mount *mp; +ffs_snapshot_unmount(struct mount *mp) { struct vnode *devvp = VFSTOUFS(mp)->um_devvp; struct snapdata *sn; @@ -2169,9 +2144,7 @@ ffs_snapshot_unmount(mp) * leaved locked upon exit. */ static int -ffs_bp_snapblk(devvp, bp) - struct vnode *devvp; - struct buf *bp; +ffs_bp_snapblk(struct vnode *devvp, struct buf *bp) { struct snapdata *sn; struct fs *fs; @@ -2203,9 +2176,7 @@ ffs_bp_snapblk(devvp, bp) } void -ffs_bdflush(bo, bp) - struct bufobj *bo; - struct buf *bp; +ffs_bdflush(struct bufobj *bo, struct buf *bp) { struct thread *td; struct vnode *vp, *devvp; @@ -2279,9 +2250,7 @@ ffs_bdflush(bo, bp) * copying the block if necessary. */ int -ffs_copyonwrite(devvp, bp) - struct vnode *devvp; - struct buf *bp; +ffs_copyonwrite(struct vnode *devvp, struct buf *bp) { struct snapdata *sn; struct buf *ibp, *cbp, *savedcbp = NULL; @@ -2501,9 +2470,7 @@ ffs_copyonwrite(devvp, bp) * blocks to free. */ void -ffs_sync_snap(mp, waitfor) - struct mount *mp; - int waitfor; +ffs_sync_snap(struct mount *mp, int waitfor) { struct snapdata *sn; struct vnode *devvp; @@ -2537,10 +2504,9 @@ ffs_sync_snap(mp, waitfor) * Much of this boiler-plate comes from bwrite(). */ static int -readblock(vp, bp, lbn) - struct vnode *vp; - struct buf *bp; - ufs2_daddr_t lbn; +readblock(struct vnode *vp, + struct buf *bp, + ufs2_daddr_t lbn) { struct inode *ip; struct fs *fs; @@ -2688,10 +2654,9 @@ try_free_snapdata(struct vnode *devvp) * get the same number of recursions on the vnode's own lock. */ static void -revert_snaplock(vp, devvp, sn) - struct vnode *vp; - struct vnode *devvp; - struct snapdata *sn; +revert_snaplock(struct vnode *vp, + struct vnode *devvp, + struct snapdata *sn) { int i; diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index 8fbd6ed58efa..6adc780c7d67 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -96,401 +96,351 @@ __FBSDID("$FreeBSD$"); #ifndef SOFTUPDATES int -softdep_flushfiles(oldmnt, flags, td) - struct mount *oldmnt; - int flags; - struct thread *td; +softdep_flushfiles(struct mount *oldmnt, + int flags, + struct thread *td) { panic("softdep_flushfiles called"); } int -softdep_mount(devvp, mp, fs, cred) - struct vnode *devvp; - struct mount *mp; - struct fs *fs; - struct ucred *cred; +softdep_mount(struct vnode *devvp, + struct mount *mp, + struct fs *fs, + struct ucred *cred) { return (0); } void -softdep_initialize() +softdep_initialize(void) { return; } void -softdep_uninitialize() +softdep_uninitialize(void) { return; } void -softdep_unmount(mp) - struct mount *mp; +softdep_unmount(struct mount *mp) { panic("softdep_unmount called"); } void -softdep_setup_sbupdate(ump, fs, bp) - struct ufsmount *ump; - struct fs *fs; - struct buf *bp; +softdep_setup_sbupdate(struct ufsmount *ump, + struct fs *fs, + struct buf *bp) { panic("softdep_setup_sbupdate called"); } void -softdep_setup_inomapdep(bp, ip, newinum, mode) - struct buf *bp; - struct inode *ip; - ino_t newinum; - int mode; +softdep_setup_inomapdep(struct buf *bp, + struct inode *ip, + ino_t newinum, + int mode) { panic("softdep_setup_inomapdep called"); } void -softdep_setup_blkmapdep(bp, mp, newblkno, frags, oldfrags) - struct buf *bp; - struct mount *mp; - ufs2_daddr_t newblkno; - int frags; - int oldfrags; +softdep_setup_blkmapdep(struct buf *bp, + struct mount *mp, + ufs2_daddr_t newblkno, + int frags, + int oldfrags) { panic("softdep_setup_blkmapdep called"); } void -softdep_setup_allocdirect(ip, lbn, newblkno, oldblkno, newsize, oldsize, bp) - struct inode *ip; - ufs_lbn_t lbn; - ufs2_daddr_t newblkno; - ufs2_daddr_t oldblkno; - long newsize; - long oldsize; - struct buf *bp; +softdep_setup_allocdirect(struct inode *ip, + ufs_lbn_t lbn, + ufs2_daddr_t newblkno, + ufs2_daddr_t oldblkno, + long newsize, + long oldsize, + struct buf *bp) { panic("softdep_setup_allocdirect called"); } void -softdep_setup_allocext(ip, lbn, newblkno, oldblkno, newsize, oldsize, bp) - struct inode *ip; - ufs_lbn_t lbn; - ufs2_daddr_t newblkno; - ufs2_daddr_t oldblkno; - long newsize; - long oldsize; - struct buf *bp; +softdep_setup_allocext(struct inode *ip, + ufs_lbn_t lbn, + ufs2_daddr_t newblkno, + ufs2_daddr_t oldblkno, + long newsize, + long oldsize, + struct buf *bp) { panic("softdep_setup_allocext 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; - ufs2_daddr_t newblkno; - ufs2_daddr_t oldblkno; - struct buf *nbp; +softdep_setup_allocindir_page(struct inode *ip, + ufs_lbn_t lbn, + struct buf *bp, + int ptrno, + ufs2_daddr_t newblkno, + ufs2_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; - ufs2_daddr_t newblkno; +softdep_setup_allocindir_meta(struct buf *nbp, + struct inode *ip, + struct buf *bp, + int ptrno, + ufs2_daddr_t newblkno) { panic("softdep_setup_allocindir_meta called"); } void -softdep_journal_freeblocks(ip, cred, length, flags) - struct inode *ip; - struct ucred *cred; - off_t length; - int flags; +softdep_journal_freeblocks(struct inode *ip, + struct ucred *cred, + off_t length, + int flags) { panic("softdep_journal_freeblocks called"); } void -softdep_journal_fsync(ip) - struct inode *ip; +softdep_journal_fsync(struct inode *ip) { panic("softdep_journal_fsync called"); } void -softdep_setup_freeblocks(ip, length, flags) - struct inode *ip; - off_t length; - int flags; +softdep_setup_freeblocks(struct inode *ip, + off_t length, + int flags) { panic("softdep_setup_freeblocks called"); } 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"); } int -softdep_setup_directory_add(bp, dp, diroffset, newinum, newdirbp, isnewblk) - struct buf *bp; - struct inode *dp; - off_t diroffset; - ino_t newinum; - struct buf *newdirbp; - int isnewblk; +softdep_setup_directory_add(struct buf *bp, + struct inode *dp, + off_t diroffset, + ino_t newinum, + struct buf *newdirbp, + int isnewblk) { panic("softdep_setup_directory_add called"); } void -softdep_change_directoryentry_offset(bp, dp, base, oldloc, newloc, entrysize) - struct buf *bp; - struct inode *dp; - caddr_t base; - caddr_t oldloc; - caddr_t newloc; - int entrysize; +softdep_change_directoryentry_offset(struct buf *bp, + 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; - ino_t newinum; - int isrmdir; +softdep_setup_directory_change(struct buf *bp, + struct inode *dp, + struct inode *ip, + ino_t newinum, + int isrmdir) { panic("softdep_setup_directory_change called"); } void -softdep_setup_blkfree(mp, bp, blkno, frags, wkhd) - struct mount *mp; - struct buf *bp; - ufs2_daddr_t blkno; - int frags; - struct workhead *wkhd; +softdep_setup_blkfree(struct mount *mp, + struct buf *bp, + ufs2_daddr_t blkno, + int frags, + struct workhead *wkhd) { panic("%s called", __FUNCTION__); } void -softdep_setup_inofree(mp, bp, ino, wkhd) - struct mount *mp; - struct buf *bp; - ino_t ino; - struct workhead *wkhd; +softdep_setup_inofree(struct mount *mp, + struct buf *bp, + ino_t ino, + struct workhead *wkhd) { panic("%s called", __FUNCTION__); } void -softdep_setup_unlink(dp, ip) - struct inode *dp; - struct inode *ip; +softdep_setup_unlink(struct inode *dp, struct inode *ip) { panic("%s called", __FUNCTION__); } void -softdep_setup_link(dp, ip) - struct inode *dp; - struct inode *ip; +softdep_setup_link(struct inode *dp, struct inode *ip) { panic("%s called", __FUNCTION__); } void -softdep_revert_link(dp, ip) - struct inode *dp; - struct inode *ip; +softdep_revert_link(struct inode *dp, struct inode *ip) { panic("%s called", __FUNCTION__); } void -softdep_setup_rmdir(dp, ip) - struct inode *dp; - struct inode *ip; +softdep_setup_rmdir(struct inode *dp, struct inode *ip) { panic("%s called", __FUNCTION__); } void -softdep_revert_rmdir(dp, ip) - struct inode *dp; - struct inode *ip; +softdep_revert_rmdir(struct inode *dp, struct inode *ip) { panic("%s called", __FUNCTION__); } void -softdep_setup_create(dp, ip) - struct inode *dp; - struct inode *ip; +softdep_setup_create(struct inode *dp, struct inode *ip) { panic("%s called", __FUNCTION__); } void -softdep_revert_create(dp, ip) - struct inode *dp; - struct inode *ip; +softdep_revert_create(struct inode *dp, struct inode *ip) { panic("%s called", __FUNCTION__); } void -softdep_setup_mkdir(dp, ip) - struct inode *dp; - struct inode *ip; +softdep_setup_mkdir(struct inode *dp, struct inode *ip) { panic("%s called", __FUNCTION__); } void -softdep_revert_mkdir(dp, ip) - struct inode *dp; - struct inode *ip; +softdep_revert_mkdir(struct inode *dp, struct inode *ip) { panic("%s called", __FUNCTION__); } void -softdep_setup_dotdot_link(dp, ip) - struct inode *dp; - struct inode *ip; +softdep_setup_dotdot_link(struct inode *dp, struct inode *ip) { panic("%s called", __FUNCTION__); } int -softdep_prealloc(vp, waitok) - struct vnode *vp; - int waitok; +softdep_prealloc(struct vnode *vp, int waitok) { panic("%s called", __FUNCTION__); } int -softdep_journal_lookup(mp, vpp) - struct mount *mp; - struct vnode **vpp; +softdep_journal_lookup(struct mount *mp, struct vnode **vpp) { return (ENOENT); } 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"); } int -softdep_fsync(vp) - struct vnode *vp; /* the "in_core" copy of the inode */ +softdep_fsync(struct vnode *vp) /* the "in_core" copy of the inode */ { return (0); } void -softdep_fsync_mountdev(vp) - struct vnode *vp; +softdep_fsync_mountdev(struct vnode *vp) { return; } int -softdep_flushworklist(oldmnt, countp, td) - struct mount *oldmnt; - int *countp; - struct thread *td; +softdep_flushworklist(struct mount *oldmnt, + int *countp, + struct thread *td) { *countp = 0; @@ -512,19 +462,17 @@ softdep_sync_buf(struct vnode *vp, struct buf *bp, int waitfor) } int -softdep_slowdown(vp) - struct vnode *vp; +softdep_slowdown(struct vnode *vp) { panic("softdep_slowdown called"); } int -softdep_request_cleanup(fs, vp, cred, resource) - struct fs *fs; - struct vnode *vp; - struct ucred *cred; - int resource; +softdep_request_cleanup(struct fs *fs, + struct vnode *vp, + struct ucred *cred, + int resource) { return (0); @@ -583,48 +531,42 @@ softdep_get_depcounts(struct mount *mp, } void -softdep_buf_append(bp, wkhd) - struct buf *bp; - struct workhead *wkhd; +softdep_buf_append(struct buf *bp, struct workhead *wkhd) { panic("softdep_buf_appendwork called"); } void -softdep_inode_append(ip, cred, wkhd) - struct inode *ip; - struct ucred *cred; - struct workhead *wkhd; +softdep_inode_append(struct inode *ip, + struct ucred *cred, + struct workhead *wkhd) { panic("softdep_inode_appendwork called"); } void -softdep_freework(wkhd) - struct workhead *wkhd; +softdep_freework(struct workhead *wkhd) { panic("softdep_freework called"); } int -softdep_prerename(fdvp, fvp, tdvp, tvp) - struct vnode *fdvp; - struct vnode *fvp; - struct vnode *tdvp; - struct vnode *tvp; +softdep_prerename(struct vnode *fdvp, + struct vnode *fvp, + struct vnode *tdvp, + struct vnode *tvp) { panic("softdep_prerename called"); } int -softdep_prelink(dvp, vp, cnp) - struct vnode *dvp; - struct vnode *vp; - struct componentname *cnp; +softdep_prelink(struct vnode *dvp, + struct vnode *vp, + struct componentname *cnp) { panic("softdep_prelink called"); @@ -1044,12 +986,11 @@ static void worklist_remove(struct worklist *, int, const char *, int); worklist_remove(item, 0, __func__, __LINE__) static void -worklist_insert(head, item, locked, func, line) - struct workhead *head; - struct worklist *item; - int locked; - const char *func; - int line; +worklist_insert(struct workhead *head, + struct worklist *item, + int locked, + const char *func, + int line) { if (locked) @@ -1066,11 +1007,10 @@ worklist_insert(head, item, locked, func, line) } static void -worklist_remove(item, locked, func, line) - struct worklist *item; - int locked; - const char *func; - int line; +worklist_remove(struct worklist *item, + int locked, + const char *func, + int line) { if (locked) @@ -1131,9 +1071,7 @@ freedep_merge(struct freedep *one, struct freedep *two) * jsegdeps are coalesced to keep the lists as small as possible. */ static void -jwork_move(dst, src) - struct workhead *dst; - struct workhead *src; +jwork_move(struct workhead *dst, struct workhead *src) { struct freedep *freedep; struct jsegdep *jsegdep; @@ -1164,9 +1102,7 @@ jwork_move(dst, src) } static void -jwork_insert(dst, jsegdep) - struct workhead *dst; - struct jsegdep *jsegdep; +jwork_insert(struct workhead *dst, struct jsegdep *jsegdep) { struct jsegdep *jsegdepn; struct worklist *wk; @@ -1200,9 +1136,7 @@ static void workitem_reassign(struct worklist *, int); workitem_reassign((struct worklist *)(item), (type)) static void -workitem_free(item, type) - struct worklist *item; - int type; +workitem_free(struct worklist *item, int type) { struct ufsmount *ump; @@ -1238,10 +1172,9 @@ workitem_free(item, type) } static void -workitem_alloc(item, type, mp) - struct worklist *item; - int type; - struct mount *mp; +workitem_alloc(struct worklist *item, + int type, + struct mount *mp) { struct ufsmount *ump; @@ -1265,9 +1198,7 @@ workitem_alloc(item, type, mp) } static void -workitem_reassign(item, newtype) - struct worklist *item; - int newtype; +workitem_reassign(struct worklist *item, int newtype) { struct ufsmount *ump; @@ -1412,8 +1343,10 @@ SYSCTL_INT(_debug_softdep, OID_AUTO, print_threads, CTLFLAG_RW, static TAILQ_HEAD(, mount_softdeps) softdepmounts; static void -get_parent_vp_unlock_bp(struct mount *mp, struct buf *bp, - struct diraddhd *diraddhdp, struct diraddhd *unfinishedp) +get_parent_vp_unlock_bp(struct mount *mp, + struct buf *bp, + struct diraddhd *diraddhdp, + struct diraddhd *unfinishedp) { struct diradd *dap; @@ -1459,9 +1392,13 @@ get_parent_vp_unlock_bp(struct mount *mp, struct buf *bp, * vp while it is under deactivation, we re-queue deactivation. */ static int -get_parent_vp(struct vnode *vp, struct mount *mp, ino_t inum, struct buf *bp, - struct diraddhd *diraddhdp, struct diraddhd *unfinishedp, - struct vnode **rvp) +get_parent_vp(struct vnode *vp, + struct mount *mp, + ino_t inum, + struct buf *bp, + struct diraddhd *diraddhdp, + struct diraddhd *unfinishedp, + struct vnode **rvp) { struct vnode *pvp; int error; @@ -1562,8 +1499,7 @@ get_parent_vp(struct vnode *vp, struct mount *mp, ino_t inum, struct buf *bp, static int searchfailed; extern struct proc *bufdaemonproc; static void -softdep_flush(addr) - void *addr; +softdep_flush(void *addr) { struct mount *mp; struct thread *td; @@ -1618,8 +1554,7 @@ softdep_flush(addr) } static void -worklist_speedup(mp) - struct mount *mp; +worklist_speedup(struct mount *mp) { struct ufsmount *ump; @@ -1631,7 +1566,9 @@ worklist_speedup(mp) } static void -softdep_send_speedup(struct ufsmount *ump, off_t shortage, u_int flags) +softdep_send_speedup(struct ufsmount *ump, + off_t shortage, + u_int flags) { struct buf *bp; @@ -1648,8 +1585,7 @@ softdep_send_speedup(struct ufsmount *ump, off_t shortage, u_int flags) } static int -softdep_speedup(ump) - struct ufsmount *ump; +softdep_speedup(struct ufsmount *ump) { struct ufsmount *altump; struct mount_softdeps *sdp; @@ -1711,9 +1647,7 @@ softdep_speedup(ump) #define WK_NODELAY 0x0002 /* Process immediately. */ static void -add_to_worklist(wk, flags) - struct worklist *wk; - int flags; +add_to_worklist(struct worklist *wk, int flags) { struct ufsmount *ump; @@ -1742,8 +1676,7 @@ add_to_worklist(wk, flags) * item on the list, we need to recalculate the tail pointer. */ static void -remove_from_worklist(wk) - struct worklist *wk; +remove_from_worklist(struct worklist *wk) { struct ufsmount *ump; @@ -1756,8 +1689,7 @@ remove_from_worklist(wk) } static void -wake_worklist(wk) - struct worklist *wk; +wake_worklist(struct worklist *wk) { if (wk->wk_state & IOWAITING) { wk->wk_state &= ~IOWAITING; @@ -1766,9 +1698,7 @@ wake_worklist(wk) } static void -wait_worklist(wk, wmesg) - struct worklist *wk; - char *wmesg; +wait_worklist(struct worklist *wk, char *wmesg) { struct ufsmount *ump; @@ -1787,9 +1717,7 @@ wait_worklist(wk, wmesg) * until all the old ones have been purged from the dependency lists. */ static int -softdep_process_worklist(mp, full) - struct mount *mp; - int full; +softdep_process_worklist(struct mount *mp, int full) { int cnt, matchcnt; struct ufsmount *ump; @@ -1840,8 +1768,7 @@ softdep_process_worklist(mp, full) * be unable as we have the vnodes locked. */ static void -process_removes(vp) - struct vnode *vp; +process_removes(struct vnode *vp) { struct inodedep *inodedep; struct dirrem *dirrem; @@ -1890,8 +1817,7 @@ process_removes(vp) * a value greater than zero if it did any work. */ static void -process_truncates(vp) - struct vnode *vp; +process_truncates(struct vnode *vp) { struct inodedep *inodedep; struct freeblks *freeblks; @@ -1962,10 +1888,9 @@ process_truncates(vp) * Process one item on the worklist. */ static int -process_worklist_item(mp, target, flags) - struct mount *mp; - int target; - int flags; +process_worklist_item(struct mount *mp, + int target, + int flags) { struct worklist sentinel; struct worklist *wk; @@ -2062,9 +1987,7 @@ process_worklist_item(mp, target, flags) * Move dependencies from one buffer to another. */ int -softdep_move_dependencies(oldbp, newbp) - struct buf *oldbp; - struct buf *newbp; +softdep_move_dependencies(struct buf *oldbp, struct buf *newbp) { struct worklist *wk, *wktail; struct ufsmount *ump; @@ -2098,10 +2021,9 @@ softdep_move_dependencies(oldbp, newbp) * Purge the work list of all items associated with a particular mount point. */ int -softdep_flushworklist(oldmnt, countp, td) - struct mount *oldmnt; - int *countp; - struct thread *td; +softdep_flushworklist(struct mount *oldmnt, + int *countp, + struct thread *td) { struct vnode *devvp; struct ufsmount *ump; @@ -2172,10 +2094,9 @@ softdep_waitidle(struct mount *mp, int flags __unused) * Flush all vnodes and worklist items associated with a specified mount point. */ int -softdep_flushfiles(oldmnt, flags, td) - struct mount *oldmnt; - int flags; - struct thread *td; +softdep_flushfiles(struct mount *oldmnt, + int flags, + struct thread *td) { struct ufsmount *ump __unused; #ifdef QUOTA @@ -2285,11 +2206,10 @@ softdep_flushfiles(oldmnt, flags, td) (&(ump)->pagedep_hashtbl[((inum) + (lbn)) & (ump)->pagedep_hash_size]) static int -pagedep_find(pagedephd, ino, lbn, pagedeppp) - struct pagedep_hashhead *pagedephd; - ino_t ino; - ufs_lbn_t lbn; - struct pagedep **pagedeppp; +pagedep_find(struct pagedep_hashhead *pagedephd, + ino_t ino, + ufs_lbn_t lbn, + struct pagedep **pagedeppp) { struct pagedep *pagedep; @@ -2308,13 +2228,12 @@ pagedep_find(pagedephd, ino, lbn, pagedeppp) * Found or allocated entry is returned in pagedeppp. */ static int -pagedep_lookup(mp, bp, ino, lbn, flags, pagedeppp) - struct mount *mp; - struct buf *bp; - ino_t ino; - ufs_lbn_t lbn; - int flags; - struct pagedep **pagedeppp; +pagedep_lookup(struct mount *mp, + struct buf *bp, + ino_t ino, + ufs_lbn_t lbn, + int flags, + struct pagedep **pagedeppp) { struct pagedep *pagedep; struct pagedep_hashhead *pagedephd; @@ -2375,10 +2294,9 @@ pagedep_lookup(mp, bp, ino, lbn, flags, pagedeppp) (&(ump)->inodedep_hashtbl[(inum) & (ump)->inodedep_hash_size]) static int -inodedep_find(inodedephd, inum, inodedeppp) - struct inodedep_hashhead *inodedephd; - ino_t inum; - struct inodedep **inodedeppp; +inodedep_find(struct inodedep_hashhead *inodedephd, + ino_t inum, + struct inodedep **inodedeppp) { struct inodedep *inodedep; @@ -2399,11 +2317,10 @@ inodedep_find(inodedephd, inum, inodedeppp) * Found or allocated entry is returned in inodedeppp. */ static int -inodedep_lookup(mp, inum, flags, inodedeppp) - struct mount *mp; - ino_t inum; - int flags; - struct inodedep **inodedeppp; +inodedep_lookup(struct mount *mp, + ino_t inum, + int flags, + struct inodedep **inodedeppp) { struct inodedep *inodedep; struct inodedep_hashhead *inodedephd; @@ -2469,11 +2386,10 @@ inodedep_lookup(mp, inum, flags, inodedeppp) (&(ump)->newblk_hashtbl[(inum) & (ump)->newblk_hash_size]) static int -newblk_find(newblkhd, newblkno, flags, newblkpp) - struct newblk_hashhead *newblkhd; - ufs2_daddr_t newblkno; - int flags; - struct newblk **newblkpp; +newblk_find(struct newblk_hashhead *newblkhd, + ufs2_daddr_t newblkno, + int flags, + struct newblk **newblkpp) { struct newblk *newblk; @@ -2503,11 +2419,10 @@ newblk_find(newblkhd, newblkno, flags, newblkpp) * Found or allocated entry is returned in newblkpp. */ static int -newblk_lookup(mp, newblkno, flags, newblkpp) - struct mount *mp; - ufs2_daddr_t newblkno; - int flags; - struct newblk **newblkpp; +newblk_lookup(struct mount *mp, + ufs2_daddr_t newblkno, + int flags, + struct newblk **newblkpp) { struct newblk *newblk; struct newblk_hashhead *newblkhd; @@ -2557,9 +2472,7 @@ newblk_lookup(mp, newblkno, flags, newblkpp) * write before writing to the blkno. */ static int -indirblk_lookup(mp, blkno) - struct mount *mp; - ufs2_daddr_t blkno; +indirblk_lookup(struct mount *mp, ufs2_daddr_t blkno) { struct freework *freework; struct indir_hashhead *wkhd; @@ -2582,8 +2495,7 @@ indirblk_lookup(mp, blkno) * to the journal being written. */ static void -indirblk_insert(freework) - struct freework *freework; +indirblk_insert(struct freework *freework) { struct jblocks *jblocks; struct jseg *jseg; @@ -2602,8 +2514,7 @@ indirblk_insert(freework) } static void -indirblk_remove(freework) - struct freework *freework; +indirblk_remove(struct freework *freework) { struct ufsmount *ump; @@ -2620,7 +2531,7 @@ indirblk_remove(freework) * mounting any filesystems. */ void -softdep_initialize() +softdep_initialize(void) { TAILQ_INIT(&softdepmounts); @@ -2646,7 +2557,7 @@ softdep_initialize() * filesystem module unload. */ void -softdep_uninitialize() +softdep_uninitialize(void) { /* clear bioops hack */ @@ -2664,11 +2575,10 @@ softdep_uninitialize() * filesystem wishes to use it. */ int -softdep_mount(devvp, mp, fs, cred) - struct vnode *devvp; - struct mount *mp; - struct fs *fs; - struct ucred *cred; +softdep_mount(struct vnode *devvp, + struct mount *mp, + struct fs *fs, + struct ucred *cred) { struct csum_total cstotal; struct mount_softdeps *sdp; @@ -2778,8 +2688,7 @@ softdep_mount(devvp, mp, fs, cred) } void -softdep_unmount(mp) - struct mount *mp; +softdep_unmount(struct mount *mp) { struct ufsmount *ump; struct mount_softdeps *ums; @@ -2867,10 +2776,9 @@ jblocks_create(void) } static ufs2_daddr_t -jblocks_alloc(jblocks, bytes, actual) - struct jblocks *jblocks; - int bytes; - int *actual; +jblocks_alloc(struct jblocks *jblocks, + int bytes, + int *actual) { ufs2_daddr_t daddr; struct jextent *jext; @@ -2898,10 +2806,9 @@ jblocks_alloc(jblocks, bytes, actual) } static void -jblocks_free(jblocks, mp, bytes) - struct jblocks *jblocks; - struct mount *mp; - int bytes; +jblocks_free(struct jblocks *jblocks, + struct mount *mp, + int bytes) { LOCK_OWNED(VFSTOUFS(mp)); @@ -2912,8 +2819,7 @@ jblocks_free(jblocks, mp, bytes) } static void -jblocks_destroy(jblocks) - struct jblocks *jblocks; +jblocks_destroy(struct jblocks *jblocks) { if (jblocks->jb_extent) @@ -2922,10 +2828,9 @@ jblocks_destroy(jblocks) } static void -jblocks_add(jblocks, daddr, blocks) - struct jblocks *jblocks; - ufs2_daddr_t daddr; - int blocks; +jblocks_add(struct jblocks *jblocks, + ufs2_daddr_t daddr, + int blocks) { struct jextent *jext; @@ -2960,9 +2865,7 @@ jblocks_add(jblocks, daddr, blocks) } int -softdep_journal_lookup(mp, vpp) - struct mount *mp; - struct vnode **vpp; +softdep_journal_lookup(struct mount *mp, struct vnode **vpp) { struct componentname cnp; struct vnode *dvp; @@ -2991,10 +2894,9 @@ softdep_journal_lookup(mp, vpp) * Open and verify the journal file. */ static int -journal_mount(mp, fs, cred) - struct mount *mp; - struct fs *fs; - struct ucred *cred; +journal_mount(struct mount *mp, + struct fs *fs, + struct ucred *cred) { struct jblocks *jblocks; struct ufsmount *ump; @@ -3060,8 +2962,7 @@ journal_mount(mp, fs, cred) } static void -journal_unmount(ump) - struct ufsmount *ump; +journal_unmount(struct ufsmount *ump) { if (ump->softdep_jblocks) @@ -3075,8 +2976,7 @@ journal_unmount(ump) * store. */ static void -add_to_journal(wk) - struct worklist *wk; +add_to_journal(struct worklist *wk) { struct ufsmount *ump; @@ -3101,8 +3001,7 @@ add_to_journal(wk) * journal an old operation. */ static void -remove_from_journal(wk) - struct worklist *wk; +remove_from_journal(struct worklist *wk) { struct ufsmount *ump; @@ -3138,9 +3037,7 @@ remove_from_journal(wk) * Threshold is 0 for low and 1 for min. */ static int -journal_space(ump, thresh) - struct ufsmount *ump; - int thresh; +journal_space(struct ufsmount *ump, int thresh) { struct jblocks *jblocks; int limit, avail; @@ -3169,8 +3066,7 @@ journal_space(ump, thresh) } static void -journal_suspend(ump) - struct ufsmount *ump; +journal_suspend(struct ufsmount *ump) { struct jblocks *jblocks; struct mount *mp; @@ -3249,9 +3145,7 @@ journal_check_space(struct ufsmount *ump) * of 1MB we have 6553 records available. */ int -softdep_prealloc(vp, waitok) - struct vnode *vp; - int waitok; +softdep_prealloc(struct vnode *vp, int waitok) { struct ufsmount *ump; @@ -3298,9 +3192,7 @@ softdep_prealloc(vp, waitok) * helper for softdep_prerename(). */ static int -softdep_prerename_vnode(ump, vp) - struct ufsmount *ump; - struct vnode *vp; +softdep_prerename_vnode(struct ufsmount *ump, struct vnode *vp) { int error; @@ -3324,11 +3216,10 @@ softdep_prerename_vnode(ump, vp) * four vnodes. */ int -softdep_prerename(fdvp, fvp, tdvp, tvp) - struct vnode *fdvp; - struct vnode *fvp; - struct vnode *tdvp; - struct vnode *tvp; +softdep_prerename(struct vnode *fdvp, + struct vnode *fvp, + struct vnode *tdvp, + struct vnode *tvp) { struct ufsmount *ump; int error; @@ -3391,10 +3282,9 @@ softdep_prerename(fdvp, fvp, tdvp, tvp) * syscall must be restarted at top level from the lookup. */ int -softdep_prelink(dvp, vp, cnp) - struct vnode *dvp; - struct vnode *vp; - struct componentname *cnp; +softdep_prelink(struct vnode *dvp, + struct vnode *vp, + struct componentname *cnp) { struct ufsmount *ump; struct nameidata *ndp; @@ -3478,10 +3368,9 @@ softdep_prelink(dvp, vp, cnp) } static void -jseg_write(ump, jseg, data) - struct ufsmount *ump; - struct jseg *jseg; - uint8_t *data; +jseg_write(struct ufsmount *ump, + struct jseg *jseg, + uint8_t *data) { struct jsegrec *rec; @@ -3495,10 +3384,9 @@ jseg_write(ump, jseg, data) } static inline void -inoref_write(inoref, jseg, rec) - struct inoref *inoref; - struct jseg *jseg; - struct jrefrec *rec; +inoref_write(struct inoref *inoref, + struct jseg *jseg, + struct jrefrec *rec) { inoref->if_jsegdep->jd_seg = jseg; @@ -3510,10 +3398,9 @@ inoref_write(inoref, jseg, rec) } static void -jaddref_write(jaddref, jseg, data) - struct jaddref *jaddref; - struct jseg *jseg; - uint8_t *data; +jaddref_write(struct jaddref *jaddref, + struct jseg *jseg, + uint8_t *data) { struct jrefrec *rec; @@ -3523,10 +3410,9 @@ jaddref_write(jaddref, jseg, data) } static void -jremref_write(jremref, jseg, data) - struct jremref *jremref; - struct jseg *jseg; - uint8_t *data; +jremref_write(struct jremref *jremref, + struct jseg *jseg, + uint8_t *data) { struct jrefrec *rec; @@ -3536,10 +3422,9 @@ jremref_write(jremref, jseg, data) } static void -jmvref_write(jmvref, jseg, data) - struct jmvref *jmvref; - struct jseg *jseg; - uint8_t *data; +jmvref_write(struct jmvref *jmvref, + struct jseg *jseg, + uint8_t *data) { struct jmvrec *rec; @@ -3552,10 +3437,9 @@ jmvref_write(jmvref, jseg, data) } static void -jnewblk_write(jnewblk, jseg, data) - struct jnewblk *jnewblk; - struct jseg *jseg; - uint8_t *data; +jnewblk_write(struct jnewblk *jnewblk, + struct jseg *jseg, + uint8_t *data) { struct jblkrec *rec; @@ -3570,10 +3454,9 @@ jnewblk_write(jnewblk, jseg, data) } static void -jfreeblk_write(jfreeblk, jseg, data) - struct jfreeblk *jfreeblk; - struct jseg *jseg; - uint8_t *data; +jfreeblk_write(struct jfreeblk *jfreeblk, + struct jseg *jseg, + uint8_t *data) { struct jblkrec *rec; @@ -3588,10 +3471,9 @@ jfreeblk_write(jfreeblk, jseg, data) } static void -jfreefrag_write(jfreefrag, jseg, data) - struct jfreefrag *jfreefrag; - struct jseg *jseg; - uint8_t *data; +jfreefrag_write(struct jfreefrag *jfreefrag, + struct jseg *jseg, + uint8_t *data) { struct jblkrec *rec; @@ -3606,10 +3488,9 @@ jfreefrag_write(jfreefrag, jseg, data) } static void -jtrunc_write(jtrunc, jseg, data) - struct jtrunc *jtrunc; - struct jseg *jseg; - uint8_t *data; +jtrunc_write(struct jtrunc *jtrunc, + struct jseg *jseg, + uint8_t *data) { struct jtrncrec *rec; @@ -3622,10 +3503,9 @@ jtrunc_write(jtrunc, jseg, data) } static void -jfsync_write(jfsync, jseg, data) - struct jfsync *jfsync; - struct jseg *jseg; - uint8_t *data; +jfsync_write(struct jfsync *jfsync, + struct jseg *jseg, + uint8_t *data) { struct jtrncrec *rec; @@ -3637,8 +3517,7 @@ jfsync_write(jfsync, jseg, data) } static void -softdep_flushjournal(mp) - struct mount *mp; +softdep_flushjournal(struct mount *mp) { struct jblocks *jblocks; struct ufsmount *ump; @@ -3659,8 +3538,7 @@ static void softdep_synchronize_completed(struct bio *); static void softdep_synchronize(struct bio *, struct ufsmount *, void *); static void -softdep_synchronize_completed(bp) - struct bio *bp; +softdep_synchronize_completed(struct bio *bp) { struct jseg *oldest; struct jseg *jseg; @@ -3705,10 +3583,9 @@ softdep_synchronize_completed(bp) * written. This code handles both barriers simultaneously. */ static void -softdep_synchronize(bp, ump, caller1) - struct bio *bp; - struct ufsmount *ump; - void *caller1; +softdep_synchronize(struct bio *bp, + struct ufsmount *ump, + void *caller1) { bp->bio_cmd = BIO_FLUSH; @@ -3725,10 +3602,9 @@ softdep_synchronize(bp, ump, caller1) * Flush some journal records to disk. */ static void -softdep_process_journal(mp, needwk, flags) - struct mount *mp; - struct worklist *needwk; - int flags; +softdep_process_journal(struct mount *mp, + struct worklist *needwk, + int flags) { struct jblocks *jblocks; struct ufsmount *ump; @@ -3989,8 +3865,7 @@ softdep_process_journal(mp, needwk, flags) * structures so that the journal segment can be freed to reclaim space. */ static void -complete_jseg(jseg) - struct jseg *jseg; +complete_jseg(struct jseg *jseg) { struct worklist *wk; struct jmvref *jmvref; @@ -4052,8 +3927,7 @@ complete_jseg(jseg) * of journal entries. */ static void -complete_jsegs(jseg) - struct jseg *jseg; +complete_jsegs(struct jseg *jseg) { struct jblocks *jblocks; struct jseg *jsegn; @@ -4084,9 +3958,7 @@ complete_jsegs(jseg) * the final completions. */ static void -handle_written_jseg(jseg, bp) - struct jseg *jseg; - struct buf *bp; +handle_written_jseg(struct jseg *jseg, struct buf *bp) { if (jseg->js_refs == 0) @@ -4102,8 +3974,7 @@ handle_written_jseg(jseg, bp) } static inline struct jsegdep * -inoref_jseg(inoref) - struct inoref *inoref; +inoref_jseg(struct inoref *inoref) { struct jsegdep *jsegdep; @@ -4119,8 +3990,7 @@ inoref_jseg(inoref) * for the jremref to complete will be awoken by free_jremref. */ static void -handle_written_jremref(jremref) - struct jremref *jremref; +handle_written_jremref(struct jremref *jremref) { struct inodedep *inodedep; struct jsegdep *jsegdep; @@ -4157,8 +4027,7 @@ handle_written_jremref(jremref) * bmsafemap dependency and attempt to remove the jaddref from the bmsafemap. */ static void -handle_written_jaddref(jaddref) - struct jaddref *jaddref; +handle_written_jaddref(struct jaddref *jaddref) { struct jsegdep *jsegdep; struct inodedep *inodedep; @@ -4219,8 +4088,7 @@ handle_written_jaddref(jaddref) * completes. */ static void -handle_written_jnewblk(jnewblk) - struct jnewblk *jnewblk; +handle_written_jnewblk(struct jnewblk *jnewblk) { struct bmsafemap *bmsafemap; struct freefrag *freefrag; @@ -4283,8 +4151,7 @@ handle_written_jnewblk(jnewblk) * to the worklist. */ static void -cancel_jfreefrag(jfreefrag) - struct jfreefrag *jfreefrag; +cancel_jfreefrag(struct jfreefrag *jfreefrag) { struct freefrag *freefrag; @@ -4303,8 +4170,7 @@ cancel_jfreefrag(jfreefrag) * Free a jfreefrag when the parent freefrag is rendered obsolete. */ static void -free_jfreefrag(jfreefrag) - struct jfreefrag *jfreefrag; +free_jfreefrag(struct jfreefrag *jfreefrag) { if (jfreefrag->fr_state & INPROGRESS) @@ -4321,8 +4187,7 @@ free_jfreefrag(jfreefrag) * freefrag is added to the worklist if this completes its dependencies. */ static void -handle_written_jfreefrag(jfreefrag) - struct jfreefrag *jfreefrag; +handle_written_jfreefrag(struct jfreefrag *jfreefrag) { struct jsegdep *jsegdep; struct freefrag *freefrag; @@ -4349,8 +4214,7 @@ handle_written_jfreefrag(jfreefrag) * have been reclaimed. */ static void -handle_written_jblkdep(jblkdep) - struct jblkdep *jblkdep; +handle_written_jblkdep(struct jblkdep *jblkdep) { struct freeblks *freeblks; struct jsegdep *jsegdep; @@ -4384,11 +4248,10 @@ newjsegdep(struct worklist *wk) } static struct jmvref * -newjmvref(dp, ino, oldoff, newoff) - struct inode *dp; - ino_t ino; - off_t oldoff; - off_t newoff; +newjmvref(struct inode *dp, + ino_t ino, + off_t oldoff, + off_t newoff) { struct jmvref *jmvref; @@ -4414,8 +4277,11 @@ newjmvref(dp, ino, oldoff, newoff) * the jsegdep when we're done. */ static struct jremref * -newjremref(struct dirrem *dirrem, struct inode *dp, struct inode *ip, - off_t diroff, nlink_t nlink) +newjremref(struct dirrem *dirrem, + struct inode *dp, + struct inode *ip, + off_t diroff, + nlink_t nlink) { struct jremref *jremref; @@ -4430,8 +4296,12 @@ newjremref(struct dirrem *dirrem, struct inode *dp, struct inode *ip, } static inline void -newinoref(struct inoref *inoref, ino_t ino, ino_t parent, off_t diroff, - nlink_t nlink, uint16_t mode) +newinoref(struct inoref *inoref, + ino_t ino, + ino_t parent, + off_t diroff, + nlink_t nlink, + uint16_t mode) { inoref->if_jsegdep = newjsegdep(&inoref->if_list); @@ -4450,8 +4320,11 @@ newinoref(struct inoref *inoref, ino_t ino, ino_t parent, off_t diroff, * to have the correct FMT. */ static struct jaddref * -newjaddref(struct inode *dp, ino_t ino, off_t diroff, int16_t nlink, - uint16_t mode) +newjaddref(struct inode *dp, + ino_t ino, + off_t diroff, + int16_t nlink, + uint16_t mode) { struct jaddref *jaddref; @@ -4487,8 +4360,7 @@ newfreedep(struct freework *freework) * this is the last reference to the freework schedule it for completion. */ static void -free_freedep(freedep) - struct freedep *freedep; +free_freedep(struct freedep *freedep) { struct freework *freework; @@ -4506,15 +4378,14 @@ free_freedep(freedep) * and before the freeblks is visible outside of softdep_setup_freeblocks(). */ static struct freework * -newfreework(ump, freeblks, parent, lbn, nb, frags, off, journal) - struct ufsmount *ump; - struct freeblks *freeblks; - struct freework *parent; - ufs_lbn_t lbn; - ufs2_daddr_t nb; - int frags; - int off; - int journal; +newfreework(struct ufsmount *ump, + struct freeblks *freeblks, + struct freework *parent, + ufs_lbn_t lbn, + ufs2_daddr_t nb, + int frags, + int off, + int journal) { struct freework *freework; @@ -4547,9 +4418,7 @@ newfreework(ump, freeblks, parent, lbn, nb, frags, off, journal) * Eliminate a jfreeblk for a block that does not need journaling. */ static void -cancel_jfreeblk(freeblks, blkno) - struct freeblks *freeblks; - ufs2_daddr_t blkno; +cancel_jfreeblk(struct freeblks *freeblks, ufs2_daddr_t blkno) { struct jfreeblk *jfreeblk; struct jblkdep *jblkdep; @@ -4575,11 +4444,10 @@ cancel_jfreeblk(freeblks, blkno) * lock is held. */ static struct jfreeblk * -newjfreeblk(freeblks, lbn, blkno, frags) - struct freeblks *freeblks; - ufs_lbn_t lbn; - ufs2_daddr_t blkno; - int frags; +newjfreeblk(struct freeblks *freeblks, + ufs_lbn_t lbn, + ufs2_daddr_t blkno, + int frags) { struct jfreeblk *jfreeblk; @@ -4609,9 +4477,7 @@ newjfreeblk(freeblks, lbn, blkno, frags) * FREEBLK ino=5, blkno=8, lbn=0, frags=2, oldfrags=6 */ static void -adjust_newfreework(freeblks, frag_offset) - struct freeblks *freeblks; - int frag_offset; +adjust_newfreework(struct freeblks *freeblks, int frag_offset) { struct jfreeblk *jfreeblk; @@ -4628,10 +4494,9 @@ adjust_newfreework(freeblks, frag_offset) * Allocate a new jtrunc to track a partial truncation. */ static struct jtrunc * -newjtrunc(freeblks, size, extsize) - struct freeblks *freeblks; - off_t size; - int extsize; +newjtrunc(struct freeblks *freeblks, + off_t size, + int extsize) { struct jtrunc *jtrunc; @@ -4654,9 +4519,7 @@ newjtrunc(freeblks, size, extsize) * with another structure. */ static void -move_newblock_dep(jaddref, inodedep) - struct jaddref *jaddref; - struct inodedep *inodedep; +move_newblock_dep(struct jaddref *jaddref, struct inodedep *inodedep) { struct inoref *inoref; struct jaddref *jaddrefn; @@ -4694,10 +4557,9 @@ move_newblock_dep(jaddref, inodedep) * 0 otherwise. */ static int -cancel_jaddref(jaddref, inodedep, wkhd) - struct jaddref *jaddref; - struct inodedep *inodedep; - struct workhead *wkhd; +cancel_jaddref(struct jaddref *jaddref, + struct inodedep *inodedep, + struct workhead *wkhd) { struct inoref *inoref; struct jsegdep *jsegdep; @@ -4772,8 +4634,7 @@ cancel_jaddref(jaddref, inodedep, wkhd) * been notified. */ static void -free_jaddref(jaddref) - struct jaddref *jaddref; +free_jaddref(struct jaddref *jaddref) { if ((jaddref->ja_state & ALLCOMPLETE) != ALLCOMPLETE) @@ -4795,8 +4656,7 @@ free_jaddref(jaddref) * Free a jremref structure once it has been written or discarded. */ static void -free_jremref(jremref) - struct jremref *jremref; +free_jremref(struct jremref *jremref) { if (jremref->jr_ref.if_jsegdep) @@ -4810,8 +4670,7 @@ free_jremref(jremref) * Free a jnewblk structure. */ static void -free_jnewblk(jnewblk) - struct jnewblk *jnewblk; +free_jnewblk(struct jnewblk *jnewblk) { if ((jnewblk->jn_state & ALLCOMPLETE) != ALLCOMPLETE) @@ -4826,9 +4685,7 @@ free_jnewblk(jnewblk) * Cancel a jnewblk which has been been made redundant by frag extension. */ static void -cancel_jnewblk(jnewblk, wkhd) - struct jnewblk *jnewblk; - struct workhead *wkhd; +cancel_jnewblk(struct jnewblk *jnewblk, struct workhead *wkhd) { struct jsegdep *jsegdep; @@ -4852,8 +4709,7 @@ cancel_jnewblk(jnewblk, wkhd) } static void -free_jblkdep(jblkdep) - struct jblkdep *jblkdep; +free_jblkdep(struct jblkdep *jblkdep) { if (jblkdep->jb_list.wk_type == D_JFREEBLK) @@ -4871,9 +4727,7 @@ free_jblkdep(jblkdep) * to disappear. */ static void -free_jseg(jseg, jblocks) - struct jseg *jseg; - struct jblocks *jblocks; +free_jseg(struct jseg *jseg, struct jblocks *jblocks) { struct freework *freework; @@ -4897,8 +4751,7 @@ free_jseg(jseg, jblocks) * oldestseg. */ static void -free_jsegs(jblocks) - struct jblocks *jblocks; +free_jsegs(struct jblocks *jblocks) { struct jseg *jseg; @@ -4953,8 +4806,7 @@ free_jsegs(jblocks) * should eventually reclaim journal space as well. */ static void -rele_jseg(jseg) - struct jseg *jseg; +rele_jseg(struct jseg *jseg) { KASSERT(jseg->js_refs > 0, @@ -4968,8 +4820,7 @@ rele_jseg(jseg) * Release a jsegdep and decrement the jseg count. */ static void -free_jsegdep(jsegdep) - struct jsegdep *jsegdep; +free_jsegdep(struct jsegdep *jsegdep) { if (jsegdep->jd_seg) @@ -4982,9 +4833,7 @@ free_jsegdep(jsegdep) * if required. */ static int -jwait(wk, waitfor) - struct worklist *wk; - int waitfor; +jwait(struct worklist *wk, int waitfor) { LOCK_OWNED(VFSTOUFS(wk->wk_mp)); @@ -5037,8 +4886,7 @@ jwait(wk, waitfor) * for the setup and revert functions below. */ static struct inodedep * -inodedep_lookup_ip(ip) - struct inode *ip; +inodedep_lookup_ip(struct inode *ip) { struct inodedep *inodedep; @@ -5059,9 +4907,7 @@ inodedep_lookup_ip(ip) * nlinkdelta. */ void -softdep_setup_create(dp, ip) - struct inode *dp; - struct inode *ip; +softdep_setup_create(struct inode *dp, struct inode *ip) { struct inodedep *inodedep; struct jaddref *jaddref __diagused; @@ -5090,9 +4936,7 @@ softdep_setup_create(dp, ip) * non-journaling softdep. */ void -softdep_setup_dotdot_link(dp, ip) - struct inode *dp; - struct inode *ip; +softdep_setup_dotdot_link(struct inode *dp, struct inode *ip) { struct inodedep *inodedep; struct jaddref *jaddref; @@ -5124,9 +4968,7 @@ softdep_setup_dotdot_link(dp, ip) * softdep. */ void -softdep_setup_link(dp, ip) - struct inode *dp; - struct inode *ip; +softdep_setup_link(struct inode *dp, struct inode *ip) { struct inodedep *inodedep; struct jaddref *jaddref; @@ -5154,9 +4996,7 @@ softdep_setup_link(dp, ip) * nlinkdelta for non-journaling softdep. */ void -softdep_setup_mkdir(dp, ip) - struct inode *dp; - struct inode *ip; +softdep_setup_mkdir(struct inode *dp, struct inode *ip) { struct inodedep *inodedep; struct jaddref *dotdotaddref; @@ -5201,9 +5041,7 @@ softdep_setup_mkdir(dp, ip) * unlinking a directory. */ void -softdep_setup_rmdir(dp, ip) - struct inode *dp; - struct inode *ip; +softdep_setup_rmdir(struct inode *dp, struct inode *ip) { KASSERT(MOUNTEDSOFTDEP(ITOVFS(dp)) != 0, @@ -5219,9 +5057,7 @@ softdep_setup_rmdir(dp, ip) * unlink. */ void -softdep_setup_unlink(dp, ip) - struct inode *dp; - struct inode *ip; +softdep_setup_unlink(struct inode *dp, struct inode *ip) { KASSERT(MOUNTEDSOFTDEP(ITOVFS(dp)) != 0, @@ -5237,9 +5073,7 @@ softdep_setup_unlink(dp, ip) * creation. Adjusts nlinkdelta for non-journaling softdep. */ void -softdep_revert_create(dp, ip) - struct inode *dp; - struct inode *ip; +softdep_revert_create(struct inode *dp, struct inode *ip) { struct inodedep *inodedep; struct jaddref *jaddref; @@ -5265,9 +5099,7 @@ softdep_revert_create(dp, ip) * addition. Adjusts nlinkdelta for non-journaling softdep. */ void -softdep_revert_link(dp, ip) - struct inode *dp; - struct inode *ip; +softdep_revert_link(struct inode *dp, struct inode *ip) { struct inodedep *inodedep; struct jaddref *jaddref; @@ -5293,9 +5125,7 @@ softdep_revert_link(dp, ip) * attempt. Adjusts nlinkdelta for non-journaling softdep. */ void -softdep_revert_mkdir(dp, ip) - struct inode *dp; - struct inode *ip; +softdep_revert_mkdir(struct inode *dp, struct inode *ip) { struct inodedep *inodedep; struct jaddref *jaddref; @@ -5335,9 +5165,7 @@ softdep_revert_mkdir(dp, ip) * Called to correct nlinkdelta after a failed rmdir. */ void -softdep_revert_rmdir(dp, ip) - struct inode *dp; - struct inode *ip; +softdep_revert_rmdir(struct inode *dp, struct inode *ip) { KASSERT(MOUNTEDSOFTDEP(ITOVFS(dp)) != 0, @@ -5384,11 +5212,11 @@ softdep_revert_rmdir(dp, ip) * Called just after updating the cylinder group block to allocate an inode. */ void -softdep_setup_inomapdep(bp, ip, newinum, mode) - struct buf *bp; /* buffer for cylgroup block with inode map */ - struct inode *ip; /* inode related to allocation */ - ino_t newinum; /* new inode number being allocated */ - int mode; +softdep_setup_inomapdep( + struct buf *bp, /* buffer for cylgroup block with inode map */ + struct inode *ip, /* inode related to allocation */ + ino_t newinum, /* new inode number being allocated */ + int mode) { struct inodedep *inodedep; struct bmsafemap *bmsafemap; @@ -5454,12 +5282,12 @@ softdep_setup_inomapdep(bp, ip, newinum, mode) * allocate block or fragment. */ void -softdep_setup_blkmapdep(bp, mp, newblkno, frags, oldfrags) - struct buf *bp; /* buffer for cylgroup block with block map */ - struct mount *mp; /* filesystem doing allocation */ - ufs2_daddr_t newblkno; /* number of newly allocated block */ - int frags; /* Number of fragments. */ - int oldfrags; /* Previous number of fragments for extend. */ +softdep_setup_blkmapdep( + struct buf *bp, /* buffer for cylgroup block with block map */ + struct mount *mp, /* filesystem doing allocation */ + ufs2_daddr_t newblkno, /* number of newly allocated block */ + int frags, /* Number of fragments. */ + int oldfrags) /* Previous number of fragments for extend. */ { struct newblk *newblk; struct bmsafemap *bmsafemap; @@ -5534,10 +5362,10 @@ softdep_setup_blkmapdep(bp, mp, newblkno, frags, oldfrags) (&(ump)->bmsafemap_hashtbl[(cg) & (ump)->bmsafemap_hash_size]) static int -bmsafemap_find(bmsafemaphd, cg, bmsafemapp) - struct bmsafemap_hashhead *bmsafemaphd; - int cg; - struct bmsafemap **bmsafemapp; +bmsafemap_find( + struct bmsafemap_hashhead *bmsafemaphd, + int cg, + struct bmsafemap **bmsafemapp) { struct bmsafemap *bmsafemap; @@ -5562,11 +5390,10 @@ bmsafemap_find(bmsafemaphd, cg, bmsafemapp) * provided. If it is provided but not needed, it is freed. */ static struct bmsafemap * -bmsafemap_lookup(mp, bp, cg, newbmsafemap) - struct mount *mp; - struct buf *bp; - int cg; - struct bmsafemap *newbmsafemap; +bmsafemap_lookup(struct mount *mp, + struct buf *bp, + int cg, + struct bmsafemap *newbmsafemap) { struct bmsafemap_hashhead *bmsafemaphd; struct bmsafemap *bmsafemap, *collision; @@ -5648,14 +5475,14 @@ bmsafemap_lookup(mp, bp, cg, newbmsafemap) * unreferenced fragments. */ void -softdep_setup_allocdirect(ip, off, newblkno, oldblkno, newsize, oldsize, bp) - struct inode *ip; /* inode to which block is being added */ - ufs_lbn_t off; /* block pointer within inode */ - ufs2_daddr_t newblkno; /* disk block number being added */ - ufs2_daddr_t oldblkno; /* previous block number, 0 unless frag */ - long newsize; /* size of new block */ - long oldsize; /* size of new block */ - struct buf *bp; /* bp for allocated block */ +softdep_setup_allocdirect( + struct inode *ip, /* inode to which block is being added */ + ufs_lbn_t off, /* block pointer within inode */ + ufs2_daddr_t newblkno, /* disk block number being added */ + ufs2_daddr_t oldblkno, /* previous block number, 0 unless frag */ + long newsize, /* size of new block */ + long oldsize, /* size of new block */ + struct buf *bp) /* bp for allocated block */ { struct allocdirect *adp, *oldadp; struct allocdirectlst *adphead; @@ -5793,10 +5620,9 @@ softdep_setup_allocdirect(ip, off, newblkno, oldblkno, newsize, oldsize, bp) * the segment for the newer record will suffice. */ static struct worklist * -jnewblk_merge(new, old, wkhd) - struct worklist *new; - struct worklist *old; - struct workhead *wkhd; +jnewblk_merge(struct worklist *new, + struct worklist *old, + struct workhead *wkhd) { struct jnewblk *njnewblk; struct jnewblk *jnewblk; @@ -5851,10 +5677,10 @@ jnewblk_merge(new, old, wkhd) * Replace an old allocdirect dependency with a newer one. */ static void -allocdirect_merge(adphead, newadp, oldadp) - struct allocdirectlst *adphead; /* head of list holding allocdirects */ - struct allocdirect *newadp; /* allocdirect being added */ - struct allocdirect *oldadp; /* existing allocdirect being checked */ +allocdirect_merge( + struct allocdirectlst *adphead, /* head of list holding allocdirects */ + struct allocdirect *newadp, /* allocdirect being added */ + struct allocdirect *oldadp) /* existing allocdirect being checked */ { struct worklist *wk; struct freefrag *freefrag; @@ -5934,12 +5760,11 @@ allocdirect_merge(adphead, newadp, oldadp) * Allocate a jfreefrag structure to journal a single block free. */ static struct jfreefrag * -newjfreefrag(freefrag, ip, blkno, size, lbn) - struct freefrag *freefrag; - struct inode *ip; - ufs2_daddr_t blkno; - long size; - ufs_lbn_t lbn; +newjfreefrag(struct freefrag *freefrag, + struct inode *ip, + ufs2_daddr_t blkno, + long size, + ufs_lbn_t lbn) { struct jfreefrag *jfreefrag; struct fs *fs; @@ -5963,12 +5788,11 @@ newjfreefrag(freefrag, ip, blkno, size, lbn) * Allocate a new freefrag structure. */ static struct freefrag * -newfreefrag(ip, blkno, size, lbn, key) - struct inode *ip; - ufs2_daddr_t blkno; - long size; - ufs_lbn_t lbn; - u_long key; +newfreefrag(struct inode *ip, + ufs2_daddr_t blkno, + long size, + ufs_lbn_t lbn, + u_long key) { struct freefrag *freefrag; struct ufsmount *ump; @@ -6007,8 +5831,7 @@ newfreefrag(ip, blkno, size, lbn, key) * file block allocation. */ static void -handle_workitem_freefrag(freefrag) - struct freefrag *freefrag; +handle_workitem_freefrag(struct freefrag *freefrag) { struct ufsmount *ump = VFSTOUFS(freefrag->ff_list.wk_mp); struct workhead wkhd; @@ -6048,14 +5871,14 @@ handle_workitem_freefrag(freefrag) * See the description of softdep_setup_allocdirect above for details. */ void -softdep_setup_allocext(ip, off, newblkno, oldblkno, newsize, oldsize, bp) - struct inode *ip; - ufs_lbn_t off; - ufs2_daddr_t newblkno; - ufs2_daddr_t oldblkno; - long newsize; - long oldsize; - struct buf *bp; +softdep_setup_allocext( + struct inode *ip, + ufs_lbn_t off, + ufs2_daddr_t newblkno, + ufs2_daddr_t oldblkno, + long newsize, + long oldsize, + struct buf *bp) { struct allocdirect *adp, *oldadp; struct allocdirectlst *adphead; @@ -6191,12 +6014,12 @@ softdep_setup_allocext(ip, off, newblkno, oldblkno, newsize, oldsize, bp) * Allocate a new allocindir structure. */ static struct allocindir * -newallocindir(ip, ptrno, newblkno, oldblkno, lbn) - struct inode *ip; /* inode for file being extended */ - int ptrno; /* offset of pointer in indirect block */ - ufs2_daddr_t newblkno; /* disk block number being added */ - ufs2_daddr_t oldblkno; /* previous block number, 0 if none */ - ufs_lbn_t lbn; +newallocindir( + struct inode *ip, /* inode for file being extended */ + int ptrno, /* offset of pointer in indirect block */ + ufs2_daddr_t newblkno, /* disk block number being added */ + ufs2_daddr_t oldblkno, /* previous block number, 0 if none */ + ufs_lbn_t lbn) { struct newblk *newblk; struct allocindir *aip; @@ -6235,14 +6058,14 @@ newallocindir(ip, ptrno, newblkno, oldblkno, lbn) * to a newly allocated file page. */ void -softdep_setup_allocindir_page(ip, lbn, bp, ptrno, newblkno, oldblkno, nbp) - struct inode *ip; /* inode for file being extended */ - ufs_lbn_t lbn; /* allocated block number within file */ - struct buf *bp; /* buffer with indirect blk referencing page */ - int ptrno; /* offset of pointer in indirect block */ - ufs2_daddr_t newblkno; /* disk block number being added */ - ufs2_daddr_t oldblkno; /* previous block number, 0 if none */ - struct buf *nbp; /* buffer holding allocated page */ +softdep_setup_allocindir_page( + struct inode *ip, /* inode for file being extended */ + ufs_lbn_t lbn, /* allocated block number within file */ + struct buf *bp, /* buffer with indirect blk referencing page */ + int ptrno, /* offset of pointer in indirect block */ + ufs2_daddr_t newblkno, /* disk block number being added */ + ufs2_daddr_t oldblkno, /* previous block number, 0 if none */ + struct buf *nbp) /* buffer holding allocated page */ { struct inodedep *inodedep; struct freefrag *freefrag; @@ -6283,12 +6106,12 @@ softdep_setup_allocindir_page(ip, lbn, bp, ptrno, newblkno, oldblkno, nbp) * newly allocated indirect block. */ void -softdep_setup_allocindir_meta(nbp, ip, bp, ptrno, newblkno) - struct buf *nbp; /* newly allocated indirect block */ - struct inode *ip; /* inode for file being extended */ - struct buf *bp; /* indirect block referencing allocated block */ - int ptrno; /* offset of pointer in indirect block */ - ufs2_daddr_t newblkno; /* disk block number being added */ +softdep_setup_allocindir_meta( + struct buf *nbp, /* newly allocated indirect block */ + struct inode *ip, /* inode for file being extended */ + struct buf *bp, /* indirect block referencing allocated block */ + int ptrno, /* offset of pointer in indirect block */ + ufs2_daddr_t newblkno) /* disk block number being added */ { struct inodedep *inodedep; struct allocindir *aip; @@ -6312,8 +6135,7 @@ softdep_setup_allocindir_meta(nbp, ip, bp, ptrno, newblkno) } static void -indirdep_complete(indirdep) - struct indirdep *indirdep; +indirdep_complete(struct indirdep *indirdep) { struct allocindir *aip; @@ -6334,10 +6156,9 @@ indirdep_complete(indirdep) } static struct indirdep * -indirdep_lookup(mp, ip, bp) - struct mount *mp; - struct inode *ip; - struct buf *bp; +indirdep_lookup(struct mount *mp, + struct inode *ip, + struct buf *bp) { struct indirdep *indirdep, *newindirdep; struct newblk *newblk; @@ -6413,12 +6234,12 @@ indirdep_lookup(mp, ip, bp) * by one of the two routines above. */ static struct freefrag * -setup_allocindir_phase2(bp, ip, inodedep, aip, lbn) - struct buf *bp; /* in-memory copy of the indirect block */ - struct inode *ip; /* inode for file being extended */ - struct inodedep *inodedep; /* Inodedep for ip */ - struct allocindir *aip; /* allocindir allocated by the above routines */ - ufs_lbn_t lbn; /* Logical block number for this block. */ +setup_allocindir_phase2( + struct buf *bp, /* in-memory copy of the indirect block */ + struct inode *ip, /* inode for file being extended */ + struct inodedep *inodedep, /* Inodedep for ip */ + struct allocindir *aip, /* allocindir allocated by the above routines */ + ufs_lbn_t lbn) /* Logical block number for this block. */ { struct fs *fs __diagused; struct indirdep *indirdep; @@ -6469,9 +6290,9 @@ setup_allocindir_phase2(bp, ip, inodedep, aip, lbn) * dependencies and setup the freefrags appropriately. */ static struct freefrag * -allocindir_merge(aip, oldaip) - struct allocindir *aip; - struct allocindir *oldaip; +allocindir_merge( + struct allocindir *aip, + struct allocindir *oldaip) { struct freefrag *freefrag; struct worklist *wk; @@ -6509,11 +6330,11 @@ allocindir_merge(aip, oldaip) } static inline void -setup_freedirect(freeblks, ip, i, needj) - struct freeblks *freeblks; - struct inode *ip; - int i; - int needj; +setup_freedirect( + struct freeblks *freeblks, + struct inode *ip, + int i, + int needj) { struct ufsmount *ump; ufs2_daddr_t blkno; @@ -6530,11 +6351,11 @@ setup_freedirect(freeblks, ip, i, needj) } static inline void -setup_freeext(freeblks, ip, i, needj) - struct freeblks *freeblks; - struct inode *ip; - int i; - int needj; +setup_freeext( + struct freeblks *freeblks, + struct inode *ip, + int i, + int needj) { struct ufsmount *ump; ufs2_daddr_t blkno; @@ -6551,12 +6372,12 @@ setup_freeext(freeblks, ip, i, needj) } static inline void -setup_freeindir(freeblks, ip, i, lbn, needj) - struct freeblks *freeblks; - struct inode *ip; - int i; - ufs_lbn_t lbn; - int needj; +setup_freeindir( + struct freeblks *freeblks, + struct inode *ip, + int i, + ufs_lbn_t lbn, + int needj) { struct ufsmount *ump; ufs2_daddr_t blkno; @@ -6571,9 +6392,7 @@ setup_freeindir(freeblks, ip, i, lbn, needj) } static inline struct freeblks * -newfreeblks(mp, ip) - struct mount *mp; - struct inode *ip; +newfreeblks(struct mount *mp, struct inode *ip) { struct freeblks *freeblks; @@ -6597,11 +6416,11 @@ newfreeblks(mp, ip) } static void -trunc_indirdep(indirdep, freeblks, bp, off) - struct indirdep *indirdep; - struct freeblks *freeblks; - struct buf *bp; - int off; +trunc_indirdep( + struct indirdep *indirdep, + struct freeblks *freeblks, + struct buf *bp, + int off) { struct allocindir *aip, *aipn; @@ -6632,12 +6451,12 @@ trunc_indirdep(indirdep, freeblks, bp, off) * truncation. A second step will handle the truncated dependencies. */ static int -setup_trunc_indir(freeblks, ip, lbn, lastlbn, blkno) - struct freeblks *freeblks; - struct inode *ip; - ufs_lbn_t lbn; - ufs_lbn_t lastlbn; - ufs2_daddr_t blkno; +setup_trunc_indir( + struct freeblks *freeblks, + struct inode *ip, + ufs_lbn_t lbn, + ufs_lbn_t lastlbn, + ufs2_daddr_t blkno) { struct indirdep *indirdep; struct indirdep *indirn; @@ -6739,8 +6558,7 @@ setup_trunc_indir(freeblks, ip, lbn, lastlbn, blkno) * copy and writes them to disk before the freeblks is allowed to complete. */ static void -complete_trunc_indir(freework) - struct freework *freework; +complete_trunc_indir(struct freework *freework) { struct freework *fwn; struct indirdep *indirdep; @@ -6835,10 +6653,9 @@ complete_trunc_indir(freework) * is the current total and length is the new file size. */ static ufs2_daddr_t -blkcount(fs, datablocks, length) - struct fs *fs; - ufs2_daddr_t datablocks; - off_t length; +blkcount(struct fs *fs, + ufs2_daddr_t datablocks, + off_t length) { off_t totblks, numblks; @@ -6911,11 +6728,11 @@ blkcount(fs, datablocks, length) * serialized in indir_trunc(). */ void -softdep_journal_freeblocks(ip, cred, length, flags) - struct inode *ip; /* The inode whose length is to be reduced */ - struct ucred *cred; - off_t length; /* The new length for the file */ - int flags; /* IO_EXT and/or IO_NORMAL */ +softdep_journal_freeblocks( + struct inode *ip, /* The inode whose length is to be reduced */ + struct ucred *cred, + off_t length, /* The new length for the file */ + int flags) /* IO_EXT and/or IO_NORMAL */ { struct freeblks *freeblks, *fbn; struct worklist *wk, *wkn; @@ -7205,8 +7022,7 @@ softdep_journal_freeblocks(ip, cred, length, flags) * Flush a JOP_SYNC to the journal. */ void -softdep_journal_fsync(ip) - struct inode *ip; +softdep_journal_fsync(struct inode *ip) { struct jfsync *jfsync; struct ufsmount *ump; @@ -7257,10 +7073,10 @@ softdep_journal_fsync(ip) * can release it. */ void -softdep_setup_freeblocks(ip, length, flags) - struct inode *ip; /* The inode whose length is to be reduced */ - off_t length; /* The new length for the file */ - int flags; /* IO_EXT and/or IO_NORMAL */ +softdep_setup_freeblocks( + struct inode *ip, /* The inode whose length is to be reduced */ + off_t length, /* The new length for the file */ + int flags) /* IO_EXT and/or IO_NORMAL */ { struct ufs1_dinode *dp1; struct ufs2_dinode *dp2; @@ -7411,11 +7227,11 @@ softdep_setup_freeblocks(ip, length, flags) * from hanging around in the page cache. */ static void -trunc_pages(ip, length, extblocks, flags) - struct inode *ip; - off_t length; - ufs2_daddr_t extblocks; - int flags; +trunc_pages( + struct inode *ip, + off_t length, + ufs2_daddr_t extblocks, + int flags) { struct vnode *vp; struct fs *fs; @@ -7459,12 +7275,12 @@ trunc_pages(ip, length, extblocks, flags) * See if the buf bp is in the range eliminated by truncation. */ static int -trunc_check_buf(bp, blkoffp, lastlbn, lastoff, flags) - struct buf *bp; - int *blkoffp; - ufs_lbn_t lastlbn; - int lastoff; - int flags; +trunc_check_buf( + struct buf *bp, + int *blkoffp, + ufs_lbn_t lastlbn, + int lastoff, + int flags) { ufs_lbn_t lbn; @@ -7502,12 +7318,12 @@ trunc_check_buf(bp, blkoffp, lastlbn, lastoff, flags) * Eliminate any dependencies that exist in memory beyond lblkno:off */ static void -trunc_dependencies(ip, freeblks, lastlbn, lastoff, flags) - struct inode *ip; - struct freeblks *freeblks; - ufs_lbn_t lastlbn; - int lastoff; - int flags; +trunc_dependencies( + struct inode *ip, + struct freeblks *freeblks, + ufs_lbn_t lastlbn, + int lastoff, + int flags) { struct bufobj *bo; struct vnode *vp; @@ -7583,10 +7399,10 @@ trunc_dependencies(ip, freeblks, lastlbn, lastoff, flags) } static int -cancel_pagedep(pagedep, freeblks, blkoff) - struct pagedep *pagedep; - struct freeblks *freeblks; - int blkoff; +cancel_pagedep( + struct pagedep *pagedep, + struct freeblks *freeblks, + int blkoff) { struct jremref *jremref; struct jmvref *jmvref; @@ -7665,10 +7481,10 @@ cancel_pagedep(pagedep, freeblks, blkoff) * associated with related dependencies do not occur. */ static int -deallocate_dependencies(bp, freeblks, off) - struct buf *bp; - struct freeblks *freeblks; - int off; +deallocate_dependencies( + struct buf *bp, + struct freeblks *freeblks, + int off) { struct indirdep *indirdep; struct pagedep *pagedep; @@ -7750,10 +7566,10 @@ deallocate_dependencies(bp, freeblks, off) * space is no longer pointed to by the inode or in the bitmap. */ static void -cancel_allocdirect(adphead, adp, freeblks) - struct allocdirectlst *adphead; - struct allocdirect *adp; - struct freeblks *freeblks; +cancel_allocdirect( + struct allocdirectlst *adphead, + struct allocdirect *adp, + struct freeblks *freeblks) { struct freework *freework; struct newblk *newblk; @@ -7801,10 +7617,10 @@ cancel_allocdirect(adphead, adp, freeblks) * at on disk and will never be found once this block is released. */ static struct jnewblk * -cancel_newblk(newblk, wk, wkhd) - struct newblk *newblk; - struct worklist *wk; - struct workhead *wkhd; +cancel_newblk( + struct newblk *newblk, + struct worklist *wk, + struct workhead *wkhd) { struct jnewblk *jnewblk; @@ -7855,8 +7671,7 @@ cancel_newblk(newblk, wk, wkhd) * the pointers are written and the previous block is no longer needed. */ static void -newblk_freefrag(newblk) - struct newblk *newblk; +newblk_freefrag(struct newblk *newblk) { struct freefrag *freefrag; @@ -7875,8 +7690,7 @@ newblk_freefrag(newblk) * are valid or fully removed via truncate or frag extension. */ static void -free_newblk(newblk) - struct newblk *newblk; +free_newblk(struct newblk *newblk) { struct indirdep *indirdep; struct worklist *wk; @@ -7906,8 +7720,7 @@ free_newblk(newblk) * Free a newdirblk. Clear the NEWBLOCK flag on its associated pagedep. */ static void -free_newdirblk(newdirblk) - struct newdirblk *newdirblk; +free_newdirblk(struct newdirblk *newdirblk) { struct pagedep *pagedep; struct diradd *dap; @@ -7948,10 +7761,10 @@ free_newdirblk(newdirblk) * done until the zero'ed inode has been written to disk. */ void -softdep_freefile(pvp, ino, mode) - struct vnode *pvp; - ino_t ino; - int mode; +softdep_freefile( + struct vnode *pvp, + ino_t ino, + int mode) { struct inode *ip = VTOI(pvp); struct inodedep *inodedep; @@ -8046,8 +7859,7 @@ softdep_freefile(pvp, ino, mode) * dependencies from the inode so that it can be freed immediately. */ static int -check_inode_unwritten(inodedep) - struct inodedep *inodedep; +check_inode_unwritten(struct inodedep *inodedep) { LOCK_OWNED(VFSTOUFS(inodedep->id_list.wk_mp)); @@ -8091,8 +7903,7 @@ check_inode_unwritten(inodedep) } static int -check_inodedep_free(inodedep) - struct inodedep *inodedep; +check_inodedep_free(struct inodedep *inodedep) { LOCK_OWNED(VFSTOUFS(inodedep->id_list.wk_mp)); @@ -8118,8 +7929,7 @@ check_inodedep_free(inodedep) * Try to free an inodedep structure. Return 1 if it could be freed. */ static int -free_inodedep(inodedep) - struct inodedep *inodedep; +free_inodedep(struct inodedep *inodedep) { LOCK_OWNED(VFSTOUFS(inodedep->id_list.wk_mp)); @@ -8141,9 +7951,7 @@ free_inodedep(inodedep) * in memory immediately. */ static void -freework_freeblock(freework, key) - struct freework *freework; - u_long key; +freework_freeblock(struct freework *freework, u_long key) { struct freeblks *freeblks; struct jnewblk *jnewblk; @@ -8216,8 +8024,7 @@ freework_freeblock(freework, key) * required to flush a truncation in process_truncates(). */ static void -freework_enqueue(freework) - struct freework *freework; +freework_enqueue(struct freework *freework) { struct freeblks *freeblks; @@ -8238,8 +8045,7 @@ freework_enqueue(freework) * dependencies. */ static void -handle_workitem_indirblk(freework) - struct freework *freework; +handle_workitem_indirblk(struct freework *freework) { struct freeblks *freeblks; struct ufsmount *ump; @@ -8269,8 +8075,7 @@ handle_workitem_indirblk(freework) * the freeblks is added back to the worklist if there is more work to do. */ static void -handle_written_freework(freework) - struct freework *freework; +handle_written_freework(struct freework *freework) { struct freeblks *freeblks; struct freework *parent; @@ -8303,9 +8108,7 @@ handle_written_freework(freework) * performed in this function. */ static int -handle_workitem_freeblocks(freeblks, flags) - struct freeblks *freeblks; - int flags; +handle_workitem_freeblocks(struct freeblks *freeblks, int flags) { struct freework *freework; struct newblk *newblk; @@ -8381,10 +8184,9 @@ handle_workitem_freeblocks(freeblks, flags) * on free was incorrect. */ static void -freeblks_free(ump, freeblks, blocks) - struct ufsmount *ump; - struct freeblks *freeblks; - int blocks; +freeblks_free(struct ufsmount *ump, + struct freeblks *freeblks, + int blocks) { struct fs *fs; ufs2_daddr_t remain; @@ -8407,9 +8209,7 @@ freeblks_free(ump, freeblks, blocks) * can not be called until all other dependencies are stable on disk. */ static int -handle_complete_freeblocks(freeblks, flags) - struct freeblks *freeblks; - int flags; +handle_complete_freeblocks(struct freeblks *freeblks, int flags) { struct inodedep *inodedep; struct inode *ip; @@ -8488,10 +8288,9 @@ handle_complete_freeblocks(freeblks, flags) * is completed after the block is freed. */ static void -indir_trunc(freework, dbn, lbn) - struct freework *freework; - ufs2_daddr_t dbn; - ufs_lbn_t lbn; +indir_trunc(struct freework *freework, + ufs2_daddr_t dbn, + ufs_lbn_t lbn) { struct freework *nfreework; struct workhead wkhd; @@ -8705,11 +8504,11 @@ indir_trunc(freework, dbn, lbn) * independently of the indir so we can more easily track journal work. */ static void -cancel_allocindir(aip, bp, freeblks, trunc) - struct allocindir *aip; - struct buf *bp; - struct freeblks *freeblks; - int trunc; +cancel_allocindir( + struct allocindir *aip, + struct buf *bp, + struct freeblks *freeblks, + int trunc) { struct indirdep *indirdep; struct freefrag *freefrag; @@ -8763,12 +8562,12 @@ cancel_allocindir(aip, bp, freeblks, trunc) * lock held. */ static struct mkdir * -setup_newdir(dap, newinum, dinum, newdirbp, mkdirp) - struct diradd *dap; - ino_t newinum; - ino_t dinum; - struct buf *newdirbp; - struct mkdir **mkdirp; +setup_newdir( + struct diradd *dap, + ino_t newinum, + ino_t dinum, + struct buf *newdirbp, + struct mkdir **mkdirp) { struct newblk *newblk; struct pagedep *pagedep; @@ -8885,13 +8684,13 @@ setup_newdir(dap, newinum, dinum, newdirbp, mkdirp) * pointer to the inode has been set. */ int -softdep_setup_directory_add(bp, dp, diroffset, newinum, newdirbp, isnewblk) - struct buf *bp; /* buffer containing directory block */ - struct inode *dp; /* inode for directory */ - off_t diroffset; /* offset of new entry in directory */ - ino_t newinum; /* inode referenced by new directory entry */ - struct buf *newdirbp; /* non-NULL => contents of new mkdir */ - int isnewblk; /* entry is in a newly allocated block */ +softdep_setup_directory_add( + struct buf *bp, /* buffer containing directory block */ + struct inode *dp, /* inode for directory */ + off_t diroffset, /* offset of new entry in directory */ + ino_t newinum, /* inode referenced by new directory entry */ + struct buf *newdirbp, /* non-NULL => contents of new mkdir */ + int isnewblk) /* entry is in a newly allocated block */ { int offset; /* offset of new entry within directory block */ ufs_lbn_t lbn; /* block in directory containing new entry */ @@ -9060,13 +8859,13 @@ softdep_setup_directory_add(bp, dp, diroffset, newinum, newdirbp, isnewblk) * occur while the move is in progress. */ void -softdep_change_directoryentry_offset(bp, dp, base, oldloc, newloc, entrysize) - struct buf *bp; /* Buffer holding directory block. */ - struct inode *dp; /* inode for directory */ - caddr_t base; /* address of dp->i_offset */ - caddr_t oldloc; /* address of old directory location */ - caddr_t newloc; /* address of new directory location */ - int entrysize; /* size of directory entry */ +softdep_change_directoryentry_offset( + struct buf *bp, /* Buffer holding directory block. */ + struct inode *dp, /* inode for directory */ + caddr_t base, /* address of dp->i_offset */ + caddr_t oldloc, /* address of old directory location */ + caddr_t newloc, /* address of new directory location */ + int entrysize) /* size of directory entry */ { int offset, oldoffset, newoffset; struct pagedep *pagedep; @@ -9133,9 +8932,7 @@ softdep_change_directoryentry_offset(bp, dp, base, oldloc, newloc, entrysize) * at a time so one must be canonical. */ static void -merge_diradd(inodedep, newdap) - struct inodedep *inodedep; - struct diradd *newdap; +merge_diradd(struct inodedep *inodedep, struct diradd *newdap) { struct diradd *olddap; struct mkdir *mkdir, *nextmd; @@ -9177,8 +8974,7 @@ merge_diradd(inodedep, newdap) * complete. */ static void -complete_diradd(dap) - struct diradd *dap; +complete_diradd(struct diradd *dap) { struct pagedep *pagedep; @@ -9197,12 +8993,12 @@ complete_diradd(dap) * add entries and conditionally journal the remove. */ static void -cancel_diradd(dap, dirrem, jremref, dotremref, dotdotremref) - struct diradd *dap; - struct dirrem *dirrem; - struct jremref *jremref; - struct jremref *dotremref; - struct jremref *dotdotremref; +cancel_diradd( + struct diradd *dap, + struct dirrem *dirrem, + struct jremref *jremref, + struct jremref *dotremref, + struct jremref *dotdotremref) { struct inodedep *inodedep; struct jaddref *jaddref; @@ -9281,9 +9077,7 @@ cancel_diradd(dap, dirrem, jremref, dotremref, dotdotremref) * Free a diradd dependency structure. */ static void -free_diradd(dap, wkhd) - struct diradd *dap; - struct workhead *wkhd; +free_diradd(struct diradd *dap, struct workhead *wkhd) { struct dirrem *dirrem; struct pagedep *pagedep; @@ -9357,11 +9151,11 @@ free_diradd(dap, wkhd) * code will do this task when it is safe. */ void -softdep_setup_remove(bp, dp, ip, isrmdir) - struct buf *bp; /* buffer containing directory block */ - struct inode *dp; /* inode for the directory being modified */ - struct inode *ip; /* inode for directory entry being removed */ - int isrmdir; /* indicates if doing RMDIR */ +softdep_setup_remove( + struct buf *bp, /* buffer containing directory block */ + struct inode *dp, /* inode for the directory being modified */ + struct inode *ip, /* inode for directory entry being removed */ + int isrmdir) /* indicates if doing RMDIR */ { struct dirrem *dirrem, *prevdirrem; struct inodedep *inodedep; @@ -9419,9 +9213,7 @@ softdep_setup_remove(bp, dp, ip, isrmdir) * pd_pendinghd list of a pagedep. */ static struct diradd * -diradd_lookup(pagedep, offset) - struct pagedep *pagedep; - int offset; +diradd_lookup(struct pagedep *pagedep, int offset) { struct diradd *dap; @@ -9441,10 +9233,9 @@ diradd_lookup(pagedep, offset) * it is found in truncate(). */ static struct jremref * -cancel_diradd_dotdot(ip, dirrem, jremref) - struct inode *ip; - struct dirrem *dirrem; - struct jremref *jremref; +cancel_diradd_dotdot(struct inode *ip, + struct dirrem *dirrem, + struct jremref *jremref) { struct pagedep *pagedep; struct diradd *dap; @@ -9472,10 +9263,9 @@ cancel_diradd_dotdot(ip, dirrem, jremref) * a diradd for the same .. entry. */ static struct jremref * -cancel_mkdir_dotdot(ip, dirrem, jremref) - struct inode *ip; - struct dirrem *dirrem; - struct jremref *jremref; +cancel_mkdir_dotdot(struct inode *ip, + struct dirrem *dirrem, + struct jremref *jremref) { struct inodedep *inodedep; struct jaddref *jaddref; @@ -9515,10 +9305,9 @@ cancel_mkdir_dotdot(ip, dirrem, jremref) } static void -journal_jremref(dirrem, jremref, inodedep) - struct dirrem *dirrem; - struct jremref *jremref; - struct inodedep *inodedep; +journal_jremref(struct dirrem *dirrem, + struct jremref *jremref, + struct inodedep *inodedep) { if (inodedep == NULL) @@ -9531,11 +9320,11 @@ journal_jremref(dirrem, jremref, inodedep) } static void -dirrem_journal(dirrem, jremref, dotremref, dotdotremref) - struct dirrem *dirrem; - struct jremref *jremref; - struct jremref *dotremref; - struct jremref *dotdotremref; +dirrem_journal( + struct dirrem *dirrem, + struct jremref *jremref, + struct jremref *dotremref, + struct jremref *dotdotremref) { struct inodedep *inodedep; @@ -9554,12 +9343,12 @@ dirrem_journal(dirrem, jremref, dotremref, dotdotremref) * its associated pagedep. Called without a lock, returns with lock. */ static struct dirrem * -newdirrem(bp, dp, ip, isrmdir, prevdirremp) - struct buf *bp; /* buffer containing directory block */ - struct inode *dp; /* inode for the directory being modified */ - struct inode *ip; /* inode for directory entry being removed */ - int isrmdir; /* indicates if doing RMDIR */ - struct dirrem **prevdirremp; /* previously referenced inode, if any */ +newdirrem( + struct buf *bp, /* buffer containing directory block */ + struct inode *dp, /* inode for the directory being modified */ + struct inode *ip, /* inode for directory entry being removed */ + int isrmdir, /* indicates if doing RMDIR */ + struct dirrem **prevdirremp) /* previously referenced inode, if any */ { int offset; ufs_lbn_t lbn; @@ -9717,12 +9506,12 @@ newdirrem(bp, dp, ip, isrmdir, prevdirremp) * code will perform this task when it is safe. */ void -softdep_setup_directory_change(bp, dp, ip, newinum, isrmdir) - struct buf *bp; /* buffer containing directory block */ - struct inode *dp; /* inode for the directory being modified */ - struct inode *ip; /* inode for directory entry being removed */ - ino_t newinum; /* new inode number for changed entry */ - int isrmdir; /* indicates if doing RMDIR */ +softdep_setup_directory_change( + struct buf *bp, /* buffer containing directory block */ + struct inode *dp, /* inode for the directory being modified */ + struct inode *ip, /* inode for directory entry being removed */ + ino_t newinum, /* new inode number for changed entry */ + int isrmdir) /* indicates if doing RMDIR */ { int offset; struct diradd *dap = NULL; @@ -9869,8 +9658,8 @@ softdep_setup_directory_change(bp, dp, ip, newinum, isrmdir) * inode has been written. */ void -softdep_change_linkcnt(ip) - struct inode *ip; /* the inode with the increased link count */ +softdep_change_linkcnt( + struct inode *ip) /* the inode with the increased link count */ { struct inodedep *inodedep; struct ufsmount *ump; @@ -9891,10 +9680,10 @@ softdep_change_linkcnt(ip) * track of the head of the linked list of referenced but unlinked inodes. */ void -softdep_setup_sbupdate(ump, fs, bp) - struct ufsmount *ump; - struct fs *fs; - struct buf *bp; +softdep_setup_sbupdate( + struct ufsmount *ump, + struct fs *fs, + struct buf *bp) { struct sbdep *sbdep; struct worklist *wk; @@ -9920,8 +9709,7 @@ softdep_setup_sbupdate(ump, fs, bp) * list. The inodedep and all those after it must have valid next pointers. */ static struct inodedep * -first_unlinked_inodedep(ump) - struct ufsmount *ump; +first_unlinked_inodedep(struct ufsmount *ump) { struct inodedep *inodedep; struct inodedep *idp; @@ -9944,8 +9732,7 @@ first_unlinked_inodedep(ump) * Set the sujfree unlinked head pointer prior to writing a superblock. */ static void -initiate_write_sbdep(sbdep) - struct sbdep *sbdep; +initiate_write_sbdep(struct sbdep *sbdep) { struct inodedep *inodedep; struct fs *bpfs; @@ -9972,9 +9759,7 @@ initiate_write_sbdep(sbdep) * due to a changing unlinked list head. */ static int -handle_written_sbdep(sbdep, bp) - struct sbdep *sbdep; - struct buf *bp; +handle_written_sbdep(struct sbdep *sbdep, struct buf *bp) { struct inodedep *inodedep; struct fs *fs; @@ -10014,9 +9799,7 @@ handle_written_sbdep(sbdep, bp) * Mark an inodedep as unlinked and insert it into the in-memory unlinked list. */ static void -unlinked_inodedep(mp, inodedep) - struct mount *mp; - struct inodedep *inodedep; +unlinked_inodedep( struct mount *mp, struct inodedep *inodedep) { struct ufsmount *ump; @@ -10036,8 +9819,7 @@ unlinked_inodedep(mp, inodedep) * disk writes if the inode has made it that far. */ static void -clear_unlinked_inodedep(inodedep) - struct inodedep *inodedep; +clear_unlinked_inodedep( struct inodedep *inodedep) { struct ufs2_dinode *dip; struct ufsmount *ump; @@ -10200,9 +9982,7 @@ clear_unlinked_inodedep(inodedep) * If the link count reaches zero, the file is removed. */ static int -handle_workitem_remove(dirrem, flags) - struct dirrem *dirrem; - int flags; +handle_workitem_remove(struct dirrem *dirrem, int flags) { struct inodedep *inodedep; struct workhead dotdotwk; @@ -10353,8 +10133,7 @@ handle_workitem_remove(dirrem, flags) * following procedure. */ static void -handle_workitem_freefile(freefile) - struct freefile *freefile; +handle_workitem_freefile(struct freefile *freefile) { struct workhead wkhd; struct fs *fs; @@ -10423,8 +10202,8 @@ markernext(struct worklist *marker) * while we are manipulating its associated dependencies. */ static void -softdep_disk_io_initiation(bp) - struct buf *bp; /* structure describing disk write to occur */ +softdep_disk_io_initiation( + struct buf *bp) /* structure describing disk write to occur */ { struct worklist *wk; struct worklist marker; @@ -10545,9 +10324,7 @@ softdep_disk_io_initiation(bp) * manipulating its associated dependencies. */ static void -initiate_write_filepage(pagedep, bp) - struct pagedep *pagedep; - struct buf *bp; +initiate_write_filepage(struct pagedep *pagedep, struct buf *bp) { struct jremref *jremref; struct jmvref *jmvref; @@ -10608,9 +10385,9 @@ initiate_write_filepage(pagedep, bp) * are manipulating its associated dependencies. */ static void -initiate_write_inodeblock_ufs1(inodedep, bp) - struct inodedep *inodedep; - struct buf *bp; /* The inode block */ +initiate_write_inodeblock_ufs1( + struct inodedep *inodedep, + struct buf *bp) /* The inode block */ { struct allocdirect *adp, *lastadp; struct ufs1_dinode *dp; @@ -10780,9 +10557,9 @@ initiate_write_inodeblock_ufs1(inodedep, bp) * are manipulating its associated dependencies. */ static void -initiate_write_inodeblock_ufs2(inodedep, bp) - struct inodedep *inodedep; - struct buf *bp; /* The inode block */ +initiate_write_inodeblock_ufs2( + struct inodedep *inodedep, + struct buf *bp) /* The inode block */ { struct allocdirect *adp, *lastadp; struct ufs2_dinode *dp; @@ -11016,10 +10793,10 @@ initiate_write_inodeblock_ufs2(inodedep, bp) * list. */ static void -cancel_indirdep(indirdep, bp, freeblks) - struct indirdep *indirdep; - struct buf *bp; - struct freeblks *freeblks; +cancel_indirdep( + struct indirdep *indirdep, + struct buf *bp, + struct freeblks *freeblks) { struct allocindir *aip; @@ -11076,8 +10853,7 @@ cancel_indirdep(indirdep, bp, freeblks) * Free an indirdep once it no longer has new pointers to track. */ static void -free_indirdep(indirdep) - struct indirdep *indirdep; +free_indirdep(struct indirdep *indirdep) { KASSERT(TAILQ_EMPTY(&indirdep->ir_trunc), @@ -11107,9 +10883,7 @@ free_indirdep(indirdep) * allocindirs which have been completed. */ static void -initiate_write_indirdep(indirdep, bp) - struct indirdep *indirdep; - struct buf *bp; +initiate_write_indirdep(struct indirdep *indirdep, struct buf *bp) { struct ufsmount *ump; @@ -11146,11 +10920,10 @@ initiate_write_indirdep(indirdep, bp) * eliminates any canceled jaddrefs */ void -softdep_setup_inofree(mp, bp, ino, wkhd) - struct mount *mp; - struct buf *bp; - ino_t ino; - struct workhead *wkhd; +softdep_setup_inofree(struct mount *mp, + struct buf *bp, + ino_t ino, + struct workhead *wkhd) { struct worklist *wk, *wkn; struct inodedep *inodedep; @@ -11199,12 +10972,12 @@ softdep_setup_inofree(mp, bp, ino, wkhd) * immediately. */ void -softdep_setup_blkfree(mp, bp, blkno, frags, wkhd) - struct mount *mp; - struct buf *bp; - ufs2_daddr_t blkno; - int frags; - struct workhead *wkhd; +softdep_setup_blkfree( + struct mount *mp, + struct buf *bp, + ufs2_daddr_t blkno, + int frags, + struct workhead *wkhd) { struct bmsafemap *bmsafemap; struct jnewblk *jnewblk; @@ -11312,11 +11085,11 @@ softdep_setup_blkfree(mp, bp, blkno, frags, wkhd) * is not yet written. */ static int -jnewblk_rollback(jnewblk, fs, cgp, blksfree) - struct jnewblk *jnewblk; - struct fs *fs; - struct cg *cgp; - uint8_t *blksfree; +jnewblk_rollback( + struct jnewblk *jnewblk, + struct fs *fs, + struct cg *cgp, + uint8_t *blksfree) { ufs1_daddr_t fragno; long cgbno, bbase; @@ -11372,9 +11145,9 @@ jnewblk_rollback(jnewblk, fs, cgp, blksfree) } static void -initiate_write_bmsafemap(bmsafemap, bp) - struct bmsafemap *bmsafemap; - struct buf *bp; /* The cg block. */ +initiate_write_bmsafemap( + struct bmsafemap *bmsafemap, + struct buf *bp) /* The cg block. */ { struct jaddref *jaddref; struct jnewblk *jnewblk; @@ -11469,8 +11242,8 @@ softdep_handle_error(struct buf *bp) * */ static void -softdep_disk_write_complete(bp) - struct buf *bp; /* describes the completed disk write */ +softdep_disk_write_complete( + struct buf *bp) /* describes the completed disk write */ { struct worklist *wk; struct worklist *owk; @@ -11628,9 +11401,9 @@ softdep_disk_write_complete(bp) * Called from within softdep_disk_write_complete above. */ static void -handle_allocdirect_partdone(adp, wkhd) - struct allocdirect *adp; /* the completed allocdirect */ - struct workhead *wkhd; /* Work to do when inode is writtne. */ +handle_allocdirect_partdone( + struct allocdirect *adp, /* the completed allocdirect */ + struct workhead *wkhd) /* Work to do when inode is writtne. */ { struct allocdirectlst *listhead; struct allocdirect *listadp; @@ -11712,8 +11485,8 @@ handle_allocdirect_partdone(adp, wkhd) * completes successfully written allocindirs. */ static void -handle_allocindir_partdone(aip) - struct allocindir *aip; /* the completed allocindir */ +handle_allocindir_partdone( + struct allocindir *aip) /* the completed allocindir */ { struct indirdep *indirdep; @@ -11745,8 +11518,7 @@ handle_allocindir_partdone(aip) * Release segments held on a jwork list. */ static void -handle_jwork(wkhd) - struct workhead *wkhd; +handle_jwork(struct workhead *wkhd) { struct worklist *wk; @@ -11780,9 +11552,9 @@ handle_jwork(wkhd) * are not yet safe to be released. */ static struct freefile * -handle_bufwait(inodedep, refhd) - struct inodedep *inodedep; - struct workhead *refhd; +handle_bufwait( + struct inodedep *inodedep, + struct workhead *refhd) { struct jaddref *jaddref; struct freefile *freefile; @@ -11879,10 +11651,10 @@ handle_bufwait(inodedep, refhd) * dependencies to be processed. */ static int -handle_written_inodeblock(inodedep, bp, flags) - struct inodedep *inodedep; - struct buf *bp; /* buffer containing the inode block */ - int flags; +handle_written_inodeblock( + struct inodedep *inodedep, + struct buf *bp, /* buffer containing the inode block */ + int flags) { struct freefile *freefile; struct allocdirect *adp, *nextadp; @@ -12150,11 +11922,11 @@ handle_written_inodeblock(inodedep, bp, flags) * dependencies to be processed. */ static int -handle_written_indirdep(indirdep, bp, bpp, flags) - struct indirdep *indirdep; - struct buf *bp; - struct buf **bpp; - int flags; +handle_written_indirdep( + struct indirdep *indirdep, + struct buf *bp, + struct buf **bpp, + int flags) { struct allocindir *aip; struct buf *sbp; @@ -12249,9 +12021,9 @@ handle_written_indirdep(indirdep, bp, bpp, flags) * Process a diradd entry after its dependent inode has been written. */ static void -diradd_inode_written(dap, inodedep) - struct diradd *dap; - struct inodedep *inodedep; +diradd_inode_written( + struct diradd *dap, + struct inodedep *inodedep) { LOCK_OWNED(VFSTOUFS(dap->da_list.wk_mp)); @@ -12265,9 +12037,9 @@ diradd_inode_written(dap, inodedep) * be called with the per-filesystem lock and the buf lock on the cg held. */ static int -bmsafemap_backgroundwrite(bmsafemap, bp) - struct bmsafemap *bmsafemap; - struct buf *bp; +bmsafemap_backgroundwrite( + struct bmsafemap *bmsafemap, + struct buf *bp) { int dirty; @@ -12290,11 +12062,11 @@ bmsafemap_backgroundwrite(bmsafemap, bp) * Re-apply an allocation when a cg write is complete. */ static int -jnewblk_rollforward(jnewblk, fs, cgp, blksfree) - struct jnewblk *jnewblk; - struct fs *fs; - struct cg *cgp; - uint8_t *blksfree; +jnewblk_rollforward( + struct jnewblk *jnewblk, + struct fs *fs, + struct cg *cgp, + uint8_t *blksfree) { ufs1_daddr_t fragno; ufs2_daddr_t blkno; @@ -12348,10 +12120,10 @@ jnewblk_rollforward(jnewblk, fs, cgp, blksfree) * dependencies to be processed. */ static int -handle_written_bmsafemap(bmsafemap, bp, flags) - struct bmsafemap *bmsafemap; - struct buf *bp; - int flags; +handle_written_bmsafemap( + struct bmsafemap *bmsafemap, + struct buf *bp, + int flags) { struct newblk *newblk; struct inodedep *inodedep; @@ -12485,8 +12257,7 @@ handle_written_bmsafemap(bmsafemap, bp, flags) * Try to free a mkdir dependency. */ static void -complete_mkdir(mkdir) - struct mkdir *mkdir; +complete_mkdir(struct mkdir *mkdir) { struct diradd *dap; @@ -12506,9 +12277,7 @@ complete_mkdir(mkdir) * Handle the completion of a mkdir dependency. */ static void -handle_written_mkdir(mkdir, type) - struct mkdir *mkdir; - int type; +handle_written_mkdir(struct mkdir *mkdir, int type) { if ((mkdir->md_state & (MKDIR_PARENT | MKDIR_BODY)) != type) @@ -12518,8 +12287,7 @@ handle_written_mkdir(mkdir, type) } static int -free_pagedep(pagedep) - struct pagedep *pagedep; +free_pagedep(struct pagedep *pagedep) { int i; @@ -12554,10 +12322,10 @@ free_pagedep(pagedep) * dependencies to be processed. */ static int -handle_written_filepage(pagedep, bp, flags) - struct pagedep *pagedep; - struct buf *bp; /* buffer containing the written page */ - int flags; +handle_written_filepage( + struct pagedep *pagedep, + struct buf *bp, /* buffer containing the written page */ + int flags) { struct dirrem *dirrem; struct diradd *dap, *nextdap; @@ -12655,8 +12423,8 @@ handle_written_filepage(pagedep, bp, flags) * need to ensure that the correct effective link count is put back. */ void -softdep_load_inodeblock(ip) - struct inode *ip; /* the "in_core" copy of the inode */ +softdep_load_inodeblock( + struct inode *ip) /* the "in_core" copy of the inode */ { struct inodedep *inodedep; struct ufsmount *ump; @@ -12697,10 +12465,10 @@ softdep_load_inodeblock(ip) * to disk. */ void -softdep_update_inodeblock(ip, bp, waitfor) - struct inode *ip; /* the "in_core" copy of the inode */ - struct buf *bp; /* the buffer containing the inode block */ - int waitfor; /* nonzero => update must be allowed */ +softdep_update_inodeblock( + struct inode *ip, /* the "in_core" copy of the inode */ + struct buf *bp, /* the buffer containing the inode block */ + int waitfor) /* nonzero => update must be allowed */ { struct inodedep *inodedep; struct inoref *inoref; @@ -12832,9 +12600,9 @@ softdep_update_inodeblock(ip, bp, waitfor) * old inode dependency list (such as id_inoupdt). */ static void -merge_inode_lists(newlisthead, oldlisthead) - struct allocdirectlst *newlisthead; - struct allocdirectlst *oldlisthead; +merge_inode_lists( + struct allocdirectlst *newlisthead, + struct allocdirectlst *oldlisthead) { struct allocdirect *listadp, *newadp; @@ -12866,8 +12634,8 @@ merge_inode_lists(newlisthead, oldlisthead) * entries for the inode have been written after the inode gets to disk. */ int -softdep_fsync(vp) - struct vnode *vp; /* the "in_core" copy of the inode */ +softdep_fsync( + struct vnode *vp) /* the "in_core" copy of the inode */ { struct inodedep *inodedep; struct pagedep *pagedep; @@ -13027,8 +12795,7 @@ softdep_fsync(vp) * XXX Unused? */ void -softdep_fsync_mountdev(vp) - struct vnode *vp; +softdep_fsync_mountdev(struct vnode *vp) { struct buf *bp, *nbp; struct worklist *wk; @@ -13074,9 +12841,7 @@ softdep_fsync_mountdev(vp) * indirect block. */ static int -sync_cgs(mp, waitfor) - struct mount *mp; - int waitfor; +sync_cgs(struct mount *mp, int waitfor) { struct bmsafemap *bmsafemap; struct bmsafemap *sentinel; @@ -13169,7 +12934,9 @@ softdep_sync_metadata(struct vnode *vp) * return 0. */ int -softdep_sync_buf(struct vnode *vp, struct buf *bp, int waitfor) +softdep_sync_buf(struct vnode *vp, + struct buf *bp, + int waitfor) { struct indirdep *indirdep; struct pagedep *pagedep; @@ -13315,10 +13082,10 @@ softdep_sync_buf(struct vnode *vp, struct buf *bp, int waitfor) * Flush the dependencies associated with an inodedep. */ static int -flush_inodedep_deps(vp, mp, ino) - struct vnode *vp; - struct mount *mp; - ino_t ino; +flush_inodedep_deps( + struct vnode *vp, + struct mount *mp, + ino_t ino) { struct inodedep *inodedep; struct inoref *inoref; @@ -13379,10 +13146,10 @@ flush_inodedep_deps(vp, mp, ino) * Flush an inode dependency list. */ static int -flush_deplist(listhead, waitfor, errorp) - struct allocdirectlst *listhead; - int waitfor; - int *errorp; +flush_deplist( + struct allocdirectlst *listhead, + int waitfor, + int *errorp) { struct allocdirect *adp; struct newblk *newblk; @@ -13423,10 +13190,10 @@ flush_deplist(listhead, waitfor, errorp) * Flush dependencies associated with an allocdirect block. */ static int -flush_newblk_dep(vp, mp, lbn) - struct vnode *vp; - struct mount *mp; - ufs_lbn_t lbn; +flush_newblk_dep( + struct vnode *vp, + struct mount *mp, + ufs_lbn_t lbn) { struct newblk *newblk; struct ufsmount *ump; @@ -13520,11 +13287,11 @@ flush_newblk_dep(vp, mp, lbn) * Eliminate a pagedep dependency by flushing out all its diradd dependencies. */ static int -flush_pagedep_deps(pvp, mp, diraddhdp, locked_bp) - struct vnode *pvp; - struct mount *mp; - struct diraddhd *diraddhdp; - struct buf *locked_bp; +flush_pagedep_deps( + struct vnode *pvp, + struct mount *mp, + struct diraddhd *diraddhdp, + struct buf *locked_bp) { struct inodedep *inodedep; struct inoref *inoref; @@ -13694,8 +13461,7 @@ flush_pagedep_deps(pvp, mp, diraddhdp, locked_bp) * until the memory load returns to a reasonable level. */ int -softdep_slowdown(vp) - struct vnode *vp; +softdep_slowdown(struct vnode *vp) { struct ufsmount *ump; int jlow; @@ -13798,11 +13564,11 @@ softdep_request_cleanup_inactivate(struct mount *mp) * start syncing out vnodes to free up the needed space. */ int -softdep_request_cleanup(fs, vp, cred, resource) - struct fs *fs; - struct vnode *vp; - struct ucred *cred; - int resource; +softdep_request_cleanup( + struct fs *fs, + struct vnode *vp, + struct ucred *cred, + int resource) { struct ufsmount *ump; struct mount *mp; @@ -13986,9 +13752,7 @@ softdep_request_cleanup(fs, vp, cred, resource) * If we had to skip one or more vnodes, we return 1. */ static int -softdep_request_cleanup_flush(mp, ump) - struct mount *mp; - struct ufsmount *ump; +softdep_request_cleanup_flush(struct mount *mp, struct ufsmount *ump) { struct thread *td; struct vnode *lvp, *mvp; @@ -14115,9 +13879,7 @@ softdep_ast_cleanup_proc(struct thread *td) * down and speed up the I/O processing. */ static int -request_cleanup(mp, resource) - struct mount *mp; - int resource; +request_cleanup(struct mount *mp, int resource) { struct thread *td = curthread; struct ufsmount *ump; @@ -14209,8 +13971,7 @@ request_cleanup(mp, resource) * will be called with the global softdep mutex (&lk) locked. */ static void -pause_timer(arg) - void *arg; +pause_timer(void *arg) { GBLLOCK_OWNED(&lk); @@ -14226,8 +13987,7 @@ pause_timer(arg) * If requested, try removing inode or removal dependencies. */ static void -check_clear_deps(mp) - struct mount *mp; +check_clear_deps(struct mount *mp) { struct ufsmount *ump; bool suj_susp; @@ -14281,8 +14041,7 @@ check_clear_deps(mp) * reduce the number of dirrem, freefile, and freeblks dependency structures. */ static void -clear_remove(mp) - struct mount *mp; +clear_remove(struct mount *mp) { struct pagedep_hashhead *pagedephd; struct pagedep *pagedep; @@ -14341,8 +14100,7 @@ clear_remove(mp) * the number of inodedep dependency structures. */ static void -clear_inodedeps(mp) - struct mount *mp; +clear_inodedeps(struct mount *mp) { struct inodedep_hashhead *inodedephd; struct inodedep *inodedep; @@ -14424,9 +14182,7 @@ clear_inodedeps(mp) } void -softdep_buf_append(bp, wkhd) - struct buf *bp; - struct workhead *wkhd; +softdep_buf_append(struct buf *bp, struct workhead *wkhd) { struct worklist *wk; struct ufsmount *ump; @@ -14446,10 +14202,10 @@ softdep_buf_append(bp, wkhd) } void -softdep_inode_append(ip, cred, wkhd) - struct inode *ip; - struct ucred *cred; - struct workhead *wkhd; +softdep_inode_append( + struct inode *ip, + struct ucred *cred, + struct workhead *wkhd) { struct buf *bp; struct fs *fs; @@ -14472,8 +14228,7 @@ softdep_inode_append(ip, cred, wkhd) } void -softdep_freework(wkhd) - struct workhead *wkhd; +softdep_freework(struct workhead *wkhd) { struct worklist *wk; struct ufsmount *ump; @@ -14489,8 +14244,7 @@ softdep_freework(wkhd) } static struct ufsmount * -softdep_bp_to_mp(bp) - struct buf *bp; +softdep_bp_to_mp(struct buf *bp) { struct mount *mp; struct vnode *vp; @@ -14546,9 +14300,7 @@ softdep_bp_to_mp(bp) * is set, return number of dependencies, otherwise just yes or no. */ static int -softdep_count_dependencies(bp, wantcount) - struct buf *bp; - int wantcount; +softdep_count_dependencies(struct buf *bp, int wantcount) { struct worklist *wk; struct ufsmount *ump; @@ -14710,10 +14462,9 @@ softdep_count_dependencies(bp, wantcount) * Return acquired buffer or NULL on failure. */ static struct buf * -getdirtybuf(bp, lock, waitfor) - struct buf *bp; - struct rwlock *lock; - int waitfor; +getdirtybuf(struct buf *bp, + struct rwlock *lock, + int waitfor) { int error; @@ -14953,8 +14704,7 @@ softdep_get_depcounts(struct mount *mp, * Wait for pending output on a vnode to complete. */ static void -drain_output(vp) - struct vnode *vp; +drain_output(struct vnode *vp) { ASSERT_VOP_LOCKED(vp, "drain_output"); @@ -14967,8 +14717,7 @@ drain_output(vp) * occurred. The routine is called with the buffer locked. */ static void -softdep_deallocate_dependencies(bp) - struct buf *bp; +softdep_deallocate_dependencies(struct buf *bp) { if ((bp->b_ioflags & BIO_ERROR) == 0) @@ -14986,9 +14735,7 @@ softdep_deallocate_dependencies(bp) * Function to handle asynchronous write errors in the filesystem. */ static void -softdep_error(func, error) - char *func; - int error; +softdep_error(char *func, int error) { /* XXX should do something better! */ diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index d1414b81bb1e..b41c162dea7d 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -903,10 +903,7 @@ ffs_reload(struct mount *mp, int flags) * Common code for mount and mountroot */ static int -ffs_mountfs(odevvp, mp, td) - struct vnode *odevvp; - struct mount *mp; - struct thread *td; +ffs_mountfs(struct vnode *odevvp, struct mount *mp, struct thread *td) { struct ufsmount *ump; struct fs *fs; @@ -1272,10 +1269,9 @@ SYSCTL_INT(_debug, OID_AUTO, bigcgs, CTLFLAG_RW, &bigcgs, 0, ""); * Unfortunately new bits get added. */ static void -ffs_oldfscompat_read(fs, ump, sblockloc) - struct fs *fs; - struct ufsmount *ump; - ufs2_daddr_t sblockloc; +ffs_oldfscompat_read(struct fs *fs, + struct ufsmount *ump, + ufs2_daddr_t sblockloc) { off_t maxfilesize; @@ -1332,9 +1328,7 @@ ffs_oldfscompat_read(fs, ump, sblockloc) * Unfortunately new bits get added. */ void -ffs_oldfscompat_write(fs, ump) - struct fs *fs; - struct ufsmount *ump; +ffs_oldfscompat_write(struct fs *fs, struct ufsmount *ump) { /* @@ -1358,9 +1352,7 @@ ffs_oldfscompat_write(fs, ump) * unmount system call */ static int -ffs_unmount(mp, mntflags) - struct mount *mp; - int mntflags; +ffs_unmount(struct mount *mp, int mntflags) { struct thread *td; struct ufsmount *ump = VFSTOUFS(mp); @@ -1480,10 +1472,7 @@ ffs_unmount(mp, mntflags) * Flush out all the files in a filesystem. */ int -ffs_flushfiles(mp, flags, td) - struct mount *mp; - int flags; - struct thread *td; +ffs_flushfiles(struct mount *mp, int flags, struct thread *td) { struct ufsmount *ump; int qerror, error; @@ -1566,9 +1555,7 @@ ffs_flushfiles(mp, flags, td) * Get filesystem statistics. */ static int -ffs_statfs(mp, sbp) - struct mount *mp; - struct statfs *sbp; +ffs_statfs(struct mount *mp, struct statfs *sbp) { struct ufsmount *ump; struct fs *fs; @@ -1625,8 +1612,7 @@ ffs_sync_lazy_filter(struct vnode *vp, void *arg __unused) * disk by syncer. */ static int -ffs_sync_lazy(mp) - struct mount *mp; +ffs_sync_lazy(struct mount *mp) { struct vnode *mvp, *vp; struct inode *ip; @@ -1684,9 +1670,7 @@ ffs_sync_lazy(mp) * vfs_busy(). */ static int -ffs_sync(mp, waitfor) - struct mount *mp; - int waitfor; +ffs_sync(struct mount *mp, int waitfor) { struct vnode *mvp, *vp, *devvp; struct thread *td; @@ -1831,22 +1815,17 @@ ffs_sync(mp, waitfor) } int -ffs_vget(mp, ino, flags, vpp) - struct mount *mp; - ino_t ino; - int flags; - struct vnode **vpp; +ffs_vget(struct mount *mp, ino_t ino, int flags, struct vnode **vpp) { return (ffs_vgetf(mp, ino, flags, vpp, 0)); } int -ffs_vgetf(mp, ino, flags, vpp, ffs_flags) - struct mount *mp; - ino_t ino; - int flags; - struct vnode **vpp; - int ffs_flags; +ffs_vgetf(struct mount *mp, + ino_t ino, + int flags, + struct vnode **vpp, + int ffs_flags) { struct fs *fs; struct inode *ip; @@ -2050,11 +2029,7 @@ ffs_vgetf(mp, ino, flags, vpp, ffs_flags) * those rights via. exflagsp and credanonp */ static int -ffs_fhtovp(mp, fhp, flags, vpp) - struct mount *mp; - struct fid *fhp; - int flags; - struct vnode **vpp; +ffs_fhtovp(struct mount *mp, struct fid *fhp, int flags, struct vnode **vpp) { struct ufid *ufhp; @@ -2064,13 +2039,12 @@ ffs_fhtovp(mp, fhp, flags, vpp) } int -ffs_inotovp(mp, ino, gen, lflags, vpp, ffs_flags) - struct mount *mp; - ino_t ino; - u_int64_t gen; - int lflags; - struct vnode **vpp; - int ffs_flags; +ffs_inotovp(struct mount *mp, + ino_t ino, + u_int64_t gen, + int lflags, + struct vnode **vpp, + int ffs_flags) { struct ufsmount *ump; struct vnode *nvp; @@ -2125,8 +2099,7 @@ ffs_inotovp(mp, ino, gen, lflags, vpp, ffs_flags) * Initialize the filesystem. */ static int -ffs_init(vfsp) - struct vfsconf *vfsp; +ffs_init(struct vfsconf *vfsp) { ffs_susp_initialize(); @@ -2138,8 +2111,7 @@ ffs_init(vfsp) * Undo the work of ffs_init(). */ static int -ffs_uninit(vfsp) - struct vfsconf *vfsp; +ffs_uninit(struct vfsconf *vfsp) { int ret; @@ -2166,10 +2138,7 @@ struct devfd { * Write a superblock and associated information back to disk. */ int -ffs_sbupdate(ump, waitfor, suspended) - struct ufsmount *ump; - int waitfor; - int suspended; +ffs_sbupdate(struct ufsmount *ump, int waitfor, int suspended) { struct fs *fs; struct buf *sbbp; diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index c3f63bbfc44f..8b4b523dbfc8 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -471,13 +471,13 @@ ffs_fdatasync(struct vop_fdatasync_args *ap) } static int -ffs_lock(ap) +ffs_lock( struct vop_lock1_args /* { struct vnode *a_vp; int a_flags; char *file; int line; - } */ *ap; + } */ *ap) { #if !defined(NO_FFS_SNAPSHOT) || defined(DIAGNOSTIC) struct vnode *vp = ap->a_vp; @@ -633,13 +633,13 @@ ffs_read_hole(struct uio *uio, long xfersize, long *size) * Vnode op for reading. */ static int -ffs_read(ap) +ffs_read( struct vop_read_args /* { struct vnode *a_vp; struct uio *a_uio; int a_ioflag; struct ucred *a_cred; - } */ *ap; + } */ *ap) { struct vnode *vp; struct inode *ip; @@ -824,13 +824,13 @@ ffs_read(ap) * Vnode op for writing. */ static int -ffs_write(ap) +ffs_write( struct vop_write_args /* { struct vnode *a_vp; struct uio *a_uio; int a_ioflag; struct ucred *a_cred; - } */ *ap; + } */ *ap) { struct vnode *vp; struct uio *uio; @@ -1506,14 +1506,12 @@ ffs_close_ea(struct vnode *vp, int commit, struct ucred *cred, struct thread *td * Otherwise we just fall through and do the usual thing. */ static int -ffsext_strategy(struct vop_strategy_args *ap) -/* -struct vop_strategy_args { - struct vnodeop_desc *a_desc; - struct vnode *a_vp; - struct buf *a_bp; -}; -*/ +ffsext_strategy( + struct vop_strategy_args /* { + struct vnodeop_desc *a_desc; + struct vnode *a_vp; + struct buf *a_bp; + } */ *ap) { struct vnode *vp; daddr_t lbn; @@ -1531,15 +1529,13 @@ struct vop_strategy_args { * Vnode extattr transaction commit/abort */ static int -ffs_openextattr(struct vop_openextattr_args *ap) -/* -struct vop_openextattr_args { - struct vnodeop_desc *a_desc; - struct vnode *a_vp; - IN struct ucred *a_cred; - IN struct thread *a_td; -}; -*/ +ffs_openextattr( + struct vop_openextattr_args /* { + struct vnodeop_desc *a_desc; + struct vnode *a_vp; + IN struct ucred *a_cred; + IN struct thread *a_td; + } */ *ap) { if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK) @@ -1552,16 +1548,14 @@ struct vop_openextattr_args { * Vnode extattr transaction commit/abort */ static int -ffs_closeextattr(struct vop_closeextattr_args *ap) -/* -struct vop_closeextattr_args { - struct vnodeop_desc *a_desc; - struct vnode *a_vp; - int a_commit; - IN struct ucred *a_cred; - IN struct thread *a_td; -}; -*/ +ffs_closeextattr( + struct vop_closeextattr_args /* { + struct vnodeop_desc *a_desc; + struct vnode *a_vp; + int a_commit; + IN struct ucred *a_cred; + IN struct thread *a_td; + } */ *ap) { struct vnode *vp; @@ -1584,16 +1578,14 @@ struct vop_closeextattr_args { * Vnode operation to remove a named attribute. */ static int -ffs_deleteextattr(struct vop_deleteextattr_args *ap) -/* -vop_deleteextattr { - IN struct vnode *a_vp; - IN int a_attrnamespace; - IN const char *a_name; - IN struct ucred *a_cred; - IN struct thread *a_td; -}; -*/ +ffs_deleteextattr( + struct vop_deleteextattr_args /* { + IN struct vnode *a_vp; + IN int a_attrnamespace; + IN const char *a_name; + IN struct ucred *a_cred; + IN struct thread *a_td; + } */ *ap) { struct vnode *vp; struct inode *ip; @@ -1666,18 +1658,16 @@ vop_deleteextattr { * Vnode operation to retrieve a named extended attribute. */ static int -ffs_getextattr(struct vop_getextattr_args *ap) -/* -vop_getextattr { - IN struct vnode *a_vp; - IN int a_attrnamespace; - IN const char *a_name; - INOUT struct uio *a_uio; - OUT size_t *a_size; - IN struct ucred *a_cred; - IN struct thread *a_td; -}; -*/ +ffs_getextattr( + struct vop_getextattr_args /* { + IN struct vnode *a_vp; + IN int a_attrnamespace; + IN const char *a_name; + INOUT struct uio *a_uio; + OUT size_t *a_size; + IN struct ucred *a_cred; + IN struct thread *a_td; + } */ *ap) { struct inode *ip; u_char *eae, *p; @@ -1720,17 +1710,15 @@ vop_getextattr { * Vnode operation to retrieve extended attributes on a vnode. */ static int -ffs_listextattr(struct vop_listextattr_args *ap) -/* -vop_listextattr { - IN struct vnode *a_vp; - IN int a_attrnamespace; - INOUT struct uio *a_uio; - OUT size_t *a_size; - IN struct ucred *a_cred; - IN struct thread *a_td; -}; -*/ +ffs_listextattr( + struct vop_listextattr_args /* { + IN struct vnode *a_vp; + IN int a_attrnamespace; + INOUT struct uio *a_uio; + OUT size_t *a_size; + IN struct ucred *a_cred; + IN struct thread *a_td; + } */ *ap) { struct inode *ip; struct extattr *eap, *eaend; @@ -1779,17 +1767,15 @@ vop_listextattr { * Vnode operation to set a named attribute. */ static int -ffs_setextattr(struct vop_setextattr_args *ap) -/* -vop_setextattr { - IN struct vnode *a_vp; - IN int a_attrnamespace; - IN const char *a_name; - INOUT struct uio *a_uio; - IN struct ucred *a_cred; - IN struct thread *a_td; -}; -*/ +ffs_setextattr( + struct vop_setextattr_args /* { + IN struct vnode *a_vp; + IN int a_attrnamespace; + IN const char *a_name; + INOUT struct uio *a_uio; + IN struct ucred *a_cred; + IN struct thread *a_td; + } */ *ap) { struct vnode *vp; struct inode *ip; @@ -1910,13 +1896,11 @@ vop_setextattr { * Vnode pointer to File handle */ static int -ffs_vptofh(struct vop_vptofh_args *ap) -/* -vop_vptofh { - IN struct vnode *a_vp; - IN struct fid *a_fhp; -}; -*/ +ffs_vptofh( + struct vop_vptofh_args /* { + IN struct vnode *a_vp; + IN struct fid *a_fhp; + } */ *ap) { struct inode *ip; struct ufid *ufhp; diff --git a/sys/ufs/ufs/ufs_bmap.c b/sys/ufs/ufs/ufs_bmap.c index 5b9a16782cf7..4ac8ca149279 100644 --- a/sys/ufs/ufs/ufs_bmap.c +++ b/sys/ufs/ufs/ufs_bmap.c @@ -65,7 +65,7 @@ static int readindir(struct vnode *, ufs_lbn_t, ufs2_daddr_t, struct buf **); * number to index into the array of block pointers described by the dinode. */ int -ufs_bmap(ap) +ufs_bmap( struct vop_bmap_args /* { struct vnode *a_vp; daddr_t a_bn; @@ -73,7 +73,7 @@ ufs_bmap(ap) daddr_t *a_bnp; int *a_runp; int *a_runb; - } */ *ap; + } */ *ap) { ufs2_daddr_t blkno; int error; @@ -94,11 +94,10 @@ ufs_bmap(ap) } static int -readindir(vp, lbn, daddr, bpp) - struct vnode *vp; - ufs_lbn_t lbn; - ufs2_daddr_t daddr; - struct buf **bpp; +readindir(struct vnode *vp, + ufs_lbn_t lbn, + ufs2_daddr_t daddr, + struct buf **bpp) { struct buf *bp; struct mount *mp; @@ -153,13 +152,12 @@ readindir(vp, lbn, daddr, bpp) */ int -ufs_bmaparray(vp, bn, bnp, nbp, runp, runb) - struct vnode *vp; - ufs2_daddr_t bn; - ufs2_daddr_t *bnp; - struct buf *nbp; - int *runp; - int *runb; +ufs_bmaparray(struct vnode *vp, + ufs2_daddr_t bn, + ufs2_daddr_t *bnp, + struct buf *nbp, + int *runp, + int *runb) { struct inode *ip; struct buf *bp; @@ -333,9 +331,7 @@ ufs_bmaparray(vp, bn, bnp, nbp, runp, runb) } static ufs_lbn_t -lbn_count(ump, level) - struct ufsmount *ump; - int level; +lbn_count(struct ufsmount *ump, int level) { ufs_lbn_t blockcnt; @@ -345,9 +341,7 @@ lbn_count(ump, level) } int -ufs_bmap_seekdata(vp, offp) - struct vnode *vp; - off_t *offp; +ufs_bmap_seekdata(struct vnode *vp, off_t *offp) { struct buf *bp; struct indir a[UFS_NIADDR + 1], *ap; @@ -448,11 +442,10 @@ ufs_bmap_seekdata(vp, offp) * once with the offset into the page itself. */ int -ufs_getlbns(vp, bn, ap, nump) - struct vnode *vp; - ufs2_daddr_t bn; - struct indir *ap; - int *nump; +ufs_getlbns(struct vnode *vp, + ufs2_daddr_t bn, + struct indir *ap, + int *nump) { ufs2_daddr_t blockcnt; ufs_lbn_t metalbn, realbn; diff --git a/sys/ufs/ufs/ufs_extattr.c b/sys/ufs/ufs/ufs_extattr.c index e9f0fb3ea762..982d95376aa7 100644 --- a/sys/ufs/ufs/ufs_extattr.c +++ b/sys/ufs/ufs/ufs_extattr.c @@ -810,18 +810,16 @@ ufs_extattrctl(struct mount *mp, int cmd, struct vnode *filename_vp, * Vnode operating to retrieve a named extended attribute. */ int -ufs_getextattr(struct vop_getextattr_args *ap) -/* -vop_getextattr { - IN struct vnode *a_vp; - IN int a_attrnamespace; - IN const char *a_name; - INOUT struct uio *a_uio; - OUT size_t *a_size; - IN struct ucred *a_cred; - IN struct thread *a_td; -}; -*/ +ufs_getextattr( + struct vop_getextattr_args /* { + IN struct vnode *a_vp; + IN int a_attrnamespace; + IN const char *a_name; + INOUT struct uio *a_uio; + OUT size_t *a_size; + IN struct ucred *a_cred; + IN struct thread *a_td; + } */ *ap) { struct mount *mp = ap->a_vp->v_mount; struct ufsmount *ump = VFSTOUFS(mp); @@ -982,16 +980,14 @@ ufs_extattr_get(struct vnode *vp, int attrnamespace, const char *name, * Vnode operation to remove a named attribute. */ int -ufs_deleteextattr(struct vop_deleteextattr_args *ap) -/* -vop_deleteextattr { - IN struct vnode *a_vp; - IN int a_attrnamespace; - IN const char *a_name; - IN struct ucred *a_cred; - IN struct thread *a_td; -}; -*/ +ufs_deleteextattr( + struct vop_deleteextattr_args /* { + IN struct vnode *a_vp; + IN int a_attrnamespace; + IN const char *a_name; + IN struct ucred *a_cred; + IN struct thread *a_td; + } */ *ap) { struct mount *mp = ap->a_vp->v_mount; struct ufsmount *ump = VFSTOUFS(mp); @@ -1011,17 +1007,15 @@ vop_deleteextattr { * Vnode operation to set a named attribute. */ int -ufs_setextattr(struct vop_setextattr_args *ap) -/* -vop_setextattr { - IN struct vnode *a_vp; - IN int a_attrnamespace; - IN const char *a_name; - INOUT struct uio *a_uio; - IN struct ucred *a_cred; - IN struct thread *a_td; -}; -*/ +ufs_setextattr( + vop_setextattr_args /* { + IN struct vnode *a_vp; + IN int a_attrnamespace; + IN const char *a_name; + INOUT struct uio *a_uio; + IN struct ucred *a_cred; + IN struct thread *a_td; + } */ *ap) { struct mount *mp = ap->a_vp->v_mount; struct ufsmount *ump = VFSTOUFS(mp); diff --git a/sys/ufs/ufs/ufs_inode.c b/sys/ufs/ufs/ufs_inode.c index 46e4f8e54e41..41ef9be2de60 100644 --- a/sys/ufs/ufs/ufs_inode.c +++ b/sys/ufs/ufs/ufs_inode.c @@ -64,8 +64,7 @@ __FBSDID("$FreeBSD$"); #endif int -ufs_need_inactive(ap) - struct vop_need_inactive_args *ap; +ufs_need_inactive(struct vop_need_inactive_args *ap) { struct vnode *vp; struct inode *ip; @@ -103,10 +102,10 @@ ufs_need_inactive(ap) * Last reference to an inode. If necessary, write or delete it. */ int -ufs_inactive(ap) +ufs_inactive( struct vop_inactive_args /* { struct vnode *a_vp; - } */ *ap; + } */ *ap) { struct vnode *vp = ap->a_vp; struct inode *ip = VTOI(vp); @@ -219,10 +218,10 @@ ufs_inactive(ap) * Reclaim an inode so that it can be used for other purposes. */ int -ufs_reclaim(ap) +ufs_reclaim( struct vop_reclaim_args /* { struct vnode *a_vp; - } */ *ap; + } */ *ap) { struct vnode *vp = ap->a_vp; struct inode *ip = VTOI(vp); diff --git a/sys/ufs/ufs/ufs_lookup.c b/sys/ufs/ufs/ufs_lookup.c index 7f3358d2d7c4..9c6e95687f85 100644 --- a/sys/ufs/ufs/ufs_lookup.c +++ b/sys/ufs/ufs/ufs_lookup.c @@ -177,12 +177,12 @@ ufs_delete_denied(struct vnode *vdp, struct vnode *tdp, struct ucred *cred, * nor deleting, add name to cache */ int -ufs_lookup(ap) +ufs_lookup( struct vop_cachedlookup_args /* { struct vnode *a_dvp; struct vnode **a_vpp; struct componentname *a_cnp; - } */ *ap; + } */ *ap) { return (ufs_lookup_ino(ap->a_dvp, ap->a_vpp, ap->a_cnp, NULL)); @@ -760,10 +760,7 @@ ufs_lookup_ino(struct vnode *vdp, struct vnode **vpp, struct componentname *cnp, } 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; @@ -787,10 +784,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, namlen; @@ -830,10 +824,8 @@ ufs_dirbadentry(dp, ep, entryoffsetinblock) * 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) { u_int namelen; @@ -872,12 +864,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 *cr; struct thread *td; @@ -1130,11 +1118,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, *rep; @@ -1256,11 +1240,8 @@ ufs_dirremove(dvp, ip, flags, isrmdir) * 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; @@ -1334,10 +1315,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) { doff_t off; struct dirtemplate dbuf; diff --git a/sys/ufs/ufs/ufs_quota.c b/sys/ufs/ufs/ufs_quota.c index 2f625051b321..010acbe67da7 100644 --- a/sys/ufs/ufs/ufs_quota.c +++ b/sys/ufs/ufs/ufs_quota.c @@ -1681,9 +1681,7 @@ dqflush(struct vnode *vp) * Return count of number of quota structures found. */ int -quotaref(vp, qrp) - struct vnode *vp; - struct dquot **qrp; +quotaref(struct vnode *vp, struct dquot **qrp) { struct inode *ip; struct dquot *dq; @@ -1718,8 +1716,7 @@ quotaref(vp, qrp) * Release a set of quota structures obtained from a vnode. */ void -quotarele(qrp) - struct dquot **qrp; +quotarele(struct dquot **qrp) { struct dquot *dq; int i; @@ -1736,10 +1733,7 @@ quotarele(qrp) * Positive numbers when adding blocks; negative numbers when freeing blocks. */ void -quotaadj(qrp, ump, blkcount) - struct dquot **qrp; - struct ufsmount *ump; - int64_t blkcount; +quotaadj(struct dquot **qrp, struct ufsmount *ump, int64_t blkcount) { struct dquot *dq; ufs2_daddr_t ncurblocks; diff --git a/sys/ufs/ufs/ufs_vfsops.c b/sys/ufs/ufs/ufs_vfsops.c index ef0ff43a56cc..bd2e6397749b 100644 --- a/sys/ufs/ufs/ufs_vfsops.c +++ b/sys/ufs/ufs/ufs_vfsops.c @@ -68,10 +68,7 @@ MALLOC_DEFINE(M_UFSMNT, "ufs_mount", "UFS mount structure"); * Return the root of a filesystem. */ int -ufs_root(mp, flags, vpp) - struct mount *mp; - int flags; - struct vnode **vpp; +ufs_root(struct mount *mp, int flags, struct vnode **vpp) { struct vnode *nvp; int error; @@ -87,12 +84,7 @@ ufs_root(mp, flags, vpp) * Do operations associated with quotas */ int -ufs_quotactl(mp, cmds, id, arg, mp_busy) - struct mount *mp; - int cmds; - uid_t id; - void *arg; - bool *mp_busy; +ufs_quotactl(struct mount *mp, int cmds, uid_t id, void *arg, bool *mp_busy) { #ifndef QUOTA return (EOPNOTSUPP); @@ -180,8 +172,7 @@ ufs_quotactl(mp, cmds, id, arg, mp_busy) * Initial UFS filesystems, done only once. */ int -ufs_init(vfsp) - struct vfsconf *vfsp; +ufs_init(struct vfsconf *vfsp) { #ifdef QUOTA @@ -197,8 +188,7 @@ ufs_init(vfsp) * Uninitialise UFS filesystems, done before module unload. */ int -ufs_uninit(vfsp) - struct vfsconf *vfsp; +ufs_uninit(struct vfsconf *vfsp) { #ifdef QUOTA diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index 918b1e7ab29c..0c4f2f9941b1 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -238,13 +238,13 @@ ufs_sync_nlink(struct vnode *vp, struct vnode *vp1) * Create a regular file */ static int -ufs_create(ap) +ufs_create( struct vop_create_args /* { struct vnode *a_dvp; struct vnode **a_vpp; struct componentname *a_cnp; struct vattr *a_vap; - } */ *ap; + } */ *ap) { int error; @@ -263,13 +263,13 @@ ufs_create(ap) */ /* ARGSUSED */ static int -ufs_mknod(ap) +ufs_mknod( struct vop_mknod_args /* { struct vnode *a_dvp; struct vnode **a_vpp; struct componentname *a_cnp; struct vattr *a_vap; - } */ *ap; + } */ *ap) { struct vattr *vap = ap->a_vap; struct vnode **vpp = ap->a_vpp; @@ -345,13 +345,13 @@ ufs_open(struct vop_open_args *ap) */ /* ARGSUSED */ static int -ufs_close(ap) +ufs_close( struct vop_close_args /* { struct vnode *a_vp; int a_fflag; struct ucred *a_cred; struct thread *a_td; - } */ *ap; + } */ *ap) { struct vnode *vp = ap->a_vp; int usecount; @@ -365,13 +365,13 @@ ufs_close(ap) } static int -ufs_accessx(ap) +ufs_accessx( struct vop_accessx_args /* { struct vnode *a_vp; accmode_t a_accmode; struct ucred *a_cred; struct thread *a_td; - } */ *ap; + } */ *ap) { struct vnode *vp = ap->a_vp; struct inode *ip = VTOI(vp); @@ -478,12 +478,12 @@ ufs_accessx(ap) * the comment above cache_fplookup for details. */ static int -ufs_fplookup_vexec(ap) +ufs_fplookup_vexec( struct vop_fplookup_vexec_args /* { struct vnode *a_vp; struct ucred *a_cred; struct thread *a_td; - } */ *ap; + } */ *ap) { struct vnode *vp; struct inode *ip; @@ -574,12 +574,12 @@ ufs_stat(struct vop_stat_args *ap) /* ARGSUSED */ static int -ufs_getattr(ap) +ufs_getattr( struct vop_getattr_args /* { struct vnode *a_vp; struct vattr *a_vap; struct ucred *a_cred; - } */ *ap; + } */ *ap) { struct vnode *vp = ap->a_vp; struct inode *ip = VTOI(vp); @@ -636,12 +636,12 @@ ufs_getattr(ap) * Set attribute vnode op. called from several syscalls */ static int -ufs_setattr(ap) +ufs_setattr( struct vop_setattr_args /* { struct vnode *a_vp; struct vattr *a_vap; struct ucred *a_cred; - } */ *ap; + } */ *ap) { struct vattr *vap = ap->a_vap; struct vnode *vp = ap->a_vp; @@ -828,10 +828,10 @@ ufs_update_nfs4_acl_after_mode_change(struct vnode *vp, int mode, #endif /* UFS_ACL */ static int -ufs_mmapped(ap) +ufs_mmapped( struct vop_mmapped_args /* { struct vnode *a_vp; - } */ *ap; + } */ *ap) { struct vnode *vp; struct inode *ip; @@ -854,11 +854,7 @@ ufs_mmapped(ap) * Inode must be locked before calling. */ static int -ufs_chmod(vp, mode, cred, td) - struct vnode *vp; - int mode; - struct ucred *cred; - struct thread *td; +ufs_chmod(struct vnode *vp, int mode, struct ucred *cred, struct thread *td) { struct inode *ip = VTOI(vp); int newmode, error; @@ -914,12 +910,8 @@ ufs_chmod(vp, mode, cred, 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; @@ -1029,12 +1021,12 @@ ufs_chown(vp, uid, gid, cred, td) } static int -ufs_remove(ap) +ufs_remove( struct vop_remove_args /* { struct vnode *a_dvp; struct vnode *a_vp; struct componentname *a_cnp; - } */ *ap; + } */ *ap) { struct inode *ip; struct vnode *vp = ap->a_vp; @@ -1093,12 +1085,12 @@ print_bad_link_count(const char *funcname, struct vnode *dvp) * link vnode call */ static int -ufs_link(ap) +ufs_link( struct vop_link_args /* { struct vnode *a_tdvp; struct vnode *a_vp; struct componentname *a_cnp; - } */ *ap; + } */ *ap) { struct vnode *vp = ap->a_vp; struct vnode *tdvp = ap->a_tdvp; @@ -1171,12 +1163,12 @@ ufs_link(ap) * whiteout vnode call */ static int -ufs_whiteout(ap) +ufs_whiteout( struct vop_whiteout_args /* { struct vnode *a_dvp; struct componentname *a_cnp; int a_flags; - } */ *ap; + } */ *ap) { struct vnode *dvp = ap->a_dvp; struct componentname *cnp = ap->a_cnp; @@ -1261,7 +1253,7 @@ SYSCTL_INT(_vfs_ufs, OID_AUTO, rename_restarts, CTLFLAG_RD, * directory. */ static int -ufs_rename(ap) +ufs_rename( struct vop_rename_args /* { struct vnode *a_fdvp; struct vnode *a_fvp; @@ -1269,7 +1261,7 @@ ufs_rename(ap) struct vnode *a_tdvp; struct vnode *a_tvp; struct componentname *a_tcnp; - } */ *ap; + } */ *ap) { struct vnode *tvp = ap->a_tvp; struct vnode *tdvp = ap->a_tdvp; @@ -2009,13 +2001,13 @@ ufs_do_nfs4_acl_inheritance(struct vnode *dvp, struct vnode *tvp, * Mkdir system call */ static int -ufs_mkdir(ap) +ufs_mkdir( struct vop_mkdir_args /* { struct vnode *a_dvp; struct vnode **a_vpp; struct componentname *a_cnp; struct vattr *a_vap; - } */ *ap; + } */ *ap) { struct vnode *dvp = ap->a_dvp; struct vattr *vap = ap->a_vap; @@ -2270,12 +2262,12 @@ ufs_mkdir(ap) * Rmdir system call. */ static int -ufs_rmdir(ap) +ufs_rmdir( struct vop_rmdir_args /* { struct vnode *a_dvp; struct vnode *a_vp; struct componentname *a_cnp; - } */ *ap; + } */ *ap) { struct vnode *vp = ap->a_vp; struct vnode *dvp = ap->a_dvp; @@ -2372,14 +2364,14 @@ ufs_rmdir(ap) * symlink -- make a symbolic link */ static int -ufs_symlink(ap) +ufs_symlink( struct vop_symlink_args /* { struct vnode *a_dvp; struct vnode **a_vpp; struct componentname *a_cnp; struct vattr *a_vap; const char *a_target; - } */ *ap; + } */ *ap) { struct vnode *vp, **vpp = ap->a_vpp; struct inode *ip; @@ -2411,7 +2403,7 @@ ufs_symlink(ap) * Vnode op for reading directories. */ int -ufs_readdir(ap) +ufs_readdir( struct vop_readdir_args /* { struct vnode *a_vp; struct uio *a_uio; @@ -2419,7 +2411,7 @@ ufs_readdir(ap) int *a_eofflag; int *a_ncookies; uint64_t **a_cookies; - } */ *ap; + } */ *ap) { struct vnode *vp = ap->a_vp; struct uio *uio = ap->a_uio; @@ -2550,12 +2542,12 @@ ufs_readdir(ap) * Return target name of a symbolic link */ static int -ufs_readlink(ap) +ufs_readlink( struct vop_readlink_args /* { struct vnode *a_vp; struct uio *a_uio; struct ucred *a_cred; - } */ *ap; + } */ *ap) { struct vnode *vp = ap->a_vp; struct inode *ip = VTOI(vp); @@ -2575,11 +2567,11 @@ ufs_readlink(ap) * deadlock on memory. See ufs_bmap() for details. */ static int -ufs_strategy(ap) +ufs_strategy( struct vop_strategy_args /* { struct vnode *a_vp; struct buf *a_bp; - } */ *ap; + } */ *ap) { struct buf *bp = ap->a_bp; struct vnode *vp = ap->a_vp; @@ -2611,10 +2603,10 @@ ufs_strategy(ap) * Print out the contents of an inode. */ static int -ufs_print(ap) +ufs_print( struct vop_print_args /* { struct vnode *a_vp; - } */ *ap; + } */ *ap) { struct vnode *vp = ap->a_vp; struct inode *ip = VTOI(vp); @@ -2640,13 +2632,13 @@ ufs_print(ap) * Update the times on the inode then do device close. */ static int -ufsfifo_close(ap) +ufsfifo_close( struct vop_close_args /* { struct vnode *a_vp; int a_fflag; struct ucred *a_cred; struct thread *a_td; - } */ *ap; + } */ *ap) { struct vnode *vp = ap->a_vp; int usecount; @@ -2663,12 +2655,12 @@ ufsfifo_close(ap) * Return POSIX pathconf information applicable to ufs filesystems. */ static int -ufs_pathconf(ap) +ufs_pathconf( struct vop_pathconf_args /* { struct vnode *a_vp; int a_name; int *a_retval; - } */ *ap; + } */ *ap) { int error; @@ -2767,10 +2759,7 @@ ufs_pathconf(ap) * vnodes. */ int -ufs_vinit(mntp, fifoops, vpp) - struct mount *mntp; - struct vop_vector *fifoops; - struct vnode **vpp; +ufs_vinit(struct mount *mntp, struct vop_vector *fifoops, struct vnode **vpp) { struct inode *ip; struct vnode *vp; @@ -2797,12 +2786,8 @@ ufs_vinit(mntp, fifoops, vpp) * Vnode dvp must be locked. */ static int -ufs_makeinode(mode, dvp, vpp, cnp, callfunc) - int mode; - struct vnode *dvp; - struct vnode **vpp; - struct componentname *cnp; - const char *callfunc; +ufs_makeinode(int mode, struct vnode *dvp, struct vnode **vpp, + struct componentname *cnp, const char *callfunc) { struct inode *ip, *pdir; struct direct newdir;