svn commit: r247209 - stable/9/sys/fs/ext2fs

Pedro F. Giffuni pfg at FreeBSD.org
Sun Feb 24 02:47:22 UTC 2013


Author: pfg
Date: Sun Feb 24 02:47:19 2013
New Revision: 247209
URL: http://svnweb.freebsd.org/changeset/base/247209

Log:
  MFC	r246563, r246564, r246634:
  
  ext2fs: Miscellaneous cleanups and fixes.
  
  make e2fs_maxcontig local and remove tautological check.
  Replace redundant EXT2_MIN_BLOCK with EXT2_MIN_BLOCK_SIZE.
  Use prototype declarations for function definitions
  
  Submitted by:		Christoph Mallon

Modified:
  stable/9/sys/fs/ext2fs/ext2_alloc.c
  stable/9/sys/fs/ext2fs/ext2_balloc.c
  stable/9/sys/fs/ext2fs/ext2_bmap.c
  stable/9/sys/fs/ext2fs/ext2_inode.c
  stable/9/sys/fs/ext2fs/ext2_inode_cnv.c
  stable/9/sys/fs/ext2fs/ext2_lookup.c
  stable/9/sys/fs/ext2fs/ext2_subr.c
  stable/9/sys/fs/ext2fs/ext2_vfsops.c
  stable/9/sys/fs/ext2fs/ext2_vnops.c
  stable/9/sys/fs/ext2fs/ext2fs.h
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/fs/   (props changed)

