git: 8d4ccb9da296 - stable/13 - Rewrite function definitions in the UFS/FFS code base with identifier lists.

From: Kirk McKusick <mckusick_at_FreeBSD.org>
Date: Wed, 20 Jul 2022 19:50:23 UTC
The branch stable/13 has been updated by mckusick:

URL: https://cgit.FreeBSD.org/src/commit/?id=8d4ccb9da296b32696854804ac18b4bb91f56f82

commit 8d4ccb9da296b32696854804ac18b4bb91f56f82
Author:     Kirk McKusick <mckusick@FreeBSD.org>
AuthorDate: 2022-07-13 21:06:43 +0000
Commit:     Kirk McKusick <mckusick@FreeBSD.org>
CommitDate: 2022-07-20 19:47:09 +0000

    Rewrite function definitions in the UFS/FFS code base with identifier lists.
    
    No functional change to the code.
    
    (cherry picked from commit 064e6b4303d8aec9cfd27653d4dd2abea829a6c7)
    
    Fixes to build from 064e6b4:
    
    (cherry picked from commit c792466f878a082a63683d3a8a1f7b468081d835)
    
    (cherry picked from commit 2e66649e4f34188d92bd32b5ba7fde8d1e86ef40)
---
 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   |   17 +-
 sys/ufs/ufs/ufs_vnops.c    |  111 ++-
 13 files changed, 1209 insertions(+), 1635 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 @@ nospace:
  * 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 @@ fail:
 }
 
 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 @@ fail:
  *      available inode is located.
  */
 int
-ffs_valloc(pvp, mode, cred, vpp)
-	struct vnode *pvp;
-	int mode;
-	struct ucred *cred;
-	struct vnode **vpp;
+ffs_valloc(struct vnode *pvp,
+	int mode,
+	struct ucred *cred,
+	struct vnode **vpp)
 {
 	struct inode *pip;
 	struct fs *fs;
@@ -1234,8 +1235,7 @@ noinodes:
  * in another cylinder group.
  */
 static ino_t
-ffs_dirpref(pip)
-	struct inode *pip;
+ffs_dirpref(struct inode *pip)
 {
 	struct fs *fs;
 	int cg, prefcg, dirsize, cgsize;
@@ -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 @@ fail:
  * 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 @@ fail:
  * 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 @@ gotit:
  * 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 @@ gotit:
  * 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 3c1903fcbae6..1aef2bb57930 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 @@ loop:
  * 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 @@ extclean:
  * 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 dbn,
+	ufs2_daddr_t lastbn,
+	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 486288c7e659..5d5fb783e7d0 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 @@ out:
  * 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 @@ out:
  * 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;
@@ -1121,20 +1106,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;
@@ -1198,12 +1181,12 @@ out:
  * 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;
 
@@ -1216,12 +1199,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;
@@ -1269,12 +1252,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;
@@ -1310,14 +1293,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;
@@ -1407,20 +1389,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;
@@ -1484,12 +1464,12 @@ out:
  * 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;
 
@@ -1502,12 +1482,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;
@@ -1555,12 +1535,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;
@@ -1593,8 +1573,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;
@@ -1642,8 +1621,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;
@@ -1772,14 +1750,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;
@@ -1991,8 +1968,7 @@ retry:
  * 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;
@@ -2131,8 +2107,7 @@ ffs_snapshot_mount(mp)
  * Disassociate snapshot files when unmounting.
  */
 void
-ffs_snapshot_unmount(mp)
*** 5035 LINES SKIPPED ***