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
This commit is contained in:
Kirk McKusick 2022-07-13 14:06:43 -07:00
parent 0a92a9fca7
commit 064e6b4303
13 changed files with 1209 additions and 1636 deletions

View File

@ -148,12 +148,13 @@ static void ffs_ckhash_cg(struct buf *);
* available block is located. * available block is located.
*/ */
int int
ffs_alloc(ip, lbn, bpref, size, flags, cred, bnp) ffs_alloc(struct inode *ip,
struct inode *ip; ufs2_daddr_t lbn,
ufs2_daddr_t lbn, bpref; ufs2_daddr_t bpref,
int size, flags; int size,
struct ucred *cred; int flags,
ufs2_daddr_t *bnp; struct ucred *cred,
ufs2_daddr_t *bnp)
{ {
struct fs *fs; struct fs *fs;
struct ufsmount *ump; struct ufsmount *ump;
@ -248,14 +249,15 @@ ffs_alloc(ip, lbn, bpref, size, flags, cred, bnp)
* invoked to get an appropriate block. * invoked to get an appropriate block.
*/ */
int int
ffs_realloccg(ip, lbprev, bprev, bpref, osize, nsize, flags, cred, bpp) ffs_realloccg(struct inode *ip,
struct inode *ip; ufs2_daddr_t lbprev,
ufs2_daddr_t lbprev; ufs2_daddr_t bprev,
ufs2_daddr_t bprev; ufs2_daddr_t bpref,
ufs2_daddr_t bpref; int osize,
int osize, nsize, flags; int nsize,
struct ucred *cred; int flags,
struct buf **bpp; struct ucred *cred,
struct buf **bpp)
{ {
struct vnode *vp; struct vnode *vp;
struct fs *fs; struct fs *fs;
@ -514,11 +516,11 @@ SYSCTL_INT(_debug, OID_AUTO, ffs_prtrealloc, CTLFLAG_RW, &prtrealloc, 0,
#endif #endif
int int
ffs_reallocblks(ap) ffs_reallocblks(
struct vop_reallocblks_args /* { struct vop_reallocblks_args /* {
struct vnode *a_vp; struct vnode *a_vp;
struct cluster_save *a_buflist; struct cluster_save *a_buflist;
} */ *ap; } */ *ap)
{ {
struct ufsmount *ump; struct ufsmount *ump;
int error; int error;
@ -559,11 +561,11 @@ ffs_reallocblks(ap)
} }
static int static int
ffs_reallocblks_ufs1(ap) ffs_reallocblks_ufs1(
struct vop_reallocblks_args /* { struct vop_reallocblks_args /* {
struct vnode *a_vp; struct vnode *a_vp;
struct cluster_save *a_buflist; struct cluster_save *a_buflist;
} */ *ap; } */ *ap)
{ {
struct fs *fs; struct fs *fs;
struct inode *ip; struct inode *ip;
@ -825,11 +827,11 @@ ffs_reallocblks_ufs1(ap)
} }
static int static int
ffs_reallocblks_ufs2(ap) ffs_reallocblks_ufs2(
struct vop_reallocblks_args /* { struct vop_reallocblks_args /* {
struct vnode *a_vp; struct vnode *a_vp;
struct cluster_save *a_buflist; struct cluster_save *a_buflist;
} */ *ap; } */ *ap)
{ {
struct fs *fs; struct fs *fs;
struct inode *ip; struct inode *ip;
@ -1104,11 +1106,10 @@ ffs_reallocblks_ufs2(ap)
* available inode is located. * available inode is located.
*/ */
int int
ffs_valloc(pvp, mode, cred, vpp) ffs_valloc(struct vnode *pvp,
struct vnode *pvp; int mode,
int mode; struct ucred *cred,
struct ucred *cred; struct vnode **vpp)
struct vnode **vpp;
{ {
struct inode *pip; struct inode *pip;
struct fs *fs; struct fs *fs;
@ -1234,8 +1235,7 @@ ffs_valloc(pvp, mode, cred, vpp)
* in another cylinder group. * in another cylinder group.
*/ */
static ino_t static ino_t
ffs_dirpref(pip) ffs_dirpref(struct inode *pip)
struct inode *pip;
{ {
struct fs *fs; struct fs *fs;
int cg, prefcg, dirsize, cgsize; int cg, prefcg, dirsize, cgsize;
@ -1381,11 +1381,10 @@ ffs_dirpref(pip)
* allocate blocks contiguously within the section if possible. * allocate blocks contiguously within the section if possible.
*/ */
ufs2_daddr_t ufs2_daddr_t
ffs_blkpref_ufs1(ip, lbn, indx, bap) ffs_blkpref_ufs1(struct inode *ip,
struct inode *ip; ufs_lbn_t lbn,
ufs_lbn_t lbn; int indx,
int indx; ufs1_daddr_t *bap)
ufs1_daddr_t *bap;
{ {
struct fs *fs; struct fs *fs;
u_int cg, inocg; u_int cg, inocg;
@ -1494,11 +1493,10 @@ ffs_blkpref_ufs1(ip, lbn, indx, bap)
* Same as above, but for UFS2 * Same as above, but for UFS2
*/ */
ufs2_daddr_t ufs2_daddr_t
ffs_blkpref_ufs2(ip, lbn, indx, bap) ffs_blkpref_ufs2(struct inode *ip,
struct inode *ip; ufs_lbn_t lbn,
ufs_lbn_t lbn; int indx,
int indx; ufs2_daddr_t *bap)
ufs2_daddr_t *bap;
{ {
struct fs *fs; struct fs *fs;
u_int cg, inocg; u_int cg, inocg;
@ -1616,13 +1614,12 @@ ffs_blkpref_ufs2(ip, lbn, indx, bap)
*/ */
/*VARARGS5*/ /*VARARGS5*/
static ufs2_daddr_t static ufs2_daddr_t
ffs_hashalloc(ip, cg, pref, size, rsize, allocator) ffs_hashalloc(struct inode *ip,
struct inode *ip; u_int cg,
u_int cg; ufs2_daddr_t pref,
ufs2_daddr_t pref; int size, /* Search size for data blocks, mode for inodes */
int size; /* Search size for data blocks, mode for inodes */ int rsize, /* Real allocated size. */
int rsize; /* Real allocated size. */ allocfcn_t *allocator)
allocfcn_t *allocator;
{ {
struct fs *fs; struct fs *fs;
ufs2_daddr_t result; ufs2_daddr_t result;
@ -1675,11 +1672,11 @@ ffs_hashalloc(ip, cg, pref, size, rsize, allocator)
* if they are, allocate them. * if they are, allocate them.
*/ */
static ufs2_daddr_t static ufs2_daddr_t
ffs_fragextend(ip, cg, bprev, osize, nsize) ffs_fragextend(struct inode *ip,
struct inode *ip; u_int cg,
u_int cg; ufs2_daddr_t bprev,
ufs2_daddr_t bprev; int osize,
int osize, nsize; int nsize)
{ {
struct fs *fs; struct fs *fs;
struct cg *cgp; struct cg *cgp;
@ -1752,12 +1749,11 @@ ffs_fragextend(ip, cg, bprev, osize, nsize)
* and if it is, allocate it. * and if it is, allocate it.
*/ */
static ufs2_daddr_t static ufs2_daddr_t
ffs_alloccg(ip, cg, bpref, size, rsize) ffs_alloccg(struct inode *ip,
struct inode *ip; u_int cg,
u_int cg; ufs2_daddr_t bpref,
ufs2_daddr_t bpref; int size,
int size; int rsize)
int rsize;
{ {
struct fs *fs; struct fs *fs;
struct cg *cgp; struct cg *cgp;
@ -1849,11 +1845,10 @@ ffs_alloccg(ip, cg, bpref, size, rsize)
* blocks may be fragmented by the routine that allocates them. * blocks may be fragmented by the routine that allocates them.
*/ */
static ufs2_daddr_t static ufs2_daddr_t
ffs_alloccgblk(ip, bp, bpref, size) ffs_alloccgblk(struct inode *ip,
struct inode *ip; struct buf *bp,
struct buf *bp; ufs2_daddr_t bpref,
ufs2_daddr_t bpref; int size)
int size;
{ {
struct fs *fs; struct fs *fs;
struct cg *cgp; struct cg *cgp;
@ -1932,11 +1927,10 @@ ffs_alloccgblk(ip, bp, bpref, size)
* take the first one that we find following bpref. * take the first one that we find following bpref.
*/ */
static ufs2_daddr_t static ufs2_daddr_t
ffs_clusteralloc(ip, cg, bpref, len) ffs_clusteralloc(struct inode *ip,
struct inode *ip; u_int cg,
u_int cg; ufs2_daddr_t bpref,
ufs2_daddr_t bpref; int len)
int len;
{ {
struct fs *fs; struct fs *fs;
struct cg *cgp; struct cg *cgp;
@ -2043,7 +2037,10 @@ ffs_clusteralloc(ip, cg, bpref, len)
} }
static inline struct buf * 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; struct fs *fs;
@ -2073,12 +2070,11 @@ SYSCTL_INT(_vfs_ffs, OID_AUTO, doasyncinodeinit, CTLFLAG_RWTUN,
* inode in the specified cylinder group. * inode in the specified cylinder group.
*/ */
static ufs2_daddr_t static ufs2_daddr_t
ffs_nodealloccg(ip, cg, ipref, mode, unused) ffs_nodealloccg(struct inode *ip,
struct inode *ip; u_int cg,
u_int cg; ufs2_daddr_t ipref,
ufs2_daddr_t ipref; int mode,
int mode; int unused)
int unused;
{ {
struct fs *fs; struct fs *fs;
struct cg *cgp; struct cg *cgp;
@ -2230,14 +2226,13 @@ ffs_nodealloccg(ip, cg, ipref, mode, unused)
* block reassembly is checked. * block reassembly is checked.
*/ */
static void static void
ffs_blkfree_cg(ump, fs, devvp, bno, size, inum, dephd) ffs_blkfree_cg(struct ufsmount *ump,
struct ufsmount *ump; struct fs *fs,
struct fs *fs; struct vnode *devvp,
struct vnode *devvp; ufs2_daddr_t bno,
ufs2_daddr_t bno; long size,
long size; ino_t inum,
ino_t inum; struct workhead *dephd)
struct workhead *dephd;
{ {
struct mount *mp; struct mount *mp;
struct cg *cgp; 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). * Called on trim completion to start a task to free the associated block(s).
*/ */
static void static void
ffs_blkfree_trim_completed(bp) ffs_blkfree_trim_completed(struct buf *bp)
struct buf *bp;
{ {
struct ffs_blkfree_trim_params *tp; struct ffs_blkfree_trim_params *tp;
@ -2437,9 +2431,7 @@ ffs_blkfree_trim_completed(bp)
* Trim completion task that free associated block(s). * Trim completion task that free associated block(s).
*/ */
static void static void
ffs_blkfree_trim_task(ctx, pending) ffs_blkfree_trim_task(void *ctx, int pending)
void *ctx;
int pending;
{ {
struct ffs_blkfree_trim_params *tp; struct ffs_blkfree_trim_params *tp;
struct trim_blkreq *blkelm; struct trim_blkreq *blkelm;
@ -2466,14 +2458,13 @@ ffs_blkfree_trim_task(ctx, pending)
* Allocate if requested (NEW, REPLACE, SINGLE). * Allocate if requested (NEW, REPLACE, SINGLE).
*/ */
static struct ffs_blkfree_trim_params * static struct ffs_blkfree_trim_params *
trim_lookup(ump, devvp, bno, size, inum, key, alloctype) trim_lookup(struct ufsmount *ump,
struct ufsmount *ump; struct vnode *devvp,
struct vnode *devvp; ufs2_daddr_t bno,
ufs2_daddr_t bno; long size,
long size; ino_t inum,
ino_t inum; u_long key,
u_long key; int alloctype)
int alloctype;
{ {
struct trimlist_hashhead *tphashhead; struct trimlist_hashhead *tphashhead;
struct ffs_blkfree_trim_params *tp, *ntp; struct ffs_blkfree_trim_params *tp, *ntp;
@ -2527,9 +2518,8 @@ trim_lookup(ump, devvp, bno, size, inum, key, alloctype)
* Dispatch a trim request. * Dispatch a trim request.
*/ */
static void static void
ffs_blkfree_sendtrim(tp) ffs_blkfree_sendtrim(struct ffs_blkfree_trim_params *tp)
struct ffs_blkfree_trim_params *tp; {
{
struct ufsmount *ump; struct ufsmount *ump;
struct mount *mp; struct mount *mp;
struct buf *bp; struct buf *bp;
@ -2563,10 +2553,9 @@ ffs_blkfree_sendtrim(tp)
* Allocate a new key to use to identify a range of blocks. * Allocate a new key to use to identify a range of blocks.
*/ */
u_long u_long
ffs_blkrelease_start(ump, devvp, inum) ffs_blkrelease_start(struct ufsmount *ump,
struct ufsmount *ump; struct vnode *devvp,
struct vnode *devvp; ino_t inum)
ino_t inum;
{ {
static u_long masterkey; static u_long masterkey;
u_long key; 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. * Deallocate a key that has been used to identify a range of blocks.
*/ */
void void
ffs_blkrelease_finish(ump, key) ffs_blkrelease_finish(struct ufsmount *ump, u_long key)
struct ufsmount *ump;
u_long key;
{ {
struct ffs_blkfree_trim_params *tp; struct ffs_blkfree_trim_params *tp;
@ -2632,16 +2619,15 @@ ffs_blkrelease_finish(ump, key)
* aggregate consecutive blocks into a single trim request. * aggregate consecutive blocks into a single trim request.
*/ */
void void
ffs_blkfree(ump, fs, devvp, bno, size, inum, vtype, dephd, key) ffs_blkfree(struct ufsmount *ump,
struct ufsmount *ump; struct fs *fs,
struct fs *fs; struct vnode *devvp,
struct vnode *devvp; ufs2_daddr_t bno,
ufs2_daddr_t bno; long size,
long size; ino_t inum,
ino_t inum; enum vtype vtype,
enum vtype vtype; struct workhead *dephd,
struct workhead *dephd; u_long key)
u_long key;
{ {
struct ffs_blkfree_trim_params *tp, *ntp; struct ffs_blkfree_trim_params *tp, *ntp;
struct trim_blkreq *blkelm; 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. * fragment is allocated, false if it is free.
*/ */
static int static int
ffs_checkblk(ip, bno, size) ffs_checkblk(struct inode *ip,
struct inode *ip; ufs2_daddr_t bno,
ufs2_daddr_t bno; long size)
long size;
{ {
struct fs *fs; struct fs *fs;
struct cg *cgp; struct cg *cgp;
@ -2784,10 +2769,9 @@ ffs_checkblk(ip, bno, size)
* Free an inode. * Free an inode.
*/ */
int int
ffs_vfree(pvp, ino, mode) ffs_vfree(struct vnode *pvp,
struct vnode *pvp; ino_t ino,
ino_t ino; int mode)
int mode;
{ {
struct ufsmount *ump; struct ufsmount *ump;
@ -2804,13 +2788,12 @@ ffs_vfree(pvp, ino, mode)
* The specified inode is placed back in the free map. * The specified inode is placed back in the free map.
*/ */
int int
ffs_freefile(ump, fs, devvp, ino, mode, wkhd) ffs_freefile(struct ufsmount *ump,
struct ufsmount *ump; struct fs *fs,
struct fs *fs; struct vnode *devvp,
struct vnode *devvp; ino_t ino,
ino_t ino; int mode,
int mode; struct workhead *wkhd)
struct workhead *wkhd;
{ {
struct cg *cgp; struct cg *cgp;
struct buf *bp; struct buf *bp;
@ -2886,10 +2869,9 @@ ffs_freefile(ump, fs, devvp, ino, mode, wkhd)
* Used to check for allocated files in snapshots. * Used to check for allocated files in snapshots.
*/ */
int int
ffs_checkfreefile(fs, devvp, ino) ffs_checkfreefile(struct fs *fs,
struct fs *fs; struct vnode *devvp,
struct vnode *devvp; ino_t ino)
ino_t ino;
{ {
struct cg *cgp; struct cg *cgp;
struct buf *bp; struct buf *bp;
@ -2918,11 +2900,10 @@ ffs_checkfreefile(fs, devvp, ino)
* available. * available.
*/ */
static ufs1_daddr_t static ufs1_daddr_t
ffs_mapsearch(fs, cgp, bpref, allocsiz) ffs_mapsearch(struct fs *fs,
struct fs *fs; struct cg *cgp,
struct cg *cgp; ufs2_daddr_t bpref,
ufs2_daddr_t bpref; int allocsiz)
int allocsiz;
{ {
ufs1_daddr_t bno; ufs1_daddr_t bno;
int start, len, loc, i; int start, len, loc, i;
@ -2991,13 +2972,12 @@ ffs_getmntstat(struct vnode *devvp)
* Fetch and verify a cylinder group. * Fetch and verify a cylinder group.
*/ */
int int
ffs_getcg(fs, devvp, cg, flags, bpp, cgpp) ffs_getcg(struct fs *fs,
struct fs *fs; struct vnode *devvp,
struct vnode *devvp; u_int cg,
u_int cg; int flags,
int flags; struct buf **bpp,
struct buf **bpp; struct cg **cgpp)
struct cg **cgpp;
{ {
struct buf *bp; struct buf *bp;
struct cg *cgp; struct cg *cgp;
@ -3068,8 +3048,7 @@ ffs_getcg(fs, devvp, cg, flags, bpp, cgpp)
} }
static void static void
ffs_ckhash_cg(bp) ffs_ckhash_cg(struct buf *bp)
struct buf *bp;
{ {
uint32_t ckhash; uint32_t ckhash;
struct cg *cgp; struct cg *cgp;
@ -3088,10 +3067,9 @@ ffs_ckhash_cg(bp)
* fs: error message * fs: error message
*/ */
void void
ffs_fserr(fs, inum, cp) ffs_fserr(struct fs *fs,
struct fs *fs; ino_t inum,
ino_t inum; char *cp)
char *cp;
{ {
struct thread *td = curthread; /* XXX */ struct thread *td = curthread; /* XXX */
struct proc *p = td->td_proc; struct proc *p = td->td_proc;

View File

@ -95,9 +95,7 @@ ffs_inode_bwrite(struct vnode *vp, struct buf *bp, int flags)
* for the write to complete. * for the write to complete.
*/ */
int int
ffs_update(vp, waitfor) ffs_update(struct vnode *vp, int waitfor)
struct vnode *vp;
int waitfor;
{ {
struct fs *fs; struct fs *fs;
struct buf *bp; struct buf *bp;
@ -234,11 +232,10 @@ ffs_update(vp, waitfor)
* disk blocks. * disk blocks.
*/ */
int int
ffs_truncate(vp, length, flags, cred) ffs_truncate(struct vnode *vp,
struct vnode *vp; off_t length,
off_t length; int flags,
int flags; struct ucred *cred)
struct ucred *cred;
{ {
struct inode *ip; struct inode *ip;
ufs2_daddr_t bn, lbn, lastblock, lastiblock[UFS_NIADDR]; ufs2_daddr_t bn, lbn, lastblock, lastiblock[UFS_NIADDR];
@ -695,12 +692,12 @@ ffs_truncate(vp, length, flags, cred)
* blocks. * blocks.
*/ */
static int static int
ffs_indirtrunc(ip, lbn, dbn, lastbn, level, countp) ffs_indirtrunc(struct inode *ip,
struct inode *ip; ufs2_daddr_t lbn,
ufs2_daddr_t lbn, lastbn; ufs2_daddr_t lastbn,
ufs2_daddr_t dbn; ufs2_daddr_t dbn,
int level; int level,
ufs2_daddr_t *countp; ufs2_daddr_t *countp)
{ {
struct buf *bp; struct buf *bp;
struct fs *fs; struct fs *fs;

View File

@ -80,62 +80,51 @@ __FBSDID("$FreeBSD$");
#ifdef NO_FFS_SNAPSHOT #ifdef NO_FFS_SNAPSHOT
int int
ffs_snapshot(mp, snapfile) ffs_snapshot(struct mount *mp, char *snapfile)
struct mount *mp;
char *snapfile;
{ {
return (EINVAL); return (EINVAL);
} }
int int
ffs_snapblkfree(fs, devvp, bno, size, inum, vtype, wkhd) ffs_snapblkfree(struct fs *fs,
struct fs *fs; struct vnode *devvp,
struct vnode *devvp; ufs2_daddr_t bno,
ufs2_daddr_t bno; long size,
long size; ino_t inum,
ino_t inum; enum vtype vtype,
enum vtype vtype; struct workhead *wkhd)
struct workhead *wkhd;
{ {
return (EINVAL); return (EINVAL);
} }
void void
ffs_snapremove(vp) ffs_snapremove(struct vnode *vp)
struct vnode *vp;
{ {
} }
void void
ffs_snapshot_mount(mp) ffs_snapshot_mount(struct mount *mp)
struct mount *mp;
{ {
} }
void void
ffs_snapshot_unmount(mp) ffs_snapshot_unmount(struct mount *mp)
struct mount *mp;
{ {
} }
void void
ffs_snapgone(ip) ffs_snapgone(struct inode *ip)
struct inode *ip;
{ {
} }
int int
ffs_copyonwrite(devvp, bp) ffs_copyonwrite(struct vnode *devvp, struct buf *bp)
struct vnode *devvp;
struct buf *bp;
{ {
return (EINVAL); return (EINVAL);
} }
void void
ffs_sync_snap(mp, waitfor) ffs_sync_snap(struct mount *mp, int waitfor)
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. * Create a snapshot file and initialize it for the filesystem.
*/ */
int int
ffs_snapshot(mp, snapfile) ffs_snapshot(struct mount *mp, char *snapfile)
struct mount *mp;
char *snapfile;
{ {
ufs2_daddr_t numblks, blkno, *blkp, *snapblklist; ufs2_daddr_t numblks, blkno, *blkp, *snapblklist;
int error, cg, snaploc; int error, cg, snaploc;
@ -906,11 +893,10 @@ ffs_snapshot(mp, snapfile)
* replacement pass is done. * replacement pass is done.
*/ */
static int static int
cgaccount(cg, vp, nbp, passno) cgaccount(int cg,
int cg; struct vnode *vp,
struct vnode *vp; struct buf *nbp,
struct buf *nbp; int passno)
int passno;
{ {
struct buf *bp, *ibp; struct buf *bp, *ibp;
struct inode *ip; struct inode *ip;
@ -1026,14 +1012,13 @@ cgaccount(cg, vp, nbp, passno)
* is reproduced once each for UFS1 and UFS2. * is reproduced once each for UFS1 and UFS2.
*/ */
static int static int
expunge_ufs1(snapvp, cancelip, fs, acctfunc, expungetype, clearmode) expunge_ufs1(struct vnode *snapvp,
struct vnode *snapvp; struct inode *cancelip,
struct inode *cancelip; struct fs *fs,
struct fs *fs;
int (*acctfunc)(struct vnode *, ufs1_daddr_t *, ufs1_daddr_t *, int (*acctfunc)(struct vnode *, ufs1_daddr_t *, ufs1_daddr_t *,
struct fs *, ufs_lbn_t, int); struct fs *, ufs_lbn_t, int),
int expungetype; int expungetype,
int clearmode; int clearmode)
{ {
int i, error, indiroff; int i, error, indiroff;
ufs_lbn_t lbn, rlbn; ufs_lbn_t lbn, rlbn;
@ -1122,20 +1107,18 @@ expunge_ufs1(snapvp, cancelip, fs, acctfunc, expungetype, clearmode)
* its indirect blocks in snapvp. * its indirect blocks in snapvp.
*/ */
static int static int
indiracct_ufs1(snapvp, cancelvp, level, blkno, lbn, rlbn, remblks, indiracct_ufs1(struct vnode *snapvp,
blksperindir, fs, acctfunc, expungetype) struct vnode *cancelvp,
struct vnode *snapvp; int level,
struct vnode *cancelvp; ufs1_daddr_t blkno,
int level; ufs_lbn_t lbn,
ufs1_daddr_t blkno; ufs_lbn_t rlbn,
ufs_lbn_t lbn; ufs_lbn_t remblks,
ufs_lbn_t rlbn; ufs_lbn_t blksperindir,
ufs_lbn_t remblks; struct fs *fs,
ufs_lbn_t blksperindir;
struct fs *fs;
int (*acctfunc)(struct vnode *, ufs1_daddr_t *, ufs1_daddr_t *, int (*acctfunc)(struct vnode *, ufs1_daddr_t *, ufs1_daddr_t *,
struct fs *, ufs_lbn_t, int); struct fs *, ufs_lbn_t, int),
int expungetype; int expungetype)
{ {
int error, num, i; int error, num, i;
ufs_lbn_t subblksperindir; ufs_lbn_t subblksperindir;
@ -1199,12 +1182,12 @@ indiracct_ufs1(snapvp, cancelvp, level, blkno, lbn, rlbn, remblks,
* Do both snap accounting and map accounting. * Do both snap accounting and map accounting.
*/ */
static int static int
fullacct_ufs1(vp, oldblkp, lastblkp, fs, lblkno, exptype) fullacct_ufs1(struct vnode *vp,
struct vnode *vp; ufs1_daddr_t *oldblkp,
ufs1_daddr_t *oldblkp, *lastblkp; ufs1_daddr_t *lastblkp,
struct fs *fs; struct fs *fs,
ufs_lbn_t lblkno; ufs_lbn_t lblkno,
int exptype; /* BLK_SNAP or BLK_NOCOPY */ int exptype) /* BLK_SNAP or BLK_NOCOPY */
{ {
int error; int error;
@ -1217,12 +1200,12 @@ fullacct_ufs1(vp, oldblkp, lastblkp, fs, lblkno, exptype)
* Identify a set of blocks allocated in a snapshot inode. * Identify a set of blocks allocated in a snapshot inode.
*/ */
static int static int
snapacct_ufs1(vp, oldblkp, lastblkp, fs, lblkno, expungetype) snapacct_ufs1(struct vnode *vp,
struct vnode *vp; ufs1_daddr_t *oldblkp,
ufs1_daddr_t *oldblkp, *lastblkp; ufs1_daddr_t *lastblkp,
struct fs *fs; struct fs *fs,
ufs_lbn_t lblkno; ufs_lbn_t lblkno,
int expungetype; /* BLK_SNAP or BLK_NOCOPY */ int expungetype) /* BLK_SNAP or BLK_NOCOPY */
{ {
struct inode *ip = VTOI(vp); struct inode *ip = VTOI(vp);
ufs1_daddr_t blkno, *blkp; 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. * Account for a set of blocks allocated in a snapshot inode.
*/ */
static int static int
mapacct_ufs1(vp, oldblkp, lastblkp, fs, lblkno, expungetype) mapacct_ufs1(struct vnode *vp,
struct vnode *vp; ufs1_daddr_t *oldblkp,
ufs1_daddr_t *oldblkp, *lastblkp; ufs1_daddr_t *lastblkp,
struct fs *fs; struct fs *fs,
ufs_lbn_t lblkno; ufs_lbn_t lblkno,
int expungetype; int expungetype)
{ {
ufs1_daddr_t blkno; ufs1_daddr_t blkno;
struct inode *ip; struct inode *ip;
@ -1311,14 +1294,13 @@ mapacct_ufs1(vp, oldblkp, lastblkp, fs, lblkno, expungetype)
* is reproduced once each for UFS1 and UFS2. * is reproduced once each for UFS1 and UFS2.
*/ */
static int static int
expunge_ufs2(snapvp, cancelip, fs, acctfunc, expungetype, clearmode) expunge_ufs2(struct vnode *snapvp,
struct vnode *snapvp; struct inode *cancelip,
struct inode *cancelip; struct fs *fs,
struct fs *fs;
int (*acctfunc)(struct vnode *, ufs2_daddr_t *, ufs2_daddr_t *, int (*acctfunc)(struct vnode *, ufs2_daddr_t *, ufs2_daddr_t *,
struct fs *, ufs_lbn_t, int); struct fs *, ufs_lbn_t, int),
int expungetype; int expungetype,
int clearmode; int clearmode)
{ {
int i, error, indiroff; int i, error, indiroff;
ufs_lbn_t lbn, rlbn; ufs_lbn_t lbn, rlbn;
@ -1409,20 +1391,18 @@ expunge_ufs2(snapvp, cancelip, fs, acctfunc, expungetype, clearmode)
* its indirect blocks in snapvp. * its indirect blocks in snapvp.
*/ */
static int static int
indiracct_ufs2(snapvp, cancelvp, level, blkno, lbn, rlbn, remblks, indiracct_ufs2(struct vnode *snapvp,
blksperindir, fs, acctfunc, expungetype) struct vnode *cancelvp,
struct vnode *snapvp; int level,
struct vnode *cancelvp; ufs2_daddr_t blkno,
int level; ufs_lbn_t lbn,
ufs2_daddr_t blkno; ufs_lbn_t rlbn,
ufs_lbn_t lbn; ufs_lbn_t remblks,
ufs_lbn_t rlbn; ufs_lbn_t blksperindir,
ufs_lbn_t remblks; struct fs *fs,
ufs_lbn_t blksperindir;
struct fs *fs;
int (*acctfunc)(struct vnode *, ufs2_daddr_t *, ufs2_daddr_t *, int (*acctfunc)(struct vnode *, ufs2_daddr_t *, ufs2_daddr_t *,
struct fs *, ufs_lbn_t, int); struct fs *, ufs_lbn_t, int),
int expungetype; int expungetype)
{ {
int error, num, i; int error, num, i;
ufs_lbn_t subblksperindir; ufs_lbn_t subblksperindir;
@ -1486,12 +1466,12 @@ indiracct_ufs2(snapvp, cancelvp, level, blkno, lbn, rlbn, remblks,
* Do both snap accounting and map accounting. * Do both snap accounting and map accounting.
*/ */
static int static int
fullacct_ufs2(vp, oldblkp, lastblkp, fs, lblkno, exptype) fullacct_ufs2(struct vnode *vp,
struct vnode *vp; ufs2_daddr_t *oldblkp,
ufs2_daddr_t *oldblkp, *lastblkp; ufs2_daddr_t *lastblkp,
struct fs *fs; struct fs *fs,
ufs_lbn_t lblkno; ufs_lbn_t lblkno,
int exptype; /* BLK_SNAP or BLK_NOCOPY */ int exptype) /* BLK_SNAP or BLK_NOCOPY */
{ {
int error; int error;
@ -1504,12 +1484,12 @@ fullacct_ufs2(vp, oldblkp, lastblkp, fs, lblkno, exptype)
* Identify a set of blocks allocated in a snapshot inode. * Identify a set of blocks allocated in a snapshot inode.
*/ */
static int static int
snapacct_ufs2(vp, oldblkp, lastblkp, fs, lblkno, expungetype) snapacct_ufs2(struct vnode *vp,
struct vnode *vp; ufs2_daddr_t *oldblkp,
ufs2_daddr_t *oldblkp, *lastblkp; ufs2_daddr_t *lastblkp,
struct fs *fs; struct fs *fs,
ufs_lbn_t lblkno; ufs_lbn_t lblkno,
int expungetype; /* BLK_SNAP or BLK_NOCOPY */ int expungetype) /* BLK_SNAP or BLK_NOCOPY */
{ {
struct inode *ip = VTOI(vp); struct inode *ip = VTOI(vp);
ufs2_daddr_t blkno, *blkp; 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. * Account for a set of blocks allocated in a snapshot inode.
*/ */
static int static int
mapacct_ufs2(vp, oldblkp, lastblkp, fs, lblkno, expungetype) mapacct_ufs2(struct vnode *vp,
struct vnode *vp; ufs2_daddr_t *oldblkp,
ufs2_daddr_t *oldblkp, *lastblkp; ufs2_daddr_t *lastblkp,
struct fs *fs; struct fs *fs,
ufs_lbn_t lblkno; ufs_lbn_t lblkno,
int expungetype; int expungetype)
{ {
ufs2_daddr_t blkno; ufs2_daddr_t blkno;
struct inode *ip; 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. * It will not be freed until the last open reference goes away.
*/ */
void void
ffs_snapgone(ip) ffs_snapgone(struct inode *ip)
struct inode *ip;
{ {
struct inode *xp; struct inode *xp;
struct fs *fs; struct fs *fs;
@ -1644,8 +1623,7 @@ ffs_snapgone(ip)
* Prepare a snapshot file for being removed. * Prepare a snapshot file for being removed.
*/ */
void void
ffs_snapremove(vp) ffs_snapremove(struct vnode *vp)
struct vnode *vp;
{ {
struct inode *ip; struct inode *ip;
struct vnode *devvp; struct vnode *devvp;
@ -1774,14 +1752,13 @@ ffs_snapremove(vp)
* must always have been allocated from a BLK_NOCOPY location. * must always have been allocated from a BLK_NOCOPY location.
*/ */
int int
ffs_snapblkfree(fs, devvp, bno, size, inum, vtype, wkhd) ffs_snapblkfree(struct fs *fs,
struct fs *fs; struct vnode *devvp,
struct vnode *devvp; ufs2_daddr_t bno,
ufs2_daddr_t bno; long size,
long size; ino_t inum,
ino_t inum; enum vtype vtype,
enum vtype vtype; struct workhead *wkhd)
struct workhead *wkhd;
{ {
struct buf *ibp, *cbp, *savedcbp = NULL; struct buf *ibp, *cbp, *savedcbp = NULL;
struct thread *td = curthread; struct thread *td = curthread;
@ -1993,8 +1970,7 @@ ffs_snapblkfree(fs, devvp, bno, size, inum, vtype, wkhd)
* Associate snapshot files when mounting. * Associate snapshot files when mounting.
*/ */
void void
ffs_snapshot_mount(mp) ffs_snapshot_mount(struct mount *mp)
struct mount *mp;
{ {
struct ufsmount *ump = VFSTOUFS(mp); struct ufsmount *ump = VFSTOUFS(mp);
struct vnode *devvp = ump->um_devvp; struct vnode *devvp = ump->um_devvp;
@ -2133,8 +2109,7 @@ ffs_snapshot_mount(mp)
* Disassociate snapshot files when unmounting. * Disassociate snapshot files when unmounting.
*/ */
void void
ffs_snapshot_unmount(mp) ffs_snapshot_unmount(struct mount *mp)
struct mount *mp;
{ {
struct vnode *devvp = VFSTOUFS(mp)->um_devvp; struct vnode *devvp = VFSTOUFS(mp)->um_devvp;
struct snapdata *sn; struct snapdata *sn;
@ -2169,9 +2144,7 @@ ffs_snapshot_unmount(mp)
* leaved locked upon exit. * leaved locked upon exit.
*/ */
static int static int
ffs_bp_snapblk(devvp, bp) ffs_bp_snapblk(struct vnode *devvp, struct buf *bp)
struct vnode *devvp;
struct buf *bp;
{ {
struct snapdata *sn; struct snapdata *sn;
struct fs *fs; struct fs *fs;
@ -2203,9 +2176,7 @@ ffs_bp_snapblk(devvp, bp)
} }
void void
ffs_bdflush(bo, bp) ffs_bdflush(struct bufobj *bo, struct buf *bp)
struct bufobj *bo;
struct buf *bp;
{ {
struct thread *td; struct thread *td;
struct vnode *vp, *devvp; struct vnode *vp, *devvp;
@ -2279,9 +2250,7 @@ ffs_bdflush(bo, bp)
* copying the block if necessary. * copying the block if necessary.
*/ */
int int
ffs_copyonwrite(devvp, bp) ffs_copyonwrite(struct vnode *devvp, struct buf *bp)
struct vnode *devvp;
struct buf *bp;
{ {
struct snapdata *sn; struct snapdata *sn;
struct buf *ibp, *cbp, *savedcbp = NULL; struct buf *ibp, *cbp, *savedcbp = NULL;
@ -2501,9 +2470,7 @@ ffs_copyonwrite(devvp, bp)
* blocks to free. * blocks to free.
*/ */
void void
ffs_sync_snap(mp, waitfor) ffs_sync_snap(struct mount *mp, int waitfor)
struct mount *mp;
int waitfor;
{ {
struct snapdata *sn; struct snapdata *sn;
struct vnode *devvp; struct vnode *devvp;
@ -2537,10 +2504,9 @@ ffs_sync_snap(mp, waitfor)
* Much of this boiler-plate comes from bwrite(). * Much of this boiler-plate comes from bwrite().
*/ */
static int static int
readblock(vp, bp, lbn) readblock(struct vnode *vp,
struct vnode *vp; struct buf *bp,
struct buf *bp; ufs2_daddr_t lbn)
ufs2_daddr_t lbn;
{ {
struct inode *ip; struct inode *ip;
struct fs *fs; 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. * get the same number of recursions on the vnode's own lock.
*/ */
static void static void
revert_snaplock(vp, devvp, sn) revert_snaplock(struct vnode *vp,
struct vnode *vp; struct vnode *devvp,
struct vnode *devvp; struct snapdata *sn)
struct snapdata *sn;
{ {
int i; int i;

File diff suppressed because it is too large Load Diff

View File

@ -903,10 +903,7 @@ ffs_reload(struct mount *mp, int flags)
* Common code for mount and mountroot * Common code for mount and mountroot
*/ */
static int static int
ffs_mountfs(odevvp, mp, td) ffs_mountfs(struct vnode *odevvp, struct mount *mp, struct thread *td)
struct vnode *odevvp;
struct mount *mp;
struct thread *td;
{ {
struct ufsmount *ump; struct ufsmount *ump;
struct fs *fs; struct fs *fs;
@ -1272,10 +1269,9 @@ SYSCTL_INT(_debug, OID_AUTO, bigcgs, CTLFLAG_RW, &bigcgs, 0, "");
* Unfortunately new bits get added. * Unfortunately new bits get added.
*/ */
static void static void
ffs_oldfscompat_read(fs, ump, sblockloc) ffs_oldfscompat_read(struct fs *fs,
struct fs *fs; struct ufsmount *ump,
struct ufsmount *ump; ufs2_daddr_t sblockloc)
ufs2_daddr_t sblockloc;
{ {
off_t maxfilesize; off_t maxfilesize;
@ -1332,9 +1328,7 @@ ffs_oldfscompat_read(fs, ump, sblockloc)
* Unfortunately new bits get added. * Unfortunately new bits get added.
*/ */
void void
ffs_oldfscompat_write(fs, ump) ffs_oldfscompat_write(struct fs *fs, struct ufsmount *ump)
struct fs *fs;
struct ufsmount *ump;
{ {
/* /*
@ -1358,9 +1352,7 @@ ffs_oldfscompat_write(fs, ump)
* unmount system call * unmount system call
*/ */
static int static int
ffs_unmount(mp, mntflags) ffs_unmount(struct mount *mp, int mntflags)
struct mount *mp;
int mntflags;
{ {
struct thread *td; struct thread *td;
struct ufsmount *ump = VFSTOUFS(mp); struct ufsmount *ump = VFSTOUFS(mp);
@ -1480,10 +1472,7 @@ ffs_unmount(mp, mntflags)
* Flush out all the files in a filesystem. * Flush out all the files in a filesystem.
*/ */
int int
ffs_flushfiles(mp, flags, td) ffs_flushfiles(struct mount *mp, int flags, struct thread *td)
struct mount *mp;
int flags;
struct thread *td;
{ {
struct ufsmount *ump; struct ufsmount *ump;
int qerror, error; int qerror, error;
@ -1566,9 +1555,7 @@ ffs_flushfiles(mp, flags, td)
* Get filesystem statistics. * Get filesystem statistics.
*/ */
static int static int
ffs_statfs(mp, sbp) ffs_statfs(struct mount *mp, struct statfs *sbp)
struct mount *mp;
struct statfs *sbp;
{ {
struct ufsmount *ump; struct ufsmount *ump;
struct fs *fs; struct fs *fs;
@ -1625,8 +1612,7 @@ ffs_sync_lazy_filter(struct vnode *vp, void *arg __unused)
* disk by syncer. * disk by syncer.
*/ */
static int static int
ffs_sync_lazy(mp) ffs_sync_lazy(struct mount *mp)
struct mount *mp;
{ {
struct vnode *mvp, *vp; struct vnode *mvp, *vp;
struct inode *ip; struct inode *ip;
@ -1684,9 +1670,7 @@ ffs_sync_lazy(mp)
* vfs_busy(). * vfs_busy().
*/ */
static int static int
ffs_sync(mp, waitfor) ffs_sync(struct mount *mp, int waitfor)
struct mount *mp;
int waitfor;
{ {
struct vnode *mvp, *vp, *devvp; struct vnode *mvp, *vp, *devvp;
struct thread *td; struct thread *td;
@ -1831,22 +1815,17 @@ ffs_sync(mp, waitfor)
} }
int int
ffs_vget(mp, ino, flags, vpp) ffs_vget(struct mount *mp, ino_t ino, int flags, struct vnode **vpp)
struct mount *mp;
ino_t ino;
int flags;
struct vnode **vpp;
{ {
return (ffs_vgetf(mp, ino, flags, vpp, 0)); return (ffs_vgetf(mp, ino, flags, vpp, 0));
} }
int int
ffs_vgetf(mp, ino, flags, vpp, ffs_flags) ffs_vgetf(struct mount *mp,
struct mount *mp; ino_t ino,
ino_t ino; int flags,
int flags; struct vnode **vpp,
struct vnode **vpp; int ffs_flags)
int ffs_flags;
{ {
struct fs *fs; struct fs *fs;
struct inode *ip; struct inode *ip;
@ -2050,11 +2029,7 @@ ffs_vgetf(mp, ino, flags, vpp, ffs_flags)
* those rights via. exflagsp and credanonp * those rights via. exflagsp and credanonp
*/ */
static int static int
ffs_fhtovp(mp, fhp, flags, vpp) ffs_fhtovp(struct mount *mp, struct fid *fhp, int flags, struct vnode **vpp)
struct mount *mp;
struct fid *fhp;
int flags;
struct vnode **vpp;
{ {
struct ufid *ufhp; struct ufid *ufhp;
@ -2064,13 +2039,12 @@ ffs_fhtovp(mp, fhp, flags, vpp)
} }
int int
ffs_inotovp(mp, ino, gen, lflags, vpp, ffs_flags) ffs_inotovp(struct mount *mp,
struct mount *mp; ino_t ino,
ino_t ino; u_int64_t gen,
u_int64_t gen; int lflags,
int lflags; struct vnode **vpp,
struct vnode **vpp; int ffs_flags)
int ffs_flags;
{ {
struct ufsmount *ump; struct ufsmount *ump;
struct vnode *nvp; struct vnode *nvp;
@ -2125,8 +2099,7 @@ ffs_inotovp(mp, ino, gen, lflags, vpp, ffs_flags)
* Initialize the filesystem. * Initialize the filesystem.
*/ */
static int static int
ffs_init(vfsp) ffs_init(struct vfsconf *vfsp)
struct vfsconf *vfsp;
{ {
ffs_susp_initialize(); ffs_susp_initialize();
@ -2138,8 +2111,7 @@ ffs_init(vfsp)
* Undo the work of ffs_init(). * Undo the work of ffs_init().
*/ */
static int static int
ffs_uninit(vfsp) ffs_uninit(struct vfsconf *vfsp)
struct vfsconf *vfsp;
{ {
int ret; int ret;
@ -2166,10 +2138,7 @@ struct devfd {
* Write a superblock and associated information back to disk. * Write a superblock and associated information back to disk.
*/ */
int int
ffs_sbupdate(ump, waitfor, suspended) ffs_sbupdate(struct ufsmount *ump, int waitfor, int suspended)
struct ufsmount *ump;
int waitfor;
int suspended;
{ {
struct fs *fs; struct fs *fs;
struct buf *sbbp; struct buf *sbbp;

View File

@ -471,13 +471,13 @@ ffs_fdatasync(struct vop_fdatasync_args *ap)
} }
static int static int
ffs_lock(ap) ffs_lock(
struct vop_lock1_args /* { struct vop_lock1_args /* {
struct vnode *a_vp; struct vnode *a_vp;
int a_flags; int a_flags;
char *file; char *file;
int line; int line;
} */ *ap; } */ *ap)
{ {
#if !defined(NO_FFS_SNAPSHOT) || defined(DIAGNOSTIC) #if !defined(NO_FFS_SNAPSHOT) || defined(DIAGNOSTIC)
struct vnode *vp = ap->a_vp; struct vnode *vp = ap->a_vp;
@ -633,13 +633,13 @@ ffs_read_hole(struct uio *uio, long xfersize, long *size)
* Vnode op for reading. * Vnode op for reading.
*/ */
static int static int
ffs_read(ap) ffs_read(
struct vop_read_args /* { struct vop_read_args /* {
struct vnode *a_vp; struct vnode *a_vp;
struct uio *a_uio; struct uio *a_uio;
int a_ioflag; int a_ioflag;
struct ucred *a_cred; struct ucred *a_cred;
} */ *ap; } */ *ap)
{ {
struct vnode *vp; struct vnode *vp;
struct inode *ip; struct inode *ip;
@ -824,13 +824,13 @@ ffs_read(ap)
* Vnode op for writing. * Vnode op for writing.
*/ */
static int static int
ffs_write(ap) ffs_write(
struct vop_write_args /* { struct vop_write_args /* {
struct vnode *a_vp; struct vnode *a_vp;
struct uio *a_uio; struct uio *a_uio;
int a_ioflag; int a_ioflag;
struct ucred *a_cred; struct ucred *a_cred;
} */ *ap; } */ *ap)
{ {
struct vnode *vp; struct vnode *vp;
struct uio *uio; 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. * Otherwise we just fall through and do the usual thing.
*/ */
static int static int
ffsext_strategy(struct vop_strategy_args *ap) ffsext_strategy(
/* struct vop_strategy_args /* {
struct vop_strategy_args { struct vnodeop_desc *a_desc;
struct vnodeop_desc *a_desc; struct vnode *a_vp;
struct vnode *a_vp; struct buf *a_bp;
struct buf *a_bp; } */ *ap)
};
*/
{ {
struct vnode *vp; struct vnode *vp;
daddr_t lbn; daddr_t lbn;
@ -1531,15 +1529,13 @@ struct vop_strategy_args {
* Vnode extattr transaction commit/abort * Vnode extattr transaction commit/abort
*/ */
static int static int
ffs_openextattr(struct vop_openextattr_args *ap) ffs_openextattr(
/* struct vop_openextattr_args /* {
struct vop_openextattr_args { struct vnodeop_desc *a_desc;
struct vnodeop_desc *a_desc; struct vnode *a_vp;
struct vnode *a_vp; IN struct ucred *a_cred;
IN struct ucred *a_cred; IN struct thread *a_td;
IN struct thread *a_td; } */ *ap)
};
*/
{ {
if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK) 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 * Vnode extattr transaction commit/abort
*/ */
static int static int
ffs_closeextattr(struct vop_closeextattr_args *ap) ffs_closeextattr(
/* struct vop_closeextattr_args /* {
struct vop_closeextattr_args { struct vnodeop_desc *a_desc;
struct vnodeop_desc *a_desc; struct vnode *a_vp;
struct vnode *a_vp; int a_commit;
int a_commit; IN struct ucred *a_cred;
IN struct ucred *a_cred; IN struct thread *a_td;
IN struct thread *a_td; } */ *ap)
};
*/
{ {
struct vnode *vp; struct vnode *vp;
@ -1584,16 +1578,14 @@ struct vop_closeextattr_args {
* Vnode operation to remove a named attribute. * Vnode operation to remove a named attribute.
*/ */
static int static int
ffs_deleteextattr(struct vop_deleteextattr_args *ap) ffs_deleteextattr(
/* struct vop_deleteextattr_args /* {
vop_deleteextattr { IN struct vnode *a_vp;
IN struct vnode *a_vp; IN int a_attrnamespace;
IN int a_attrnamespace; IN const char *a_name;
IN const char *a_name; IN struct ucred *a_cred;
IN struct ucred *a_cred; IN struct thread *a_td;
IN struct thread *a_td; } */ *ap)
};
*/
{ {
struct vnode *vp; struct vnode *vp;
struct inode *ip; struct inode *ip;
@ -1666,18 +1658,16 @@ vop_deleteextattr {
* Vnode operation to retrieve a named extended attribute. * Vnode operation to retrieve a named extended attribute.
*/ */
static int static int
ffs_getextattr(struct vop_getextattr_args *ap) ffs_getextattr(
/* struct vop_getextattr_args /* {
vop_getextattr { IN struct vnode *a_vp;
IN struct vnode *a_vp; IN int a_attrnamespace;
IN int a_attrnamespace; IN const char *a_name;
IN const char *a_name; INOUT struct uio *a_uio;
INOUT struct uio *a_uio; OUT size_t *a_size;
OUT size_t *a_size; IN struct ucred *a_cred;
IN struct ucred *a_cred; IN struct thread *a_td;
IN struct thread *a_td; } */ *ap)
};
*/
{ {
struct inode *ip; struct inode *ip;
u_char *eae, *p; u_char *eae, *p;
@ -1720,17 +1710,15 @@ vop_getextattr {
* Vnode operation to retrieve extended attributes on a vnode. * Vnode operation to retrieve extended attributes on a vnode.
*/ */
static int static int
ffs_listextattr(struct vop_listextattr_args *ap) ffs_listextattr(
/* struct vop_listextattr_args /* {
vop_listextattr { IN struct vnode *a_vp;
IN struct vnode *a_vp; IN int a_attrnamespace;
IN int a_attrnamespace; INOUT struct uio *a_uio;
INOUT struct uio *a_uio; OUT size_t *a_size;
OUT size_t *a_size; IN struct ucred *a_cred;
IN struct ucred *a_cred; IN struct thread *a_td;
IN struct thread *a_td; } */ *ap)
};
*/
{ {
struct inode *ip; struct inode *ip;
struct extattr *eap, *eaend; struct extattr *eap, *eaend;
@ -1779,17 +1767,15 @@ vop_listextattr {
* Vnode operation to set a named attribute. * Vnode operation to set a named attribute.
*/ */
static int static int
ffs_setextattr(struct vop_setextattr_args *ap) ffs_setextattr(
/* struct vop_setextattr_args /* {
vop_setextattr { IN struct vnode *a_vp;
IN struct vnode *a_vp; IN int a_attrnamespace;
IN int a_attrnamespace; IN const char *a_name;
IN const char *a_name; INOUT struct uio *a_uio;
INOUT struct uio *a_uio; IN struct ucred *a_cred;
IN struct ucred *a_cred; IN struct thread *a_td;
IN struct thread *a_td; } */ *ap)
};
*/
{ {
struct vnode *vp; struct vnode *vp;
struct inode *ip; struct inode *ip;
@ -1910,13 +1896,11 @@ vop_setextattr {
* Vnode pointer to File handle * Vnode pointer to File handle
*/ */
static int static int
ffs_vptofh(struct vop_vptofh_args *ap) ffs_vptofh(
/* struct vop_vptofh_args /* {
vop_vptofh { IN struct vnode *a_vp;
IN struct vnode *a_vp; IN struct fid *a_fhp;
IN struct fid *a_fhp; } */ *ap)
};
*/
{ {
struct inode *ip; struct inode *ip;
struct ufid *ufhp; struct ufid *ufhp;

View File

@ -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. * number to index into the array of block pointers described by the dinode.
*/ */
int int
ufs_bmap(ap) ufs_bmap(
struct vop_bmap_args /* { struct vop_bmap_args /* {
struct vnode *a_vp; struct vnode *a_vp;
daddr_t a_bn; daddr_t a_bn;
@ -73,7 +73,7 @@ ufs_bmap(ap)
daddr_t *a_bnp; daddr_t *a_bnp;
int *a_runp; int *a_runp;
int *a_runb; int *a_runb;
} */ *ap; } */ *ap)
{ {
ufs2_daddr_t blkno; ufs2_daddr_t blkno;
int error; int error;
@ -94,11 +94,10 @@ ufs_bmap(ap)
} }
static int static int
readindir(vp, lbn, daddr, bpp) readindir(struct vnode *vp,
struct vnode *vp; ufs_lbn_t lbn,
ufs_lbn_t lbn; ufs2_daddr_t daddr,
ufs2_daddr_t daddr; struct buf **bpp)
struct buf **bpp;
{ {
struct buf *bp; struct buf *bp;
struct mount *mp; struct mount *mp;
@ -153,13 +152,12 @@ readindir(vp, lbn, daddr, bpp)
*/ */
int int
ufs_bmaparray(vp, bn, bnp, nbp, runp, runb) ufs_bmaparray(struct vnode *vp,
struct vnode *vp; ufs2_daddr_t bn,
ufs2_daddr_t bn; ufs2_daddr_t *bnp,
ufs2_daddr_t *bnp; struct buf *nbp,
struct buf *nbp; int *runp,
int *runp; int *runb)
int *runb;
{ {
struct inode *ip; struct inode *ip;
struct buf *bp; struct buf *bp;
@ -333,9 +331,7 @@ ufs_bmaparray(vp, bn, bnp, nbp, runp, runb)
} }
static ufs_lbn_t static ufs_lbn_t
lbn_count(ump, level) lbn_count(struct ufsmount *ump, int level)
struct ufsmount *ump;
int level;
{ {
ufs_lbn_t blockcnt; ufs_lbn_t blockcnt;
@ -345,9 +341,7 @@ lbn_count(ump, level)
} }
int int
ufs_bmap_seekdata(vp, offp) ufs_bmap_seekdata(struct vnode *vp, off_t *offp)
struct vnode *vp;
off_t *offp;
{ {
struct buf *bp; struct buf *bp;
struct indir a[UFS_NIADDR + 1], *ap; struct indir a[UFS_NIADDR + 1], *ap;
@ -448,11 +442,10 @@ ufs_bmap_seekdata(vp, offp)
* once with the offset into the page itself. * once with the offset into the page itself.
*/ */
int int
ufs_getlbns(vp, bn, ap, nump) ufs_getlbns(struct vnode *vp,
struct vnode *vp; ufs2_daddr_t bn,
ufs2_daddr_t bn; struct indir *ap,
struct indir *ap; int *nump)
int *nump;
{ {
ufs2_daddr_t blockcnt; ufs2_daddr_t blockcnt;
ufs_lbn_t metalbn, realbn; ufs_lbn_t metalbn, realbn;

View File

@ -810,18 +810,16 @@ ufs_extattrctl(struct mount *mp, int cmd, struct vnode *filename_vp,
* Vnode operating to retrieve a named extended attribute. * Vnode operating to retrieve a named extended attribute.
*/ */
int int
ufs_getextattr(struct vop_getextattr_args *ap) ufs_getextattr(
/* struct vop_getextattr_args /* {
vop_getextattr { IN struct vnode *a_vp;
IN struct vnode *a_vp; IN int a_attrnamespace;
IN int a_attrnamespace; IN const char *a_name;
IN const char *a_name; INOUT struct uio *a_uio;
INOUT struct uio *a_uio; OUT size_t *a_size;
OUT size_t *a_size; IN struct ucred *a_cred;
IN struct ucred *a_cred; IN struct thread *a_td;
IN struct thread *a_td; } */ *ap)
};
*/
{ {
struct mount *mp = ap->a_vp->v_mount; struct mount *mp = ap->a_vp->v_mount;
struct ufsmount *ump = VFSTOUFS(mp); 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. * Vnode operation to remove a named attribute.
*/ */
int int
ufs_deleteextattr(struct vop_deleteextattr_args *ap) ufs_deleteextattr(
/* struct vop_deleteextattr_args /* {
vop_deleteextattr { IN struct vnode *a_vp;
IN struct vnode *a_vp; IN int a_attrnamespace;
IN int a_attrnamespace; IN const char *a_name;
IN const char *a_name; IN struct ucred *a_cred;
IN struct ucred *a_cred; IN struct thread *a_td;
IN struct thread *a_td; } */ *ap)
};
*/
{ {
struct mount *mp = ap->a_vp->v_mount; struct mount *mp = ap->a_vp->v_mount;
struct ufsmount *ump = VFSTOUFS(mp); struct ufsmount *ump = VFSTOUFS(mp);
@ -1011,17 +1007,15 @@ vop_deleteextattr {
* Vnode operation to set a named attribute. * Vnode operation to set a named attribute.
*/ */
int int
ufs_setextattr(struct vop_setextattr_args *ap) ufs_setextattr(
/* vop_setextattr_args /* {
vop_setextattr { IN struct vnode *a_vp;
IN struct vnode *a_vp; IN int a_attrnamespace;
IN int a_attrnamespace; IN const char *a_name;
IN const char *a_name; INOUT struct uio *a_uio;
INOUT struct uio *a_uio; IN struct ucred *a_cred;
IN struct ucred *a_cred; IN struct thread *a_td;
IN struct thread *a_td; } */ *ap)
};
*/
{ {
struct mount *mp = ap->a_vp->v_mount; struct mount *mp = ap->a_vp->v_mount;
struct ufsmount *ump = VFSTOUFS(mp); struct ufsmount *ump = VFSTOUFS(mp);

View File

@ -64,8 +64,7 @@ __FBSDID("$FreeBSD$");
#endif #endif
int int
ufs_need_inactive(ap) ufs_need_inactive(struct vop_need_inactive_args *ap)
struct vop_need_inactive_args *ap;
{ {
struct vnode *vp; struct vnode *vp;
struct inode *ip; struct inode *ip;
@ -103,10 +102,10 @@ ufs_need_inactive(ap)
* Last reference to an inode. If necessary, write or delete it. * Last reference to an inode. If necessary, write or delete it.
*/ */
int int
ufs_inactive(ap) ufs_inactive(
struct vop_inactive_args /* { struct vop_inactive_args /* {
struct vnode *a_vp; struct vnode *a_vp;
} */ *ap; } */ *ap)
{ {
struct vnode *vp = ap->a_vp; struct vnode *vp = ap->a_vp;
struct inode *ip = VTOI(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. * Reclaim an inode so that it can be used for other purposes.
*/ */
int int
ufs_reclaim(ap) ufs_reclaim(
struct vop_reclaim_args /* { struct vop_reclaim_args /* {
struct vnode *a_vp; struct vnode *a_vp;
} */ *ap; } */ *ap)
{ {
struct vnode *vp = ap->a_vp; struct vnode *vp = ap->a_vp;
struct inode *ip = VTOI(vp); struct inode *ip = VTOI(vp);

View File

@ -177,12 +177,12 @@ ufs_delete_denied(struct vnode *vdp, struct vnode *tdp, struct ucred *cred,
* nor deleting, add name to cache * nor deleting, add name to cache
*/ */
int int
ufs_lookup(ap) ufs_lookup(
struct vop_cachedlookup_args /* { struct vop_cachedlookup_args /* {
struct vnode *a_dvp; struct vnode *a_dvp;
struct vnode **a_vpp; struct vnode **a_vpp;
struct componentname *a_cnp; struct componentname *a_cnp;
} */ *ap; } */ *ap)
{ {
return (ufs_lookup_ino(ap->a_dvp, ap->a_vpp, ap->a_cnp, NULL)); 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 void
ufs_dirbad(ip, offset, how) ufs_dirbad(struct inode *ip, doff_t offset, char *how)
struct inode *ip;
doff_t offset;
char *how;
{ {
struct mount *mp; struct mount *mp;
@ -787,10 +784,7 @@ ufs_dirbad(ip, offset, how)
* name must be as long as advertised, and null terminated * name must be as long as advertised, and null terminated
*/ */
int int
ufs_dirbadentry(dp, ep, entryoffsetinblock) ufs_dirbadentry(struct vnode *dp, struct direct *ep, int entryoffsetinblock)
struct vnode *dp;
struct direct *ep;
int entryoffsetinblock;
{ {
int i, namlen; 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. * argument ip is the inode to which the new directory entry will refer.
*/ */
void void
ufs_makedirentry(ip, cnp, newdirp) ufs_makedirentry(struct inode *ip, struct componentname *cnp,
struct inode *ip; struct direct *newdirp)
struct componentname *cnp;
struct direct *newdirp;
{ {
u_int namelen; u_int namelen;
@ -872,12 +864,8 @@ ufs_makedirentry(ip, cnp, newdirp)
* soft dependency code). * soft dependency code).
*/ */
int int
ufs_direnter(dvp, tvp, dirp, cnp, newdirbp) ufs_direnter(struct vnode *dvp, struct vnode *tvp, struct direct *dirp,
struct vnode *dvp; struct componentname *cnp, struct buf *newdirbp)
struct vnode *tvp;
struct direct *dirp;
struct componentname *cnp;
struct buf *newdirbp;
{ {
struct ucred *cr; struct ucred *cr;
struct thread *td; struct thread *td;
@ -1130,11 +1118,7 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdirbp)
* to the size of the previous entry. * to the size of the previous entry.
*/ */
int int
ufs_dirremove(dvp, ip, flags, isrmdir) ufs_dirremove(struct vnode *dvp, struct inode *ip, int flags, int isrmdir)
struct vnode *dvp;
struct inode *ip;
int flags;
int isrmdir;
{ {
struct inode *dp; struct inode *dp;
struct direct *ep, *rep; struct direct *ep, *rep;
@ -1256,11 +1240,8 @@ ufs_dirremove(dvp, ip, flags, isrmdir)
* set up by a call to namei. * set up by a call to namei.
*/ */
int int
ufs_dirrewrite(dp, oip, newinum, newtype, isrmdir) ufs_dirrewrite(struct inode *dp, struct inode *oip, ino_t newinum, int newtype,
struct inode *dp, *oip; int isrmdir)
ino_t newinum;
int newtype;
int isrmdir;
{ {
struct buf *bp; struct buf *bp;
struct direct *ep; struct direct *ep;
@ -1334,10 +1315,7 @@ ufs_dirrewrite(dp, oip, newinum, newtype, isrmdir)
* NB: does not handle corrupted directories. * NB: does not handle corrupted directories.
*/ */
int int
ufs_dirempty(ip, parentino, cred) ufs_dirempty(struct inode *ip, ino_t parentino, struct ucred *cred)
struct inode *ip;
ino_t parentino;
struct ucred *cred;
{ {
doff_t off; doff_t off;
struct dirtemplate dbuf; struct dirtemplate dbuf;

View File

@ -1681,9 +1681,7 @@ dqflush(struct vnode *vp)
* Return count of number of quota structures found. * Return count of number of quota structures found.
*/ */
int int
quotaref(vp, qrp) quotaref(struct vnode *vp, struct dquot **qrp)
struct vnode *vp;
struct dquot **qrp;
{ {
struct inode *ip; struct inode *ip;
struct dquot *dq; struct dquot *dq;
@ -1718,8 +1716,7 @@ quotaref(vp, qrp)
* Release a set of quota structures obtained from a vnode. * Release a set of quota structures obtained from a vnode.
*/ */
void void
quotarele(qrp) quotarele(struct dquot **qrp)
struct dquot **qrp;
{ {
struct dquot *dq; struct dquot *dq;
int i; int i;
@ -1736,10 +1733,7 @@ quotarele(qrp)
* Positive numbers when adding blocks; negative numbers when freeing blocks. * Positive numbers when adding blocks; negative numbers when freeing blocks.
*/ */
void void
quotaadj(qrp, ump, blkcount) quotaadj(struct dquot **qrp, struct ufsmount *ump, int64_t blkcount)
struct dquot **qrp;
struct ufsmount *ump;
int64_t blkcount;
{ {
struct dquot *dq; struct dquot *dq;
ufs2_daddr_t ncurblocks; ufs2_daddr_t ncurblocks;

View File

@ -68,10 +68,7 @@ MALLOC_DEFINE(M_UFSMNT, "ufs_mount", "UFS mount structure");
* Return the root of a filesystem. * Return the root of a filesystem.
*/ */
int int
ufs_root(mp, flags, vpp) ufs_root(struct mount *mp, int flags, struct vnode **vpp)
struct mount *mp;
int flags;
struct vnode **vpp;
{ {
struct vnode *nvp; struct vnode *nvp;
int error; int error;
@ -87,12 +84,7 @@ ufs_root(mp, flags, vpp)
* Do operations associated with quotas * Do operations associated with quotas
*/ */
int int
ufs_quotactl(mp, cmds, id, arg, mp_busy) ufs_quotactl(struct mount *mp, int cmds, uid_t id, void *arg, bool *mp_busy)
struct mount *mp;
int cmds;
uid_t id;
void *arg;
bool *mp_busy;
{ {
#ifndef QUOTA #ifndef QUOTA
return (EOPNOTSUPP); return (EOPNOTSUPP);
@ -180,8 +172,7 @@ ufs_quotactl(mp, cmds, id, arg, mp_busy)
* Initial UFS filesystems, done only once. * Initial UFS filesystems, done only once.
*/ */
int int
ufs_init(vfsp) ufs_init(struct vfsconf *vfsp)
struct vfsconf *vfsp;
{ {
#ifdef QUOTA #ifdef QUOTA
@ -197,8 +188,7 @@ ufs_init(vfsp)
* Uninitialise UFS filesystems, done before module unload. * Uninitialise UFS filesystems, done before module unload.
*/ */
int int
ufs_uninit(vfsp) ufs_uninit(struct vfsconf *vfsp)
struct vfsconf *vfsp;
{ {
#ifdef QUOTA #ifdef QUOTA

View File

@ -238,13 +238,13 @@ ufs_sync_nlink(struct vnode *vp, struct vnode *vp1)
* Create a regular file * Create a regular file
*/ */
static int static int
ufs_create(ap) ufs_create(
struct vop_create_args /* { struct vop_create_args /* {
struct vnode *a_dvp; struct vnode *a_dvp;
struct vnode **a_vpp; struct vnode **a_vpp;
struct componentname *a_cnp; struct componentname *a_cnp;
struct vattr *a_vap; struct vattr *a_vap;
} */ *ap; } */ *ap)
{ {
int error; int error;
@ -263,13 +263,13 @@ ufs_create(ap)
*/ */
/* ARGSUSED */ /* ARGSUSED */
static int static int
ufs_mknod(ap) ufs_mknod(
struct vop_mknod_args /* { struct vop_mknod_args /* {
struct vnode *a_dvp; struct vnode *a_dvp;
struct vnode **a_vpp; struct vnode **a_vpp;
struct componentname *a_cnp; struct componentname *a_cnp;
struct vattr *a_vap; struct vattr *a_vap;
} */ *ap; } */ *ap)
{ {
struct vattr *vap = ap->a_vap; struct vattr *vap = ap->a_vap;
struct vnode **vpp = ap->a_vpp; struct vnode **vpp = ap->a_vpp;
@ -345,13 +345,13 @@ ufs_open(struct vop_open_args *ap)
*/ */
/* ARGSUSED */ /* ARGSUSED */
static int static int
ufs_close(ap) ufs_close(
struct vop_close_args /* { struct vop_close_args /* {
struct vnode *a_vp; struct vnode *a_vp;
int a_fflag; int a_fflag;
struct ucred *a_cred; struct ucred *a_cred;
struct thread *a_td; struct thread *a_td;
} */ *ap; } */ *ap)
{ {
struct vnode *vp = ap->a_vp; struct vnode *vp = ap->a_vp;
int usecount; int usecount;
@ -365,13 +365,13 @@ ufs_close(ap)
} }
static int static int
ufs_accessx(ap) ufs_accessx(
struct vop_accessx_args /* { struct vop_accessx_args /* {
struct vnode *a_vp; struct vnode *a_vp;
accmode_t a_accmode; accmode_t a_accmode;
struct ucred *a_cred; struct ucred *a_cred;
struct thread *a_td; struct thread *a_td;
} */ *ap; } */ *ap)
{ {
struct vnode *vp = ap->a_vp; struct vnode *vp = ap->a_vp;
struct inode *ip = VTOI(vp); struct inode *ip = VTOI(vp);
@ -478,12 +478,12 @@ ufs_accessx(ap)
* the comment above cache_fplookup for details. * the comment above cache_fplookup for details.
*/ */
static int static int
ufs_fplookup_vexec(ap) ufs_fplookup_vexec(
struct vop_fplookup_vexec_args /* { struct vop_fplookup_vexec_args /* {
struct vnode *a_vp; struct vnode *a_vp;
struct ucred *a_cred; struct ucred *a_cred;
struct thread *a_td; struct thread *a_td;
} */ *ap; } */ *ap)
{ {
struct vnode *vp; struct vnode *vp;
struct inode *ip; struct inode *ip;
@ -574,12 +574,12 @@ ufs_stat(struct vop_stat_args *ap)
/* ARGSUSED */ /* ARGSUSED */
static int static int
ufs_getattr(ap) ufs_getattr(
struct vop_getattr_args /* { struct vop_getattr_args /* {
struct vnode *a_vp; struct vnode *a_vp;
struct vattr *a_vap; struct vattr *a_vap;
struct ucred *a_cred; struct ucred *a_cred;
} */ *ap; } */ *ap)
{ {
struct vnode *vp = ap->a_vp; struct vnode *vp = ap->a_vp;
struct inode *ip = VTOI(vp); struct inode *ip = VTOI(vp);
@ -636,12 +636,12 @@ ufs_getattr(ap)
* Set attribute vnode op. called from several syscalls * Set attribute vnode op. called from several syscalls
*/ */
static int static int
ufs_setattr(ap) ufs_setattr(
struct vop_setattr_args /* { struct vop_setattr_args /* {
struct vnode *a_vp; struct vnode *a_vp;
struct vattr *a_vap; struct vattr *a_vap;
struct ucred *a_cred; struct ucred *a_cred;
} */ *ap; } */ *ap)
{ {
struct vattr *vap = ap->a_vap; struct vattr *vap = ap->a_vap;
struct vnode *vp = ap->a_vp; 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 */ #endif /* UFS_ACL */
static int static int
ufs_mmapped(ap) ufs_mmapped(
struct vop_mmapped_args /* { struct vop_mmapped_args /* {
struct vnode *a_vp; struct vnode *a_vp;
} */ *ap; } */ *ap)
{ {
struct vnode *vp; struct vnode *vp;
struct inode *ip; struct inode *ip;
@ -854,11 +854,7 @@ ufs_mmapped(ap)
* Inode must be locked before calling. * Inode must be locked before calling.
*/ */
static int static int
ufs_chmod(vp, mode, cred, td) ufs_chmod(struct vnode *vp, int mode, struct ucred *cred, struct thread *td)
struct vnode *vp;
int mode;
struct ucred *cred;
struct thread *td;
{ {
struct inode *ip = VTOI(vp); struct inode *ip = VTOI(vp);
int newmode, error; int newmode, error;
@ -914,12 +910,8 @@ ufs_chmod(vp, mode, cred, td)
* inode must be locked prior to call. * inode must be locked prior to call.
*/ */
static int static int
ufs_chown(vp, uid, gid, cred, td) ufs_chown(struct vnode *vp, uid_t uid, gid_t gid, struct ucred *cred,
struct vnode *vp; struct thread *td)
uid_t uid;
gid_t gid;
struct ucred *cred;
struct thread *td;
{ {
struct inode *ip = VTOI(vp); struct inode *ip = VTOI(vp);
uid_t ouid; uid_t ouid;
@ -1029,12 +1021,12 @@ ufs_chown(vp, uid, gid, cred, td)
} }
static int static int
ufs_remove(ap) ufs_remove(
struct vop_remove_args /* { struct vop_remove_args /* {
struct vnode *a_dvp; struct vnode *a_dvp;
struct vnode *a_vp; struct vnode *a_vp;
struct componentname *a_cnp; struct componentname *a_cnp;
} */ *ap; } */ *ap)
{ {
struct inode *ip; struct inode *ip;
struct vnode *vp = ap->a_vp; struct vnode *vp = ap->a_vp;
@ -1093,12 +1085,12 @@ print_bad_link_count(const char *funcname, struct vnode *dvp)
* link vnode call * link vnode call
*/ */
static int static int
ufs_link(ap) ufs_link(
struct vop_link_args /* { struct vop_link_args /* {
struct vnode *a_tdvp; struct vnode *a_tdvp;
struct vnode *a_vp; struct vnode *a_vp;
struct componentname *a_cnp; struct componentname *a_cnp;
} */ *ap; } */ *ap)
{ {
struct vnode *vp = ap->a_vp; struct vnode *vp = ap->a_vp;
struct vnode *tdvp = ap->a_tdvp; struct vnode *tdvp = ap->a_tdvp;
@ -1171,12 +1163,12 @@ ufs_link(ap)
* whiteout vnode call * whiteout vnode call
*/ */
static int static int
ufs_whiteout(ap) ufs_whiteout(
struct vop_whiteout_args /* { struct vop_whiteout_args /* {
struct vnode *a_dvp; struct vnode *a_dvp;
struct componentname *a_cnp; struct componentname *a_cnp;
int a_flags; int a_flags;
} */ *ap; } */ *ap)
{ {
struct vnode *dvp = ap->a_dvp; struct vnode *dvp = ap->a_dvp;
struct componentname *cnp = ap->a_cnp; struct componentname *cnp = ap->a_cnp;
@ -1261,7 +1253,7 @@ SYSCTL_INT(_vfs_ufs, OID_AUTO, rename_restarts, CTLFLAG_RD,
* directory. * directory.
*/ */
static int static int
ufs_rename(ap) ufs_rename(
struct vop_rename_args /* { struct vop_rename_args /* {
struct vnode *a_fdvp; struct vnode *a_fdvp;
struct vnode *a_fvp; struct vnode *a_fvp;
@ -1269,7 +1261,7 @@ ufs_rename(ap)
struct vnode *a_tdvp; struct vnode *a_tdvp;
struct vnode *a_tvp; struct vnode *a_tvp;
struct componentname *a_tcnp; struct componentname *a_tcnp;
} */ *ap; } */ *ap)
{ {
struct vnode *tvp = ap->a_tvp; struct vnode *tvp = ap->a_tvp;
struct vnode *tdvp = ap->a_tdvp; struct vnode *tdvp = ap->a_tdvp;
@ -2009,13 +2001,13 @@ ufs_do_nfs4_acl_inheritance(struct vnode *dvp, struct vnode *tvp,
* Mkdir system call * Mkdir system call
*/ */
static int static int
ufs_mkdir(ap) ufs_mkdir(
struct vop_mkdir_args /* { struct vop_mkdir_args /* {
struct vnode *a_dvp; struct vnode *a_dvp;
struct vnode **a_vpp; struct vnode **a_vpp;
struct componentname *a_cnp; struct componentname *a_cnp;
struct vattr *a_vap; struct vattr *a_vap;
} */ *ap; } */ *ap)
{ {
struct vnode *dvp = ap->a_dvp; struct vnode *dvp = ap->a_dvp;
struct vattr *vap = ap->a_vap; struct vattr *vap = ap->a_vap;
@ -2270,12 +2262,12 @@ ufs_mkdir(ap)
* Rmdir system call. * Rmdir system call.
*/ */
static int static int
ufs_rmdir(ap) ufs_rmdir(
struct vop_rmdir_args /* { struct vop_rmdir_args /* {
struct vnode *a_dvp; struct vnode *a_dvp;
struct vnode *a_vp; struct vnode *a_vp;
struct componentname *a_cnp; struct componentname *a_cnp;
} */ *ap; } */ *ap)
{ {
struct vnode *vp = ap->a_vp; struct vnode *vp = ap->a_vp;
struct vnode *dvp = ap->a_dvp; struct vnode *dvp = ap->a_dvp;
@ -2372,14 +2364,14 @@ ufs_rmdir(ap)
* symlink -- make a symbolic link * symlink -- make a symbolic link
*/ */
static int static int
ufs_symlink(ap) ufs_symlink(
struct vop_symlink_args /* { struct vop_symlink_args /* {
struct vnode *a_dvp; struct vnode *a_dvp;
struct vnode **a_vpp; struct vnode **a_vpp;
struct componentname *a_cnp; struct componentname *a_cnp;
struct vattr *a_vap; struct vattr *a_vap;
const char *a_target; const char *a_target;
} */ *ap; } */ *ap)
{ {
struct vnode *vp, **vpp = ap->a_vpp; struct vnode *vp, **vpp = ap->a_vpp;
struct inode *ip; struct inode *ip;
@ -2411,7 +2403,7 @@ ufs_symlink(ap)
* Vnode op for reading directories. * Vnode op for reading directories.
*/ */
int int
ufs_readdir(ap) ufs_readdir(
struct vop_readdir_args /* { struct vop_readdir_args /* {
struct vnode *a_vp; struct vnode *a_vp;
struct uio *a_uio; struct uio *a_uio;
@ -2419,7 +2411,7 @@ ufs_readdir(ap)
int *a_eofflag; int *a_eofflag;
int *a_ncookies; int *a_ncookies;
uint64_t **a_cookies; uint64_t **a_cookies;
} */ *ap; } */ *ap)
{ {
struct vnode *vp = ap->a_vp; struct vnode *vp = ap->a_vp;
struct uio *uio = ap->a_uio; struct uio *uio = ap->a_uio;
@ -2550,12 +2542,12 @@ ufs_readdir(ap)
* Return target name of a symbolic link * Return target name of a symbolic link
*/ */
static int static int
ufs_readlink(ap) ufs_readlink(
struct vop_readlink_args /* { struct vop_readlink_args /* {
struct vnode *a_vp; struct vnode *a_vp;
struct uio *a_uio; struct uio *a_uio;
struct ucred *a_cred; struct ucred *a_cred;
} */ *ap; } */ *ap)
{ {
struct vnode *vp = ap->a_vp; struct vnode *vp = ap->a_vp;
struct inode *ip = VTOI(vp); struct inode *ip = VTOI(vp);
@ -2575,11 +2567,11 @@ ufs_readlink(ap)
* deadlock on memory. See ufs_bmap() for details. * deadlock on memory. See ufs_bmap() for details.
*/ */
static int static int
ufs_strategy(ap) ufs_strategy(
struct vop_strategy_args /* { struct vop_strategy_args /* {
struct vnode *a_vp; struct vnode *a_vp;
struct buf *a_bp; struct buf *a_bp;
} */ *ap; } */ *ap)
{ {
struct buf *bp = ap->a_bp; struct buf *bp = ap->a_bp;
struct vnode *vp = ap->a_vp; struct vnode *vp = ap->a_vp;
@ -2611,10 +2603,10 @@ ufs_strategy(ap)
* Print out the contents of an inode. * Print out the contents of an inode.
*/ */
static int static int
ufs_print(ap) ufs_print(
struct vop_print_args /* { struct vop_print_args /* {
struct vnode *a_vp; struct vnode *a_vp;
} */ *ap; } */ *ap)
{ {
struct vnode *vp = ap->a_vp; struct vnode *vp = ap->a_vp;
struct inode *ip = VTOI(vp); struct inode *ip = VTOI(vp);
@ -2640,13 +2632,13 @@ ufs_print(ap)
* Update the times on the inode then do device close. * Update the times on the inode then do device close.
*/ */
static int static int
ufsfifo_close(ap) ufsfifo_close(
struct vop_close_args /* { struct vop_close_args /* {
struct vnode *a_vp; struct vnode *a_vp;
int a_fflag; int a_fflag;
struct ucred *a_cred; struct ucred *a_cred;
struct thread *a_td; struct thread *a_td;
} */ *ap; } */ *ap)
{ {
struct vnode *vp = ap->a_vp; struct vnode *vp = ap->a_vp;
int usecount; int usecount;
@ -2663,12 +2655,12 @@ ufsfifo_close(ap)
* Return POSIX pathconf information applicable to ufs filesystems. * Return POSIX pathconf information applicable to ufs filesystems.
*/ */
static int static int
ufs_pathconf(ap) ufs_pathconf(
struct vop_pathconf_args /* { struct vop_pathconf_args /* {
struct vnode *a_vp; struct vnode *a_vp;
int a_name; int a_name;
int *a_retval; int *a_retval;
} */ *ap; } */ *ap)
{ {
int error; int error;
@ -2767,10 +2759,7 @@ ufs_pathconf(ap)
* vnodes. * vnodes.
*/ */
int int
ufs_vinit(mntp, fifoops, vpp) ufs_vinit(struct mount *mntp, struct vop_vector *fifoops, struct vnode **vpp)
struct mount *mntp;
struct vop_vector *fifoops;
struct vnode **vpp;
{ {
struct inode *ip; struct inode *ip;
struct vnode *vp; struct vnode *vp;
@ -2797,12 +2786,8 @@ ufs_vinit(mntp, fifoops, vpp)
* Vnode dvp must be locked. * Vnode dvp must be locked.
*/ */
static int static int
ufs_makeinode(mode, dvp, vpp, cnp, callfunc) ufs_makeinode(int mode, struct vnode *dvp, struct vnode **vpp,
int mode; struct componentname *cnp, const char *callfunc)
struct vnode *dvp;
struct vnode **vpp;
struct componentname *cnp;
const char *callfunc;
{ {
struct inode *ip, *pdir; struct inode *ip, *pdir;
struct direct newdir; struct direct newdir;