Modified: stable/9/sys/fs/ext2fs/ext2_alloc.c
==============================================================================
--- stable/9/sys/fs/ext2fs/ext2_alloc.c	Sat Feb 23 23:22:48 2013	(r247208)
+++ stable/9/sys/fs/ext2fs/ext2_alloc.c	Sun Feb 24 02:47:19 2013	(r247209)
@@ -80,12 +80,8 @@ static daddr_t  ext2_mapsearch(struct m_
  *        available block is located.
  */
 int
-ext2_alloc(ip, lbn, bpref, size, cred, bnp)
-	struct inode *ip;
-	int32_t lbn, bpref;
-	int size;
-	struct ucred *cred;
-	int32_t *bnp;
+ext2_alloc(struct inode *ip, int32_t lbn, int32_t bpref, int size,
+    struct ucred *cred, int32_t *bnp)
 {
 	struct m_ext2fs *fs;
 	struct ext2mount *ump;
@@ -159,11 +155,7 @@ static int doreallocblks = 0;
 SYSCTL_INT(_vfs_ext2fs, OID_AUTO, doreallocblks, CTLFLAG_RW, &doreallocblks, 0, "");
 
 int
-ext2_reallocblks(ap)
-	struct vop_reallocblks_args /* {
-		struct vnode *a_vp;
-		struct cluster_save *a_buflist;
-	} */ *ap;
+ext2_reallocblks(struct vop_reallocblks_args *ap)
 {
 	struct m_ext2fs *fs;
 	struct inode *ip;
@@ -350,11 +342,7 @@ fail:
  * 
  */
 int
-ext2_valloc(pvp, mode, cred, vpp)
-	struct vnode *pvp;
-	int mode;
-	struct ucred *cred;
-	struct vnode **vpp;
+ext2_valloc(struct vnode *pvp, int mode, struct ucred *cred, struct vnode **vpp)
 {
 	struct timespec ts;
 	struct inode *pip;
@@ -562,12 +550,8 @@ ext2_dirpref(struct inode *pip)
  * that will hold the pointer
  */
 int32_t
-ext2_blkpref(ip, lbn, indx, bap, blocknr)
-	struct inode *ip;
-	int32_t lbn;
-	int indx;
-	int32_t *bap;
-	int32_t blocknr;
+ext2_blkpref(struct inode *ip, int32_t lbn, int indx, int32_t *bap,
+    int32_t blocknr)
 {
 	int	tmp;
 	mtx_assert(EXT2_MTX(ip->i_ump), MA_OWNED);
@@ -978,10 +962,7 @@ gotit:
  *
  */
 void
-ext2_blkfree(ip, bno, size)
-	struct inode *ip;
-	int32_t bno;
-	long size;
+ext2_blkfree(struct inode *ip, int32_t bno, long size)
 {
 	struct m_ext2fs *fs;
 	struct buf *bp;
@@ -1027,10 +1008,7 @@ ext2_blkfree(ip, bno, size)
  *
  */
 int
-ext2_vfree(pvp, ino, mode)
-	struct vnode *pvp;
-	ino_t ino;
-	int mode;
+ext2_vfree(struct vnode *pvp, ino_t ino, int mode)
 {
 	struct m_ext2fs *fs;
 	struct inode *pip;
@@ -1124,10 +1102,7 @@ ext2_mapsearch(struct m_ext2fs *fs, char
  *	fs: error message
  */
 static void
-ext2_fserr(fs, uid, cp)
-	struct m_ext2fs *fs;
-	uid_t uid;
-	char *cp;
+ext2_fserr(struct m_ext2fs *fs, uid_t uid, char *cp)
 {
 
 	log(LOG_ERR, "uid %u on %s: %s\n", uid, fs->e2fs_fsmnt, cp);

Modified: stable/9/sys/fs/ext2fs/ext2_balloc.c
==============================================================================
--- stable/9/sys/fs/ext2fs/ext2_balloc.c	Sat Feb 23 23:22:48 2013	(r247208)
+++ stable/9/sys/fs/ext2fs/ext2_balloc.c	Sun Feb 24 02:47:19 2013	(r247209)
@@ -55,13 +55,8 @@
  * the inode and the logical block number in a file.
  */
 int
-ext2_balloc(ip, lbn, size, cred, bpp, flags)
-	struct inode *ip;
-	int32_t lbn;
-	int size;
-	struct ucred *cred;
-	struct buf **bpp;
-	int flags;
+ext2_balloc(struct inode *ip, int32_t lbn, int size, struct ucred *cred,
+    struct buf **bpp, int flags)
 {
 	struct m_ext2fs *fs;
 	struct ext2mount *ump;

Modified: stable/9/sys/fs/ext2fs/ext2_bmap.c
==============================================================================
--- stable/9/sys/fs/ext2fs/ext2_bmap.c	Sat Feb 23 23:22:48 2013	(r247208)
+++ stable/9/sys/fs/ext2fs/ext2_bmap.c	Sun Feb 24 02:47:19 2013	(r247209)
@@ -56,15 +56,7 @@
  * number to index into the array of block pointers described by the dinode.
  */
 int
-ext2_bmap(ap)
-	struct vop_bmap_args /* {
-		struct vnode *a_vp;
-		daddr_t a_bn;
-		struct bufobj **a_bop;
-		daddr_t *a_bnp;
-		int *a_runp;
-		int *a_runb;
-	} */ *ap;
+ext2_bmap(struct vop_bmap_args *ap)
 {
 	int32_t blkno;
 	int error;
@@ -99,12 +91,7 @@ ext2_bmap(ap)
  */
 
 int
-ext2_bmaparray(vp, bn, bnp, runp, runb)
-	struct vnode *vp;
-	int32_t bn;
-	int32_t *bnp;
-	int *runp;
-	int *runb;
+ext2_bmaparray(struct vnode *vp, int32_t bn, int32_t *bnp, int *runp, int *runb)
 {
 	struct inode *ip;
 	struct buf *bp;
@@ -252,11 +239,7 @@ ext2_bmaparray(vp, bn, bnp, runp, runb)
  * once with the offset into the page itself.
  */
 int
-ext2_getlbns(vp, bn, ap, nump)
-	struct vnode *vp;
-	int32_t bn;
-	struct indir *ap;
-	int *nump;
+ext2_getlbns(struct vnode *vp, int32_t bn, struct indir *ap, int *nump)
 {
 	long blockcnt, metalbn, realbn;
 	struct ext2mount *ump;

Modified: stable/9/sys/fs/ext2fs/ext2_inode.c
==============================================================================
--- stable/9/sys/fs/ext2fs/ext2_inode.c	Sat Feb 23 23:22:48 2013	(r247208)
+++ stable/9/sys/fs/ext2fs/ext2_inode.c	Sun Feb 24 02:47:19 2013	(r247209)
@@ -66,9 +66,7 @@ static int ext2_indirtrunc(struct inode 
  * set, then wait for the write to complete.
  */
 int
-ext2_update(vp, waitfor)
-	struct vnode *vp;
-	int waitfor;
+ext2_update(struct vnode *vp, int waitfor)
 {
 	struct m_ext2fs *fs;
 	struct buf *bp;
@@ -108,12 +106,8 @@ ext2_update(vp, waitfor)
  * disk blocks.
  */
 int
-ext2_truncate(vp, length, flags, cred, td)
-	struct vnode *vp;
-	off_t length;
-	int flags;
-	struct ucred *cred;
-	struct thread *td;
+ext2_truncate(struct vnode *vp, off_t length, int flags, struct ucred *cred,
+    struct thread *td)
 {
 	struct vnode *ovp = vp;
 	int32_t lastblock;
@@ -361,12 +355,8 @@ done:
  */
 
 static int
-ext2_indirtrunc(ip, lbn, dbn, lastbn, level, countp)
-	struct inode *ip;
-	int32_t lbn, lastbn;
-	int32_t dbn;
-	int level;
-	long *countp;
+ext2_indirtrunc(struct inode *ip, int32_t lbn, int32_t dbn, int32_t lastbn,
+    int level, long *countp)
 {
 	struct buf *bp;
 	struct m_ext2fs *fs = ip->i_e2fs;
@@ -470,11 +460,7 @@ ext2_indirtrunc(ip, lbn, dbn, lastbn, le
  *	discard preallocated blocks
  */
 int
-ext2_inactive(ap)
-        struct vop_inactive_args /* {
-		struct vnode *a_vp;
-		struct thread *a_td;
-	} */ *ap;
+ext2_inactive(struct vop_inactive_args *ap)
 {
 	struct vnode *vp = ap->a_vp;
 	struct inode *ip = VTOI(vp);
@@ -510,11 +496,7 @@ out:
  * Reclaim an inode so that it can be used for other purposes.
  */
 int
-ext2_reclaim(ap)
-	struct vop_reclaim_args /* {
-		struct vnode *a_vp;
-		struct thread *a_td;
-	} */ *ap;
+ext2_reclaim(struct vop_reclaim_args *ap)
 {
 	struct inode *ip;
 	struct vnode *vp = ap->a_vp;

Modified: stable/9/sys/fs/ext2fs/ext2_inode_cnv.c
==============================================================================
--- stable/9/sys/fs/ext2fs/ext2_inode_cnv.c	Sat Feb 23 23:22:48 2013	(r247208)
+++ stable/9/sys/fs/ext2fs/ext2_inode_cnv.c	Sun Feb 24 02:47:19 2013	(r247209)
@@ -41,8 +41,7 @@
 #define NSEC_TO_XTIME(t)	(le32toh(t << 2) & EXT3_NSEC_MASK)
 
 void
-ext2_print_inode( in )
-	struct inode *in;
+ext2_print_inode(struct inode *in)
 {
 	int i;
 
@@ -68,9 +67,7 @@ ext2_print_inode( in )
  *	raw ext2 inode to inode
  */
 void
-ext2_ei2i(ei, ip)
-	struct ext2fs_dinode *ei;
-	struct inode *ip;
+ext2_ei2i(struct ext2fs_dinode *ei, struct inode *ip)
 {
         int i;
 
@@ -113,9 +110,7 @@ ext2_ei2i(ei, ip)
  *	inode to raw ext2 inode
  */
 void
-ext2_i2ei(ip, ei)
-	struct inode *ip;
-	struct ext2fs_dinode *ei;
+ext2_i2ei(struct inode *ip, struct ext2fs_dinode *ei)
 {
 	int i;
 

Modified: stable/9/sys/fs/ext2fs/ext2_lookup.c
==============================================================================
--- stable/9/sys/fs/ext2fs/ext2_lookup.c	Sat Feb 23 23:22:48 2013	(r247208)
+++ stable/9/sys/fs/ext2fs/ext2_lookup.c	Sun Feb 24 02:47:19 2013	(r247209)
@@ -129,12 +129,7 @@ static int	ext2_lookup_ino(struct vnode 
  * the whole buffer to uiomove
  */
 int
-ext2_readdir(ap)
-	struct vop_readdir_args /* {
-		struct vnode *a_vp;
-		struct uio *a_uio;
-		struct ucred *a_cred;
-	} */ *ap;
+ext2_readdir(struct vop_readdir_args *ap)
 {
 	struct uio *uio = ap->a_uio;
 	int count, error;
@@ -278,12 +273,7 @@ ext2_readdir(ap)
  *	  nor deleting, add name to cache
  */
 int
-ext2_lookup(ap)
-	struct vop_cachedlookup_args /* {
-		struct vnode *a_dvp;
-		struct vnode **a_vpp;
-		struct componentname *a_cnp;
-	} */ *ap;
+ext2_lookup(struct vop_cachedlookup_args *ap)
 {
 
 	return (ext2_lookup_ino(ap->a_dvp, ap->a_vpp, ap->a_cnp, NULL));
@@ -722,10 +712,7 @@ found:
 }
 
 void
-ext2_dirbad(ip, offset, how)
-	struct inode *ip;
-	doff_t offset;
-	char *how;
+ext2_dirbad(struct inode *ip, doff_t offset, char *how)
 {
 	struct mount *mp;
 
@@ -751,10 +738,8 @@ ext2_dirbad(ip, offset, how)
  *	changed so that it confirms to ext2_check_dir_entry
  */
 static int
-ext2_dirbadentry(dp, de, entryoffsetinblock)
-	struct vnode *dp;
-	struct ext2fs_direct_2 *de;
-	int entryoffsetinblock;
+ext2_dirbadentry(struct vnode *dp, struct ext2fs_direct_2 *de,
+    int entryoffsetinblock)
 {
 	int	DIRBLKSIZ = VTOI(dp)->i_e2fs->e2fs_bsize;
 
@@ -791,10 +776,7 @@ ext2_dirbadentry(dp, de, entryoffsetinbl
  * entry is to be obtained.
  */
 int
-ext2_direnter(ip, dvp, cnp)
-	struct inode *ip;
-	struct vnode *dvp;
-	struct componentname *cnp;
+ext2_direnter(struct inode *ip, struct vnode *dvp, struct componentname *cnp)
 {
 	struct ext2fs_direct_2 *ep, *nep;
 	struct inode *dp;
@@ -944,9 +926,7 @@ ext2_direnter(ip, dvp, cnp)
  * to the size of the previous entry.
  */
 int
-ext2_dirremove(dvp, cnp)
-	struct vnode *dvp;
-	struct componentname *cnp;
+ext2_dirremove(struct vnode *dvp, struct componentname *cnp)
 {
 	struct inode *dp;
 	struct ext2fs_direct_2 *ep, *rep;
@@ -994,9 +974,7 @@ ext2_dirremove(dvp, cnp)
  * set up by a call to namei.
  */
 int
-ext2_dirrewrite(dp, ip, cnp)
-	struct inode *dp, *ip;
-	struct componentname *cnp;
+ext2_dirrewrite(struct inode *dp, struct inode *ip, struct componentname *cnp)
 {
 	struct buf *bp;
 	struct ext2fs_direct_2 *ep;
@@ -1027,10 +1005,7 @@ ext2_dirrewrite(dp, ip, cnp)
  * NB: does not handle corrupted directories.
  */
 int
-ext2_dirempty(ip, parentino, cred)
-	struct inode *ip;
-	ino_t parentino;
-	struct ucred *cred;
+ext2_dirempty(struct inode *ip, ino_t parentino, struct ucred *cred)
 {
 	off_t off;
 	struct dirtemplate dbuf;
@@ -1081,9 +1056,7 @@ ext2_dirempty(ip, parentino, cred)
  * The target is always vput before returning.
  */
 int
-ext2_checkpath(source, target, cred)
-	struct inode *source, *target;
-	struct ucred *cred;
+ext2_checkpath(struct inode *source, struct inode *target, struct ucred *cred)
 {
 	struct vnode *vp;
 	int error, namlen;

Modified: stable/9/sys/fs/ext2fs/ext2_subr.c
==============================================================================
--- stable/9/sys/fs/ext2fs/ext2_subr.c	Sat Feb 23 23:22:48 2013	(r247208)
+++ stable/9/sys/fs/ext2fs/ext2_subr.c	Sun Feb 24 02:47:19 2013	(r247209)
@@ -63,11 +63,7 @@ void	ext2_checkoverlap(struct buf *, str
  * remaining space in the directory.
  */
 int
-ext2_blkatoff(vp, offset, res, bpp)
-	struct vnode *vp;
-	off_t offset;
-	char **res;
-	struct buf **bpp;
+ext2_blkatoff(struct vnode *vp, off_t offset, char **res, struct buf **bpp)
 {
 	struct inode *ip;
 	struct m_ext2fs *fs;
@@ -93,9 +89,7 @@ ext2_blkatoff(vp, offset, res, bpp)
 
 #ifdef KDB
 void
-ext2_checkoverlap(bp, ip)
-	struct buf *bp;
-	struct inode *ip;
+ext2_checkoverlap(struct buf *bp, struct inode *ip)
 {
 	struct buf *ebp, *ep;
 	int32_t start, last;

Modified: stable/9/sys/fs/ext2fs/ext2_vfsops.c
==============================================================================
--- stable/9/sys/fs/ext2fs/ext2_vfsops.c	Sat Feb 23 23:22:48 2013	(r247208)
+++ stable/9/sys/fs/ext2fs/ext2_vfsops.c	Sun Feb 24 02:47:19 2013	(r247209)
@@ -320,8 +320,8 @@ compute_sb_data(struct vnode *devvp, str
 	struct buf *bp;
 	uint32_t e2fs_descpb;
 
-	fs->e2fs_bsize = EXT2_MIN_BLOCK_SIZE << es->e2fs_log_bsize;
 	fs->e2fs_bshift = EXT2_MIN_BLOCK_LOG_SIZE + es->e2fs_log_bsize;
+	fs->e2fs_bsize = 1U << fs->e2fs_bshift;
 	fs->e2fs_fsbtodb = es->e2fs_log_bsize + 1;
 	fs->e2fs_qbmask = fs->e2fs_bsize - 1;
 	fs->e2fs_fsize = EXT2_MIN_FRAG_SIZE << es->e2fs_log_fsize;
@@ -527,6 +527,7 @@ ext2_mountfs(struct vnode *devvp, struct
 	int ronly;
 	int i, size;
 	int32_t *lp;
+	int32_t e2fs_maxcontig;
 
 	ronly = vfs_flagopt(mp->mnt_optnew, "ro", NULL, 0);
 	/* XXX: use VOP_ACESS to check FS perms */
@@ -601,12 +602,8 @@ ext2_mountfs(struct vnode *devvp, struct
 	 * in ext2fs doesn't have these variables, so we can calculate 
 	 * them here.
 	 */
-	ump->um_e2fs->e2fs_maxcontig = MAX(1, MAXPHYS / ump->um_e2fs->e2fs_bsize);
-	if (ump->um_e2fs->e2fs_maxcontig > 0)
-		ump->um_e2fs->e2fs_contigsumsize =
-		    MIN(ump->um_e2fs->e2fs_maxcontig, EXT2_MAXCONTIG);
-	else
-		ump->um_e2fs->e2fs_contigsumsize = 0;
+	e2fs_maxcontig = MAX(1, MAXPHYS / ump->um_e2fs->e2fs_bsize);
+	ump->um_e2fs->e2fs_contigsumsize = MIN(e2fs_maxcontig, EXT2_MAXCONTIG);
 	if (ump->um_e2fs->e2fs_contigsumsize > 0) {
 		size = ump->um_e2fs->e2fs_gcount * sizeof(int32_t);
 		ump->um_e2fs->e2fs_maxcluster = malloc(size, M_EXT2MNT, M_WAITOK);

Modified: stable/9/sys/fs/ext2fs/ext2_vnops.c
==============================================================================
--- stable/9/sys/fs/ext2fs/ext2_vnops.c	Sat Feb 23 23:22:48 2013	(r247208)
+++ stable/9/sys/fs/ext2fs/ext2_vnops.c	Sun Feb 24 02:47:19 2013	(r247209)
@@ -225,13 +225,7 @@ ext2_itimes(struct vnode *vp)
  * Create a regular file
  */
 static int
-ext2_create(ap)
-	struct vop_create_args /* {
-		struct vnode *a_dvp;
-		struct vnode **a_vpp;
-		struct componentname *a_cnp;
-		struct vattr *a_vap;
-	} */ *ap;
+ext2_create(struct vop_create_args *ap)
 {
 	int error;
 
@@ -244,13 +238,7 @@ ext2_create(ap)
 }
 
 static int
-ext2_open(ap)
-	struct vop_open_args /* {
-		struct vnode *a_vp;
-		int  a_mode;
-		struct ucred *a_cred;
-		struct thread *a_td;
-	} */ *ap;
+ext2_open(struct vop_open_args *ap)
 {
 
 	if (ap->a_vp->v_type == VBLK || ap->a_vp->v_type == VCHR)
@@ -274,13 +262,7 @@ ext2_open(ap)
  * Update the times on the inode.
  */
 static int
-ext2_close(ap)
-	struct vop_close_args /* {
-		struct vnode *a_vp;
-		int  a_fflag;
-		struct ucred *a_cred;
-		struct thread *a_td;
-	} */ *ap;
+ext2_close(struct vop_close_args *ap)
 {
 	struct vnode *vp = ap->a_vp;
 
@@ -292,13 +274,7 @@ ext2_close(ap)
 }
 
 static int
-ext2_access(ap)
-	struct vop_access_args /* {
-		struct vnode *a_vp;
-		accmode_t a_accmode;
-		struct ucred *a_cred;
-		struct thread *a_td;
-	} */ *ap;
+ext2_access(struct vop_access_args *ap)
 {
 	struct vnode *vp = ap->a_vp;
 	struct inode *ip = VTOI(vp);
@@ -336,12 +312,7 @@ ext2_access(ap)
 }
 
 static int
-ext2_getattr(ap)
-	struct vop_getattr_args /* {
-		struct vnode *a_vp;
-		struct vattr *a_vap;
-		struct ucred *a_cred;
-	} */ *ap;
+ext2_getattr(struct vop_getattr_args *ap)
 {
 	struct vnode *vp = ap->a_vp;
 	struct inode *ip = VTOI(vp);
@@ -382,12 +353,7 @@ ext2_getattr(ap)
  * Set attribute vnode op. called from several syscalls
  */
 static int
-ext2_setattr(ap)
-	struct vop_setattr_args /* {
-		struct vnode *a_vp;
-		struct vattr *a_vap;
-		struct ucred *a_cred;
-	} */ *ap;
+ext2_setattr(struct vop_setattr_args *ap)
 {
 	struct vattr *vap = ap->a_vap;
 	struct vnode *vp = ap->a_vp;
@@ -525,11 +491,7 @@ ext2_setattr(ap)
  * Inode must be locked before calling.
  */
 static int
-ext2_chmod(vp, mode, cred, td)
-	struct vnode *vp;
-	int mode;
-	struct ucred *cred;
-	struct thread *td;
+ext2_chmod(struct vnode *vp, int mode, struct ucred *cred, struct thread *td)
 {
 	struct inode *ip = VTOI(vp);
 	int error;
@@ -566,12 +528,8 @@ ext2_chmod(vp, mode, cred, td)
  * inode must be locked prior to call.
  */
 static int
-ext2_chown(vp, uid, gid, cred, td)
-	struct vnode *vp;
-	uid_t uid;
-	gid_t gid;
-	struct ucred *cred;
-	struct thread *td;
+ext2_chown(struct vnode *vp, uid_t uid, gid_t gid, struct ucred *cred,
+    struct thread *td)
 {
 	struct inode *ip = VTOI(vp);
 	uid_t ouid;
@@ -616,13 +574,7 @@ ext2_chown(vp, uid, gid, cred, td)
  */
 /* ARGSUSED */
 static int
-ext2_fsync(ap)
-	struct vop_fsync_args /* {
-		struct vnode *a_vp;
-		struct ucred *a_cred;
-		int a_waitfor;
-		struct thread *a_td;
-	} */ *ap;
+ext2_fsync(struct vop_fsync_args *ap)
 {
 	/*
 	 * Flush all dirty buffers associated with a vnode.
@@ -638,13 +590,7 @@ ext2_fsync(ap)
  */
 /* ARGSUSED */
 static int
-ext2_mknod(ap)
-	struct vop_mknod_args /* {
-		struct vnode *a_dvp;
-		struct vnode **a_vpp;
-		struct componentname *a_cnp;
-		struct vattr *a_vap;
-	} */ *ap;
+ext2_mknod(struct vop_mknod_args *ap)
 {
 	struct vattr *vap = ap->a_vap;
 	struct vnode **vpp = ap->a_vpp;
@@ -683,12 +629,7 @@ ext2_mknod(ap)
 }
 
 static int
-ext2_remove(ap)
-	struct vop_remove_args /* {
-		struct vnode *a_dvp;
-		struct vnode *a_vp;
-		struct componentname *a_cnp;
-	} */ *ap;
+ext2_remove(struct vop_remove_args *ap)
 {
 	struct inode *ip;
 	struct vnode *vp = ap->a_vp;
@@ -714,12 +655,7 @@ out:
  * link vnode call
  */
 static int
-ext2_link(ap)
-	struct vop_link_args /* {
-		struct vnode *a_tdvp;
-		struct vnode *a_vp;
-		struct componentname *a_cnp;
-	} */ *ap;
+ext2_link(struct vop_link_args *ap)
 {
 	struct vnode *vp = ap->a_vp;
 	struct vnode *tdvp = ap->a_tdvp;
@@ -782,15 +718,7 @@ out:
  *    directory.
  */
 static int
-ext2_rename(ap)
-	struct vop_rename_args  /* {
-		struct vnode *a_fdvp;
-		struct vnode *a_fvp;
-		struct componentname *a_fcnp;
-		struct vnode *a_tdvp;
-		struct vnode *a_tvp;
-		struct componentname *a_tcnp;
-	} */ *ap;
+ext2_rename(struct vop_rename_args *ap)
 {
 	struct vnode *tvp = ap->a_tvp;
 	struct vnode *tdvp = ap->a_tdvp;
@@ -1145,13 +1073,7 @@ out:
  * Mkdir system call
  */
 static int
-ext2_mkdir(ap)
-	struct vop_mkdir_args /* {
-		struct vnode *a_dvp;
-		struct vnode **a_vpp;
-		struct componentname *a_cnp;
-		struct vattr *a_vap;
-	} */ *ap;
+ext2_mkdir(struct vop_mkdir_args *ap)
 {
 	struct vnode *dvp = ap->a_dvp;
 	struct vattr *vap = ap->a_vap;
@@ -1282,12 +1204,7 @@ out:
  * Rmdir system call.
  */
 static int
-ext2_rmdir(ap)
-	struct vop_rmdir_args /* {
-		struct vnode *a_dvp;
-		struct vnode *a_vp;
-		struct componentname *a_cnp;
-	} */ *ap;
+ext2_rmdir(struct vop_rmdir_args *ap)
 {
 	struct vnode *vp = ap->a_vp;
 	struct vnode *dvp = ap->a_dvp;
@@ -1355,14 +1272,7 @@ out:
  * symlink -- make a symbolic link
  */
 static int
-ext2_symlink(ap)
-	struct vop_symlink_args /* {
-		struct vnode *a_dvp;
-		struct vnode **a_vpp;
-		struct componentname *a_cnp;
-		struct vattr *a_vap;
-		char *a_target;
-	} */ *ap;
+ext2_symlink(struct vop_symlink_args *ap)
 {
 	struct vnode *vp, **vpp = ap->a_vpp;
 	struct inode *ip;
@@ -1392,12 +1302,7 @@ ext2_symlink(ap)
  * Return target name of a symbolic link
  */
 static int
-ext2_readlink(ap)
-	struct vop_readlink_args /* {
-		struct vnode *a_vp;
-		struct uio *a_uio;
-		struct ucred *a_cred;
-	} */ *ap;
+ext2_readlink(struct vop_readlink_args *ap)
 {
 	struct vnode *vp = ap->a_vp;
 	struct inode *ip = VTOI(vp);
@@ -1419,11 +1324,7 @@ ext2_readlink(ap)
  * deadlock on memory.  See ext2_bmap() for details.
  */
 static int
-ext2_strategy(ap)
-	struct vop_strategy_args /* {
-		struct vnode *a_vp;
-		struct buf *a_bp;
-	} */ *ap;
+ext2_strategy(struct vop_strategy_args *ap)
 {
 	struct buf *bp = ap->a_bp;
 	struct vnode *vp = ap->a_vp;
@@ -1461,10 +1362,7 @@ ext2_strategy(ap)
  * Print out the contents of an inode.
  */
 static int
-ext2_print(ap)
-	struct vop_print_args /* {
-		struct vnode *a_vp;
-	} */ *ap;
+ext2_print(struct vop_print_args *ap)
 {
 	struct vnode *vp = ap->a_vp;
 	struct inode *ip = VTOI(vp);
@@ -1482,13 +1380,7 @@ ext2_print(ap)
  * Update the times on the inode then do device close.
  */
 static int
-ext2fifo_close(ap)
-	struct vop_close_args /* {
-		struct vnode *a_vp;
-		int  a_fflag;
-		struct ucred *a_cred;
-		struct thread *a_td;
-	} */ *ap;
+ext2fifo_close(struct vop_close_args *ap)
 {
 	struct vnode *vp = ap->a_vp;
 
@@ -1505,8 +1397,7 @@ ext2fifo_close(ap)
  * Fall through to ext2 kqfilter routines if needed 
  */
 static int
-ext2fifo_kqfilter(ap)
-	struct vop_kqfilter_args *ap;
+ext2fifo_kqfilter(struct vop_kqfilter_args *ap)
 {
 	int error;
 
@@ -1520,12 +1411,7 @@ ext2fifo_kqfilter(ap)
  * Return POSIX pathconf information applicable to ext2 filesystems.
  */
 static int
-ext2_pathconf(ap)
-	struct vop_pathconf_args /* {
-		struct vnode *a_vp;
-		int a_name;
-		int *a_retval;
-	} */ *ap;
+ext2_pathconf(struct vop_pathconf_args *ap)
 {
 
 	switch (ap->a_name) {
@@ -1558,11 +1444,7 @@ ext2_pathconf(ap)
  */
 /* ARGSUSED */
 static int
-ext2_vptofh(ap)
-	struct vop_vptofh_args /* {
-		struct vnode *a_vp;
-		struct fid *a_fhp;
-	} */ *ap;
+ext2_vptofh(struct vop_vptofh_args *ap)
 {
 	struct inode *ip;
 	struct ufid *ufhp;
@@ -1580,10 +1462,7 @@ ext2_vptofh(ap)
  * vnodes.
  */
 int
-ext2_vinit(mntp, fifoops, vpp)
-	struct mount *mntp;
-	struct vop_vector *fifoops;
-	struct vnode **vpp;
+ext2_vinit(struct mount *mntp, struct vop_vector *fifoops, struct vnode **vpp)
 {
 	struct inode *ip;
 	struct vnode *vp;
@@ -1605,11 +1484,8 @@ ext2_vinit(mntp, fifoops, vpp)
  * Allocate a new inode.
  */
 static int
-ext2_makeinode(mode, dvp, vpp, cnp)
-	int mode;
-	struct vnode *dvp;
-	struct vnode **vpp;
-	struct componentname *cnp;
+ext2_makeinode(int mode, struct vnode *dvp, struct vnode **vpp,
+    struct componentname *cnp)
 {
 	struct inode *ip, *pdir;
 	struct vnode *tvp;
@@ -1692,13 +1568,7 @@ bad:
  * Vnode op for reading.
  */
 static int
-ext2_read(ap)
-	struct vop_read_args /* {
-		struct vnode *a_vp;
-		struct uio *a_uio;
-		int a_ioflag;
-		struct ucred *a_cred;
-	} */ *ap;
+ext2_read(struct vop_read_args *ap)
 {
 	struct vnode *vp;
 	struct inode *ip;
@@ -1841,13 +1711,7 @@ ext2_read(ap)
  * Vnode op for writing.
  */
 static int
-ext2_write(ap)
-	struct vop_write_args /* {
-		struct vnode *a_vp;
-		struct uio *a_uio;
-		int a_ioflag;
-		struct ucred *a_cred;
-	} */ *ap;
+ext2_write(struct vop_write_args *ap)
 {
 	struct vnode *vp;
 	struct uio *uio;

Modified: stable/9/sys/fs/ext2fs/ext2fs.h
==============================================================================
--- stable/9/sys/fs/ext2fs/ext2fs.h	Sat Feb 23 23:22:48 2013	(r247208)
+++ stable/9/sys/fs/ext2fs/ext2fs.h	Sun Feb 24 02:47:19 2013	(r247209)
@@ -170,7 +170,6 @@ struct m_ext2fs {
 	char     e2fs_wasvalid;   /* valid at mount time */
 	off_t    e2fs_maxfilesize;
 	struct   ext2_gd *e2fs_gd; /* Group Descriptors */
-	int32_t  e2fs_maxcontig;	/* max number of contiguous blks */
 	int32_t  e2fs_contigsumsize;    /* size of cluster summary array */
 	int32_t *e2fs_maxcluster;       /* max cluster in each cyl group */
 	struct   csum *e2fs_clustersum; /* cluster summary in each cyl group */
@@ -304,7 +303,6 @@ struct csum {
 /*
  * Macro-instructions used to manage several block sizes
  */
-#define EXT2_MIN_BLOCK_SIZE		1024
 #define	EXT2_MAX_BLOCK_SIZE		4096
 #define EXT2_MIN_BLOCK_LOG_SIZE		  10
 #define EXT2_BLOCK_SIZE(s)		((s)->e2fs_bsize)


More information about the svn-src-stable-9 mailing list