Date: Wed, 22 Jul 2009 12:30:58 GMT From: Aditya Sarawgi <truncs@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 166404 for review Message-ID: <200907221230.n6MCUwJg017791@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=166404 Change 166404 by truncs@aditya on 2009/07/22 12:30:09 1) style(9) fixes 2) remove unused macrosses Affected files ... .. //depot/projects/soc2009/soc_ext2fs/src/sys/gnu/fs/ext2fs/ext2_alloc.c#32 edit .. //depot/projects/soc2009/soc_ext2fs/src/sys/gnu/fs/ext2fs/ext2_fs.h#27 edit .. //depot/projects/soc2009/soc_ext2fs/src/sys/gnu/fs/ext2fs/fs.h#11 edit Differences ... ==== //depot/projects/soc2009/soc_ext2fs/src/sys/gnu/fs/ext2fs/ext2_alloc.c#32 (text+ko) ==== @@ -59,7 +59,6 @@ int)); static daddr_t ext2_nodealloccg(struct inode *, int, daddr_t, int); static daddr_t ext2_mapsearch(struct m_ext2fs *, char *, daddr_t); -static void mark_buffer_dirty2(struct buf *bh); /* * Allocate a block in the file system. * @@ -179,10 +178,10 @@ struct inode *ip; struct vnode *vp; struct buf *sbp, *ebp; + struct cluster_save *buflist; + struct indir start_ap[NIADDR + 1], end_ap[NIADDR + 1], *idp; int32_t *bap, *sbap, *ebap; - struct cluster_save *buflist; int32_t start_lbn, end_lbn, soff, eoff, newblk, blkno; - struct indir start_ap[NIADDR + 1], end_ap[NIADDR + 1], *idp; int i, len, start_lvl, end_lvl, pref, ssize; vp = ap->a_vp; @@ -641,10 +640,10 @@ ext2_alloccg(struct inode *ip, int cg, daddr_t bpref, int size) { struct m_ext2fs *fs; + struct buf *bp; + int error, bno, start, end, loc; char *bbp; - struct buf *bp; /* XXX ondisk32 */ - int error, bno, start, end, loc; fs = ip->i_e2fs; if (fs->e2fs_gd[cg].ext2bgd_nbfree == 0) @@ -723,9 +722,9 @@ ext2_nodealloccg(struct inode *ip, int cg, daddr_t ipref, int mode) { struct m_ext2fs *fs; - char *ibp; struct buf *bp; int error, start, len, loc, map, i; + char *ibp; uprintf("1\n"); ipref--; /* to avoid a lot of (ipref -1) */ if (ipref == -1) ==== //depot/projects/soc2009/soc_ext2fs/src/sys/gnu/fs/ext2fs/ext2_fs.h#27 (text+ko) ==== @@ -57,7 +57,6 @@ #define MAXMNTLEN 512 #define EXT2_MAX_GROUP_LOADED 8 -#define buffer_head buf #define e2fs_cgload(old, new, size) memcpy((new), (old), (size)); #define e2fs_cgsave(old, new, size) memcpy((new), (old), (size)); /* ==== //depot/projects/soc2009/soc_ext2fs/src/sys/gnu/fs/ext2fs/fs.h#11 (text+ko) ==== @@ -142,23 +142,3 @@ #define lock_super(devvp) vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY) #define unlock_super(devvp) VOP_UNLOCK(devvp, 0) -/* - * Historically, ext2fs kept it's metadata buffers on the LOCKED queue. Now, - * we change the lock owner to kern so that we may use it from contexts other - * than the one that originally locked it. When we are finished with the - * buffer, we release it, writing it first if it was dirty. - */ -#define LCK_BUF(bp) { \ - (bp)->b_flags |= B_PERSISTENT; \ - BUF_KERNPROC(bp); \ -} - -#define ULCK_BUF(bp) { \ - long flags; \ - flags = (bp)->b_flags; \ - (bp)->b_flags &= ~(B_DIRTY | B_PERSISTENT); \ - if (flags & B_DIRTY) \ - bwrite(bp); \ - else \ - brelse(bp); \ -}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200907221230.n6MCUwJg017791>