diff options
-rw-r--r-- | sys/ufs/ffs/ffs_alloc.c | 14 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_balloc.c | 4 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_extern.h | 4 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_inode.c | 14 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_softdep.c | 12 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_vfsops.c | 8 | ||||
-rw-r--r-- | sys/ufs/ufs/dinode.h | 11 | ||||
-rw-r--r-- | sys/ufs/ufs/ufs_bmap.c | 10 |
8 files changed, 38 insertions, 39 deletions
diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c index 7e361d55289..7d1426c5e3e 100644 --- a/sys/ufs/ffs/ffs_alloc.c +++ b/sys/ufs/ffs/ffs_alloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_alloc.c,v 1.73 2007/05/26 20:26:51 pedro Exp $ */ +/* $OpenBSD: ffs_alloc.c,v 1.74 2007/06/01 06:38:54 deraadt Exp $ */ /* $NetBSD: ffs_alloc.c,v 1.11 1996/05/11 18:27:09 mycroft Exp $ */ /* @@ -580,11 +580,11 @@ ffs2_reallocblks(void *v) struct inode *ip; struct vnode *vp; struct buf *sbp, *ebp; - ufs2_daddr_t *bap, *sbap, *ebap = 0; + daddr64_t *bap, *sbap, *ebap = 0; struct cluster_save *buflist; struct ufsmount *ump; ufs_lbn_t start_lbn, end_lbn; - ufs2_daddr_t soff, newblk, blkno, pref; + daddr64_t soff, newblk, blkno, pref; struct indir start_ap[NIADDR + 1], end_ap[NIADDR + 1], *idp; int i, len, start_lvl, end_lvl, ssize; @@ -643,7 +643,7 @@ ffs2_reallocblks(void *v) brelse(sbp); return (ENOSPC); } - sbap = (ufs2_daddr_t *)sbp->b_data; + sbap = (daddr64_t *)sbp->b_data; soff = idp->in_off; } @@ -660,7 +660,7 @@ ffs2_reallocblks(void *v) ssize = len - (idp->in_off + 1); if (bread(vp, idp->in_lbn, (int)fs->fs_bsize, NOCRED, &ebp)) goto fail; - ebap = (ufs2_daddr_t *)ebp->b_data; + ebap = (daddr64_t *)ebp->b_data; } /* @@ -1086,8 +1086,8 @@ ffs1_blkpref(struct inode *ip, daddr_t lbn, int indx, ufs1_daddr_t *bap) * Same as above, for UFS2. */ #ifdef FFS2 -ufs2_daddr_t -ffs2_blkpref(struct inode *ip, daddr_t lbn, int indx, ufs2_daddr_t *bap) +daddr64_t +ffs2_blkpref(struct inode *ip, daddr_t lbn, int indx, daddr64_t *bap) { struct fs *fs; int cg, avgbfree, startcg; diff --git a/sys/ufs/ffs/ffs_balloc.c b/sys/ufs/ffs/ffs_balloc.c index c4d0e1af4f0..e3f334985b8 100644 --- a/sys/ufs/ffs/ffs_balloc.c +++ b/sys/ufs/ffs/ffs_balloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_balloc.c,v 1.32 2007/05/26 20:26:51 pedro Exp $ */ +/* $OpenBSD: ffs_balloc.c,v 1.33 2007/06/01 06:38:54 deraadt Exp $ */ /* $NetBSD: ffs_balloc.c,v 1.3 1996/02/09 22:22:21 christos Exp $ */ /* @@ -439,7 +439,7 @@ ffs2_balloc(struct inode *ip, off_t off, int size, struct ucred *cred, { daddr_t lbn, lastlbn, nb, newb, *blkp; daddr_t pref, *allocblk, allociblk[NIADDR + 1]; - ufs2_daddr_t *bap, *allocib; + daddr64_t *bap, *allocib; int deallocated, osize, nsize, num, i, error, unwindidx, r; struct buf *bp, *nbp; struct indir indirs[NIADDR + 2]; diff --git a/sys/ufs/ffs/ffs_extern.h b/sys/ufs/ffs/ffs_extern.h index 767aaabe2ab..e47ac645eab 100644 --- a/sys/ufs/ffs/ffs_extern.h +++ b/sys/ufs/ffs/ffs_extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_extern.h,v 1.29 2006/06/21 10:01:10 mickey Exp $ */ +/* $OpenBSD: ffs_extern.h,v 1.30 2007/06/01 06:38:54 deraadt Exp $ */ /* $NetBSD: ffs_extern.h,v 1.4 1996/02/09 22:22:22 christos Exp $ */ /* @@ -108,7 +108,7 @@ int ffs_freefile(struct inode *, ino_t, mode_t); ufs1_daddr_t ffs1_blkpref(struct inode *, daddr_t, int, ufs1_daddr_t *); #ifdef FFS2 -ufs2_daddr_t ffs2_blkpref(struct inode *, daddr_t, int, ufs2_daddr_t *); +daddr64_t ffs2_blkpref(struct inode *, daddr_t, int, daddr64_t *); #endif void ffs_blkfree(struct inode *, daddr_t, long); void ffs_clusteracct(struct fs *, struct cg *, daddr_t, int); diff --git a/sys/ufs/ffs/ffs_inode.c b/sys/ufs/ffs/ffs_inode.c index 6d0371158cb..6bbe2d0688a 100644 --- a/sys/ufs/ffs/ffs_inode.c +++ b/sys/ufs/ffs/ffs_inode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_inode.c,v 1.47 2007/05/26 20:26:51 pedro Exp $ */ +/* $OpenBSD: ffs_inode.c,v 1.48 2007/06/01 06:38:54 deraadt Exp $ */ /* $NetBSD: ffs_inode.c,v 1.10 1996/05/11 18:27:19 mycroft Exp $ */ /* @@ -162,9 +162,9 @@ int ffs_truncate(struct inode *oip, off_t length, int flags, struct ucred *cred) { struct vnode *ovp; - ufs2_daddr_t lastblock; - ufs2_daddr_t bn, lbn, lastiblock[NIADDR], indir_lbn[NIADDR]; - ufs2_daddr_t oldblks[NDADDR + NIADDR], newblks[NDADDR + NIADDR]; + daddr64_t lastblock; + daddr64_t bn, lbn, lastiblock[NIADDR], indir_lbn[NIADDR]; + daddr64_t oldblks[NDADDR + NIADDR], newblks[NDADDR + NIADDR]; struct fs *fs; struct buf *bp; int offset, size, level; @@ -479,7 +479,7 @@ ffs_indirtrunc(struct inode *ip, daddr_t lbn, daddr_t dbn, daddr_t lastbn, int error = 0, allerror = 0; ufs1_daddr_t *bap1 = NULL; #ifdef FFS2 - ufs2_daddr_t *bap2 = NULL; + daddr64_t *bap2 = NULL; #endif /* @@ -521,7 +521,7 @@ ffs_indirtrunc(struct inode *ip, daddr_t lbn, daddr_t dbn, daddr_t lastbn, #ifdef FFS2 if (ip->i_ump->um_fstype == UM_UFS2) - bap2 = (ufs2_daddr_t *) bp->b_data; + bap2 = (daddr64_t *) bp->b_data; else #endif bap1 = (ufs1_daddr_t *) bp->b_data; @@ -543,7 +543,7 @@ ffs_indirtrunc(struct inode *ip, daddr_t lbn, daddr_t dbn, daddr_t lastbn, #ifdef FFS2 if (ip->i_ump->um_fstype == UM_UFS2) - bap2 = (ufs2_daddr_t *) copy; + bap2 = (daddr64_t *) copy; else #endif bap1 = (ufs1_daddr_t *) copy; diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index 40f99e7a890..850766e5859 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_softdep.c,v 1.88 2007/05/27 20:06:40 otto Exp $ */ +/* $OpenBSD: ffs_softdep.c,v 1.89 2007/06/01 06:38:54 deraadt Exp $ */ /* * Copyright 1998, 2000 Marshall Kirk McKusick. All Rights Reserved. @@ -1852,7 +1852,7 @@ setup_allocindir_phase2(bp, ip, aip) ((ufs1_daddr_t *)indirdep->ir_savebp->b_data) [aip->ai_offset] = aip->ai_oldblkno; else - ((ufs2_daddr_t *)indirdep->ir_savebp->b_data) + ((daddr64_t *)indirdep->ir_savebp->b_data) [aip->ai_offset] = aip->ai_oldblkno; FREE_LOCK(&lk); if (freefrag != NULL) @@ -2469,7 +2469,7 @@ indir_trunc(ip, dbn, level, lbn, countp) { struct buf *bp; ufs1_daddr_t *bap1 = NULL; - ufs2_daddr_t nb, *bap2 = NULL; + daddr64_t nb, *bap2 = NULL; struct fs *fs; struct worklist *wk; struct indirdep *indirdep; @@ -2522,7 +2522,7 @@ indir_trunc(ip, dbn, level, lbn, countp) bap1 = (ufs1_daddr_t *) bp->b_data; } else { ufs1fmt = 0; - bap2 = (ufs2_daddr_t *) bp->b_data; + bap2 = (daddr64_t *) bp->b_data; } nblocks = btodb(fs->fs_bsize); for (i = NINDIR(fs) - 1; i >= 0; i--) { @@ -3591,7 +3591,7 @@ initiate_write_inodeblock_ufs2(inodedep, bp) struct ufs2_dinode *dp; struct fs *fs = inodedep->id_fs; #ifdef DIAGNOSTIC - ufs2_daddr_t prevlbn = -1, d1, d2; + daddr64_t prevlbn = -1, d1, d2; #endif int deplist, i; @@ -4029,7 +4029,7 @@ handle_allocindir_partdone(aip) ((ufs1_daddr_t *)indirdep->ir_savebp->b_data)[aip->ai_offset] = aip->ai_newblkno; else - ((ufs2_daddr_t *)indirdep->ir_savebp->b_data)[aip->ai_offset] = + ((daddr64_t *)indirdep->ir_savebp->b_data)[aip->ai_offset] = aip->ai_newblkno; LIST_REMOVE(aip, ai_next); if (aip->ai_freefrag != NULL) diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index c9a5d6134fd..daaee190f0a 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_vfsops.c,v 1.106 2007/05/29 19:02:33 otto Exp $ */ +/* $OpenBSD: ffs_vfsops.c,v 1.107 2007/06/01 06:38:54 deraadt Exp $ */ /* $NetBSD: ffs_vfsops.c,v 1.19 1996/02/09 22:22:26 christos Exp $ */ /* @@ -69,7 +69,7 @@ int ffs_reload_vnode(struct vnode *, void *); int ffs_sync_vnode(struct vnode *, void *); int ffs_validate(struct fs *); -void ffs1_compat_read(struct fs *, struct ufsmount *, ufs2_daddr_t); +void ffs1_compat_read(struct fs *, struct ufsmount *, daddr64_t); void ffs1_compat_write(struct fs *, struct ufsmount *); const struct vfsops ffs_vfsops = { @@ -670,7 +670,7 @@ ffs_mountfs(struct vnode *devvp, struct mount *mp, struct proc *p) dev_t dev; struct partinfo dpart; caddr_t space; - ufs2_daddr_t sbloc; + daddr64_t sbloc; int error, i, blks, size, ronly; int32_t *lp; size_t strsize; @@ -960,7 +960,7 @@ ffs_oldfscompat(struct fs *fs) * Auxiliary function for reading FFS1 super blocks. */ void -ffs1_compat_read(struct fs *fs, struct ufsmount *ump, ufs2_daddr_t sbloc) +ffs1_compat_read(struct fs *fs, struct ufsmount *ump, daddr64_t sbloc) { if (fs->fs_magic == FS_UFS2_MAGIC) return; /* UFS2 */ diff --git a/sys/ufs/ufs/dinode.h b/sys/ufs/ufs/dinode.h index b8254abede3..24547e824d6 100644 --- a/sys/ufs/ufs/dinode.h +++ b/sys/ufs/ufs/dinode.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dinode.h,v 1.11 2005/12/19 15:18:01 pedro Exp $ */ +/* $OpenBSD: dinode.h,v 1.12 2007/06/01 06:38:56 deraadt Exp $ */ /* $NetBSD: dinode.h,v 1.7 1995/06/15 23:22:48 cgd Exp $ */ /* @@ -57,7 +57,6 @@ typedef int32_t ufs_daddr_t; typedef int32_t ufs1_daddr_t; -typedef int64_t ufs2_daddr_t; typedef int64_t ufs_lbn_t; typedef int64_t ufs_time_t; @@ -109,9 +108,9 @@ struct ufs2_dinode { u_int32_t di_kernflags; /* 84: Kernel flags. */ u_int32_t di_flags; /* 88: Status flags (chflags). */ int32_t di_extsize; /* 92: External attributes block. */ - ufs2_daddr_t di_extb[NXADDR];/* 96: External attributes block. */ - ufs2_daddr_t di_db[NDADDR]; /* 112: Direct disk blocks. */ - ufs2_daddr_t di_ib[NIADDR]; /* 208: Indirect disk blocks. */ + daddr64_t di_extb[NXADDR];/* 96: External attributes block. */ + daddr64_t di_db[NDADDR]; /* 112: Direct disk blocks. */ + daddr64_t di_ib[NIADDR]; /* 208: Indirect disk blocks. */ int64_t di_spare[3]; /* 232: Reserved; currently unused */ }; @@ -129,7 +128,7 @@ struct ufs2_dinode { #define di_shortlink di_db #define MAXSYMLINKLEN_UFS1 ((NDADDR + NIADDR) * sizeof(ufs1_daddr_t)) -#define MAXSYMLINKLEN_UFS2 ((NDADDR + NIADDR) * sizeof(ufs2_daddr_t)) +#define MAXSYMLINKLEN_UFS2 ((NDADDR + NIADDR) * sizeof(daddr64_t)) #define MAXSYMLINKLEN(ip) \ ((ip)->i_ump->um_fstype == UM_UFS1) ? \ diff --git a/sys/ufs/ufs/ufs_bmap.c b/sys/ufs/ufs/ufs_bmap.c index df8ba0d45f9..f981d81bfbc 100644 --- a/sys/ufs/ufs/ufs_bmap.c +++ b/sys/ufs/ufs/ufs_bmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ufs_bmap.c,v 1.21 2006/10/03 19:49:06 pedro Exp $ */ +/* $OpenBSD: ufs_bmap.c,v 1.22 2007/06/01 06:38:56 deraadt Exp $ */ /* $NetBSD: ufs_bmap.c,v 1.3 1996/02/09 22:36:00 christos Exp $ */ /* @@ -103,7 +103,7 @@ ufs_bmaparray(struct vnode *vp, daddr_t bn, daddr64_t *bnp, struct indir *ap, struct mount *mp; struct vnode *devvp; struct indir a[NIADDR+1], *xap; - ufs2_daddr_t daddr; + daddr64_t daddr; long metalbn; int error, maxrun = 0, num; @@ -189,13 +189,13 @@ ufs_bmaparray(struct vnode *vp, daddr_t bn, daddr64_t *bnp, struct indir *ap, #ifdef FFS2 if (ip->i_ump->um_fstype == UM_UFS2) { - daddr = ((ufs2_daddr_t *)bp->b_data)[xap->in_off]; + daddr = ((daddr64_t *)bp->b_data)[xap->in_off]; if (num == 1 && daddr && runp) for (bn = xap->in_off + 1; bn < MNINDIR(ump) && *runp < maxrun && is_sequential(ump, - ((ufs2_daddr_t *)bp->b_data)[bn - 1], - ((ufs2_daddr_t *)bp->b_data)[bn]); + ((daddr64_t *)bp->b_data)[bn - 1], + ((daddr64_t *)bp->b_data)[bn]); ++bn, ++*runp); continue; |