diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2013-06-11 16:42:20 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2013-06-11 16:42:20 +0000 |
commit | 6b46236c83f9aa5b9cd59b466eeba348ee23825a (patch) | |
tree | ef7eca8601ed03d00b5a9a53b3355f66ed478486 /sys/ufs | |
parent | cc20036a151815396b8c4285e8b3b56f0172f1d5 (diff) |
final removal of daddr64_t. daddr_t has been 64 bit for a long enough
test period; i think 3 years ago the last bugs fell out.
ok otto beck others
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ext2fs/ext2fs.h | 6 | ||||
-rw-r--r-- | sys/ufs/ext2fs/ext2fs_alloc.c | 4 | ||||
-rw-r--r-- | sys/ufs/ext2fs/ext2fs_balloc.c | 6 | ||||
-rw-r--r-- | sys/ufs/ext2fs/ext2fs_bmap.c | 6 | ||||
-rw-r--r-- | sys/ufs/ext2fs/ext2fs_extern.h | 6 | ||||
-rw-r--r-- | sys/ufs/ext2fs/ext2fs_readwrite.c | 4 | ||||
-rw-r--r-- | sys/ufs/ext2fs/ext2fs_subr.c | 6 | ||||
-rw-r--r-- | sys/ufs/ext2fs/ext2fs_vfsops.c | 6 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_alloc.c | 100 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_balloc.c | 10 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_extern.h | 38 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_inode.c | 18 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_softdep.c | 54 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_softdep_stub.c | 14 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_subr.c | 24 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_vfsops.c | 8 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_vnops.c | 6 | ||||
-rw-r--r-- | sys/ufs/ffs/fs.h | 10 | ||||
-rw-r--r-- | sys/ufs/ffs/softdep.h | 22 | ||||
-rw-r--r-- | sys/ufs/ufs/inode.h | 4 | ||||
-rw-r--r-- | sys/ufs/ufs/quota.h | 6 | ||||
-rw-r--r-- | sys/ufs/ufs/ufs_bmap.c | 10 | ||||
-rw-r--r-- | sys/ufs/ufs/ufs_extern.h | 6 | ||||
-rw-r--r-- | sys/ufs/ufs/ufs_quota.c | 6 | ||||
-rw-r--r-- | sys/ufs/ufs/ufs_quota_stub.c | 6 | ||||
-rw-r--r-- | sys/ufs/ufs/ufs_vnops.c | 4 |
26 files changed, 195 insertions, 195 deletions
diff --git a/sys/ufs/ext2fs/ext2fs.h b/sys/ufs/ext2fs/ext2fs.h index f471f163679..01e125fa384 100644 --- a/sys/ufs/ext2fs/ext2fs.h +++ b/sys/ufs/ext2fs/ext2fs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ext2fs.h,v 1.14 2010/02/16 08:24:13 otto Exp $ */ +/* $OpenBSD: ext2fs.h,v 1.15 2013/06/11 16:42:18 deraadt Exp $ */ /* $NetBSD: ext2fs.h,v 1.10 2000/01/28 16:00:23 bouyer Exp $ */ /* @@ -55,8 +55,8 @@ #define SBSIZE 1024 #define BBOFF ((off_t)(0)) #define SBOFF ((off_t)(BBOFF + BBSIZE)) -#define BBLOCK ((daddr64_t)(0)) -#define SBLOCK ((daddr64_t)(BBLOCK + BBSIZE / DEV_BSIZE)) +#define BBLOCK ((daddr_t)(0)) +#define SBLOCK ((daddr_t)(BBLOCK + BBSIZE / DEV_BSIZE)) /* * Addresses stored in inodes are capable of addressing blocks diff --git a/sys/ufs/ext2fs/ext2fs_alloc.c b/sys/ufs/ext2fs/ext2fs_alloc.c index 508376cf9c0..017834135db 100644 --- a/sys/ufs/ext2fs/ext2fs_alloc.c +++ b/sys/ufs/ext2fs/ext2fs_alloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ext2fs_alloc.c,v 1.28 2013/05/30 19:19:09 guenther Exp $ */ +/* $OpenBSD: ext2fs_alloc.c,v 1.29 2013/06/11 16:42:18 deraadt Exp $ */ /* $NetBSD: ext2fs_alloc.c,v 1.10 2001/07/05 08:38:27 toshii Exp $ */ /* @@ -218,7 +218,7 @@ ext2fs_dirpref(struct m_ext2fs *fs) * contigously. The two fields of the ext2 inode extension (see * ufs/ufs/inode.h) help this. */ -daddr64_t +daddr_t ext2fs_blkpref(struct inode *ip, int32_t lbn, int indx, int32_t *bap) { struct m_ext2fs *fs; diff --git a/sys/ufs/ext2fs/ext2fs_balloc.c b/sys/ufs/ext2fs/ext2fs_balloc.c index 0d4d4d1ddaf..d9021187984 100644 --- a/sys/ufs/ext2fs/ext2fs_balloc.c +++ b/sys/ufs/ext2fs/ext2fs_balloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ext2fs_balloc.c,v 1.18 2011/07/04 04:30:41 tedu Exp $ */ +/* $OpenBSD: ext2fs_balloc.c,v 1.19 2013/06/11 16:42:18 deraadt Exp $ */ /* $NetBSD: ext2fs_balloc.c,v 1.10 2001/07/04 21:16:01 chs Exp $ */ /* @@ -56,7 +56,7 @@ * the inode and the logical block number in a file. */ int -ext2fs_buf_alloc(struct inode *ip, daddr64_t bn, int size, struct ucred *cred, +ext2fs_buf_alloc(struct inode *ip, daddr_t bn, int size, struct ucred *cred, struct buf **bpp, int flags) { struct m_ext2fs *fs; @@ -68,7 +68,7 @@ ext2fs_buf_alloc(struct inode *ip, daddr64_t bn, int size, struct ucred *cred, u_int deallocated; int32_t *allocib, *blkp, *allocblk, allociblk[NIADDR + 1]; int unwindidx = -1; - daddr64_t lbn, pref; + daddr_t lbn, pref; *bpp = NULL; if (bn < 0) diff --git a/sys/ufs/ext2fs/ext2fs_bmap.c b/sys/ufs/ext2fs/ext2fs_bmap.c index ec77ae33ec5..4a5c5b26b8b 100644 --- a/sys/ufs/ext2fs/ext2fs_bmap.c +++ b/sys/ufs/ext2fs/ext2fs_bmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ext2fs_bmap.c,v 1.20 2012/03/23 15:51:26 guenther Exp $ */ +/* $OpenBSD: ext2fs_bmap.c,v 1.21 2013/06/11 16:42:18 deraadt Exp $ */ /* $NetBSD: ext2fs_bmap.c,v 1.5 2000/03/30 12:41:11 augustss Exp $ */ /* @@ -55,7 +55,7 @@ #include <ufs/ext2fs/ext2fs.h> #include <ufs/ext2fs/ext2fs_extern.h> -static int ext2fs_bmaparray(struct vnode *, int32_t, daddr64_t *, +static int ext2fs_bmaparray(struct vnode *, int32_t, daddr_t *, struct indir *, int *, int *); /* @@ -95,7 +95,7 @@ ext2fs_bmap(void *v) */ int -ext2fs_bmaparray(struct vnode *vp, int32_t bn, daddr64_t *bnp, +ext2fs_bmaparray(struct vnode *vp, int32_t bn, daddr_t *bnp, struct indir *ap, int *nump, int *runp) { struct inode *ip; diff --git a/sys/ufs/ext2fs/ext2fs_extern.h b/sys/ufs/ext2fs/ext2fs_extern.h index 2e114e2ac59..e14bd4a3573 100644 --- a/sys/ufs/ext2fs/ext2fs_extern.h +++ b/sys/ufs/ext2fs/ext2fs_extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ext2fs_extern.h,v 1.31 2013/05/30 19:19:09 guenther Exp $ */ +/* $OpenBSD: ext2fs_extern.h,v 1.32 2013/06/11 16:42:18 deraadt Exp $ */ /* $NetBSD: ext2fs_extern.h,v 1.1 1997/06/11 09:33:55 bouyer Exp $ */ /*- @@ -64,12 +64,12 @@ int ext2fs_realloccg(struct inode *, int32_t, int32_t, int, int, int ext2fs_reallocblks(void *); int ext2fs_inode_alloc(struct inode *pip, mode_t mode, struct ucred *, struct vnode **); -daddr64_t ext2fs_blkpref(struct inode *, int32_t, int, int32_t *); +daddr_t ext2fs_blkpref(struct inode *, int32_t, int, int32_t *); void ext2fs_blkfree(struct inode *, int32_t); int ext2fs_inode_free(struct inode *pip, ufsino_t ino, mode_t mode); /* ext2fs_balloc.c */ -int ext2fs_buf_alloc(struct inode *, daddr64_t, int, struct ucred *, +int ext2fs_buf_alloc(struct inode *, daddr_t, int, struct ucred *, struct buf **, int); /* ext2fs_bmap.c */ diff --git a/sys/ufs/ext2fs/ext2fs_readwrite.c b/sys/ufs/ext2fs/ext2fs_readwrite.c index 8e4060695d0..fe05a011116 100644 --- a/sys/ufs/ext2fs/ext2fs_readwrite.c +++ b/sys/ufs/ext2fs/ext2fs_readwrite.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ext2fs_readwrite.c,v 1.24 2012/07/11 12:39:20 guenther Exp $ */ +/* $OpenBSD: ext2fs_readwrite.c,v 1.25 2013/06/11 16:42:18 deraadt Exp $ */ /* $NetBSD: ext2fs_readwrite.c,v 1.16 2001/02/27 04:37:47 chs Exp $ */ /*- @@ -70,7 +70,7 @@ ext2fs_read(void *v) struct uio *uio; struct m_ext2fs *fs; struct buf *bp; - daddr64_t lbn, nextlbn; + daddr_t lbn, nextlbn; off_t bytesinfile; long size, xfersize, blkoffset; int error; diff --git a/sys/ufs/ext2fs/ext2fs_subr.c b/sys/ufs/ext2fs/ext2fs_subr.c index eabec5a499f..2d99e193ac7 100644 --- a/sys/ufs/ext2fs/ext2fs_subr.c +++ b/sys/ufs/ext2fs/ext2fs_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ext2fs_subr.c,v 1.27 2011/07/04 20:35:35 deraadt Exp $ */ +/* $OpenBSD: ext2fs_subr.c,v 1.28 2013/06/11 16:42:18 deraadt Exp $ */ /* $NetBSD: ext2fs_subr.c,v 1.1 1997/06/11 09:34:03 bouyer Exp $ */ /* @@ -107,7 +107,7 @@ ext2fs_checkoverlap(struct buf *bp, struct inode *ip) { struct buf *ep; struct vnode *vp; - daddr64_t start, last; + daddr_t start, last; start = bp->b_blkno; last = start + btodb(bp->b_bcount) - 1; @@ -115,7 +115,7 @@ ext2fs_checkoverlap(struct buf *bp, struct inode *ip) if (ep == bp || (ep->b_flags & B_INVAL) || ep->b_vp == NULLVP) continue; - if (VOP_BMAP(ep->b_vp, (daddr64_t)0, &vp, NULL, NULL)) + if (VOP_BMAP(ep->b_vp, (daddr_t)0, &vp, NULL, NULL)) continue; if (vp != ip->i_devvp) continue; diff --git a/sys/ufs/ext2fs/ext2fs_vfsops.c b/sys/ufs/ext2fs/ext2fs_vfsops.c index 991a34452da..6c289a649f8 100644 --- a/sys/ufs/ext2fs/ext2fs_vfsops.c +++ b/sys/ufs/ext2fs/ext2fs_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ext2fs_vfsops.c,v 1.67 2013/05/30 19:19:09 guenther Exp $ */ +/* $OpenBSD: ext2fs_vfsops.c,v 1.68 2013/06/11 16:42:18 deraadt Exp $ */ /* $NetBSD: ext2fs_vfsops.c,v 1.1 1997/06/11 09:34:07 bouyer Exp $ */ /* @@ -407,7 +407,7 @@ ext2fs_reload(struct mount *mountp, struct ucred *cred, struct proc *p) /* * Step 2: re-read superblock from disk. */ - error = bread(devvp, (daddr64_t)(SBOFF / DEV_BSIZE), SBSIZE, &bp); + error = bread(devvp, (daddr_t)(SBOFF / DEV_BSIZE), SBSIZE, &bp); if (error) { brelse(bp); return (error); @@ -506,7 +506,7 @@ ext2fs_mountfs(struct vnode *devvp, struct mount *mp, struct proc *p) #ifdef DEBUG_EXT2 printf("ext2 sb size: %d\n", sizeof(struct ext2fs)); #endif - error = bread(devvp, (daddr64_t)(SBOFF / DEV_BSIZE), SBSIZE, &bp); + error = bread(devvp, (daddr_t)(SBOFF / DEV_BSIZE), SBSIZE, &bp); if (error) goto out; fs = (struct ext2fs *)bp->b_data; diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c index 0f9d448975f..78ed796e954 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.95 2013/06/08 23:02:26 beck Exp $ */ +/* $OpenBSD: ffs_alloc.c,v 1.96 2013/06/11 16:42:18 deraadt Exp $ */ /* $NetBSD: ffs_alloc.c,v 1.11 1996/05/11 18:27:09 mycroft Exp $ */ /* @@ -69,16 +69,16 @@ (fs)->fs_fsmnt, (cp)); \ } while (0) -daddr64_t ffs_alloccg(struct inode *, int, daddr64_t, int); +daddr_t ffs_alloccg(struct inode *, int, daddr_t, int); struct buf * ffs_cgread(struct fs *, struct inode *, int); -daddr64_t ffs_alloccgblk(struct inode *, struct buf *, daddr64_t); -daddr64_t ffs_clusteralloc(struct inode *, int, daddr64_t, int); +daddr_t ffs_alloccgblk(struct inode *, struct buf *, daddr_t); +daddr_t ffs_clusteralloc(struct inode *, int, daddr_t, int); ufsino_t ffs_dirpref(struct inode *); -daddr64_t ffs_fragextend(struct inode *, int, daddr64_t, int, int); -daddr64_t ffs_hashalloc(struct inode *, int, daddr64_t, int, - daddr64_t (*)(struct inode *, int, daddr64_t, int)); -daddr64_t ffs_nodealloccg(struct inode *, int, daddr64_t, int); -daddr64_t ffs_mapsearch(struct fs *, struct cg *, daddr64_t, int); +daddr_t ffs_fragextend(struct inode *, int, daddr_t, int, int); +daddr_t ffs_hashalloc(struct inode *, int, daddr_t, int, + daddr_t (*)(struct inode *, int, daddr_t, int)); +daddr_t ffs_nodealloccg(struct inode *, int, daddr_t, int); +daddr_t ffs_mapsearch(struct fs *, struct cg *, daddr_t, int); int ffs1_reallocblks(void *); #ifdef FFS2 @@ -86,7 +86,7 @@ int ffs2_reallocblks(void *); #endif #ifdef DIAGNOSTIC -int ffs_checkblk(struct inode *, daddr64_t, long); +int ffs_checkblk(struct inode *, daddr_t, long); #endif static const struct timeval fserr_interval = { 2, 0 }; @@ -112,12 +112,12 @@ static const struct timeval fserr_interval = { 2, 0 }; * available block is located. */ int -ffs_alloc(struct inode *ip, daddr64_t lbn, daddr64_t bpref, int size, - struct ucred *cred, daddr64_t *bnp) +ffs_alloc(struct inode *ip, daddr_t lbn, daddr_t bpref, int size, + struct ucred *cred, daddr_t *bnp) { static struct timeval fsfull_last; struct fs *fs; - daddr64_t bno; + daddr_t bno; int cg; int error; @@ -183,15 +183,15 @@ nospace: * invoked to get an appropriate block. */ int -ffs_realloccg(struct inode *ip, daddr64_t lbprev, daddr64_t bpref, int osize, - int nsize, struct ucred *cred, struct buf **bpp, daddr64_t *blknop) +ffs_realloccg(struct inode *ip, daddr_t lbprev, daddr_t bpref, int osize, + int nsize, struct ucred *cred, struct buf **bpp, daddr_t *blknop) { static struct timeval fsfull_last; struct fs *fs; struct buf *bp = NULL; - daddr64_t quota_updated = 0; + daddr_t quota_updated = 0; int cg, request, error; - daddr64_t bprev, bno; + daddr_t bprev, bno; if (bpp != NULL) *bpp = NULL; @@ -381,7 +381,7 @@ ffs1_reallocblks(void *v) struct buf *sbp, *ebp; int32_t *bap, *sbap, *ebap = NULL; struct cluster_save *buflist; - daddr64_t start_lbn, end_lbn, soff, newblk, blkno; + daddr_t start_lbn, end_lbn, soff, newblk, blkno; struct indir start_ap[NIADDR + 1], end_ap[NIADDR + 1], *idp; int i, len, start_lvl, end_lvl, pref, ssize; @@ -582,10 +582,10 @@ ffs2_reallocblks(void *v) struct inode *ip; struct vnode *vp; struct buf *sbp, *ebp; - daddr64_t *bap, *sbap, *ebap = NULL; + daddr_t *bap, *sbap, *ebap = NULL; struct cluster_save *buflist; - daddr64_t start_lbn, end_lbn; - daddr64_t soff, newblk, blkno, pref; + daddr_t start_lbn, end_lbn; + daddr_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 = (daddr64_t *)sbp->b_data; + sbap = (daddr_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, &ebp)) goto fail; - ebap = (daddr64_t *)ebp->b_data; + ebap = (daddr_t *)ebp->b_data; } /* @@ -880,7 +880,7 @@ ffs_inode_alloc(struct inode *pip, mode_t mode, struct ucred *cred, if (DIP(ip, blocks)) { printf("free inode %s/%d had %lld blocks\n", - fs->fs_fsmnt, ino, (daddr64_t)DIP(ip, blocks)); + fs->fs_fsmnt, ino, (daddr_t)DIP(ip, blocks)); DIP_ASSIGN(ip, blocks, 0); } @@ -1066,7 +1066,7 @@ end: * allocated. */ int32_t -ffs1_blkpref(struct inode *ip, daddr64_t lbn, int indx, int32_t *bap) +ffs1_blkpref(struct inode *ip, daddr_t lbn, int indx, int32_t *bap) { struct fs *fs; int cg, inocg, avgbfree, startcg; @@ -1166,7 +1166,7 @@ ffs1_blkpref(struct inode *ip, daddr64_t lbn, int indx, int32_t *bap) */ #ifdef FFS2 int64_t -ffs2_blkpref(struct inode *ip, daddr64_t lbn, int indx, int64_t *bap) +ffs2_blkpref(struct inode *ip, daddr_t lbn, int indx, int64_t *bap) { struct fs *fs; int cg, inocg, avgbfree, startcg; @@ -1273,12 +1273,12 @@ ffs2_blkpref(struct inode *ip, daddr64_t lbn, int indx, int64_t *bap) * 3) brute force search for a free block. */ /*VARARGS5*/ -daddr64_t -ffs_hashalloc(struct inode *ip, int cg, daddr64_t pref, int size, - daddr64_t (*allocator)(struct inode *, int, daddr64_t, int)) +daddr_t +ffs_hashalloc(struct inode *ip, int cg, daddr_t pref, int size, + daddr_t (*allocator)(struct inode *, int, daddr_t, int)) { struct fs *fs; - daddr64_t result; + daddr_t result; int i, icg = cg; fs = ip->i_fs; @@ -1341,13 +1341,13 @@ ffs_cgread(struct fs *fs, struct inode *ip, int cg) * Check to see if the necessary fragments are available, and * if they are, allocate them. */ -daddr64_t -ffs_fragextend(struct inode *ip, int cg, daddr64_t bprev, int osize, int nsize) +daddr_t +ffs_fragextend(struct inode *ip, int cg, daddr_t bprev, int osize, int nsize) { struct fs *fs; struct cg *cgp; struct buf *bp; - daddr64_t bno; + daddr_t bno; int i, frags, bbase; fs = ip->i_fs; @@ -1404,13 +1404,13 @@ ffs_fragextend(struct inode *ip, int cg, daddr64_t bprev, int osize, int nsize) * Check to see if a block of the appropriate size is available, * and if it is, allocate it. */ -daddr64_t -ffs_alloccg(struct inode *ip, int cg, daddr64_t bpref, int size) +daddr_t +ffs_alloccg(struct inode *ip, int cg, daddr_t bpref, int size) { struct fs *fs; struct cg *cgp; struct buf *bp; - daddr64_t bno, blkno; + daddr_t bno, blkno; int i, frags, allocsiz; fs = ip->i_fs; @@ -1493,12 +1493,12 @@ ffs_alloccg(struct inode *ip, int cg, daddr64_t bpref, int size) * Note that this routine only allocates fs_bsize blocks; these * blocks may be fragmented by the routine that allocates them. */ -daddr64_t -ffs_alloccgblk(struct inode *ip, struct buf *bp, daddr64_t bpref) +daddr_t +ffs_alloccgblk(struct inode *ip, struct buf *bp, daddr_t bpref) { struct fs *fs; struct cg *cgp; - daddr64_t bno, blkno; + daddr_t bno, blkno; u_int8_t *blksfree; int cylno, cgbpref; @@ -1562,8 +1562,8 @@ gotit: * are multiple choices in the same cylinder group. Instead we just * take the first one that we find following bpref. */ -daddr64_t -ffs_clusteralloc(struct inode *ip, int cg, daddr64_t bpref, int len) +daddr_t +ffs_clusteralloc(struct inode *ip, int cg, daddr_t bpref, int len) { struct fs *fs; struct cg *cgp; @@ -1669,8 +1669,8 @@ fail: } /* inode allocation routine */ -daddr64_t -ffs_nodealloccg(struct inode *ip, int cg, daddr64_t ipref, int mode) +daddr_t +ffs_nodealloccg(struct inode *ip, int cg, daddr_t ipref, int mode) { struct fs *fs; struct cg *cgp; @@ -1833,12 +1833,12 @@ gotit: * block reassembly is checked. */ void -ffs_blkfree(struct inode *ip, daddr64_t bno, long size) +ffs_blkfree(struct inode *ip, daddr_t bno, long size) { struct fs *fs; struct cg *cgp; struct buf *bp; - daddr64_t blkno; + daddr_t blkno; int i, cg, blk, frags, bbase; fs = ip->i_fs; @@ -1997,7 +1997,7 @@ ffs_freefile(struct inode *pip, ufsino_t ino, mode_t mode) * fragment is allocated, false if it is free. */ int -ffs_checkblk(struct inode *ip, daddr64_t bno, long size) +ffs_checkblk(struct inode *ip, daddr_t bno, long size) { struct fs *fs; struct cg *cgp; @@ -2040,10 +2040,10 @@ ffs_checkblk(struct inode *ip, daddr64_t bno, long size) * It is a panic if a request is made to find a block if none are * available. */ -daddr64_t -ffs_mapsearch(struct fs *fs, struct cg *cgp, daddr64_t bpref, int allocsiz) +daddr_t +ffs_mapsearch(struct fs *fs, struct cg *cgp, daddr_t bpref, int allocsiz) { - daddr64_t bno; + daddr_t bno; int start, len, loc, i; int blk, field, subfield, pos; @@ -2101,7 +2101,7 @@ ffs_mapsearch(struct fs *fs, struct cg *cgp, daddr64_t bpref, int allocsiz) * Cnt == 1 means free; cnt == -1 means allocating. */ void -ffs_clusteracct(struct fs *fs, struct cg *cgp, daddr64_t blkno, int cnt) +ffs_clusteracct(struct fs *fs, struct cg *cgp, daddr_t blkno, int cnt) { int32_t *sump; int32_t *lp; diff --git a/sys/ufs/ffs/ffs_balloc.c b/sys/ufs/ffs/ffs_balloc.c index dba063771c1..54befa03d4a 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.38 2013/04/23 20:42:38 tedu Exp $ */ +/* $OpenBSD: ffs_balloc.c,v 1.39 2013/06/11 16:42:18 deraadt Exp $ */ /* $NetBSD: ffs_balloc.c,v 1.3 1996/02/09 22:22:21 christos Exp $ */ /* @@ -73,7 +73,7 @@ int ffs1_balloc(struct inode *ip, off_t startoffset, int size, struct ucred *cred, int flags, struct buf **bpp) { - daddr64_t lbn, nb, newb, pref; + daddr_t lbn, nb, newb, pref; struct fs *fs; struct buf *bp, *nbp; struct vnode *vp; @@ -433,9 +433,9 @@ int ffs2_balloc(struct inode *ip, off_t off, int size, struct ucred *cred, int flags, struct buf **bpp) { - daddr64_t lbn, lastlbn, nb, newb, *blkp; - daddr64_t pref, *allocblk, allociblk[NIADDR + 1]; - daddr64_t *bap, *allocib; + daddr_t lbn, lastlbn, nb, newb, *blkp; + daddr_t pref, *allocblk, allociblk[NIADDR + 1]; + daddr_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 9514cc99372..653c669ed14 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.38 2013/05/30 19:19:09 guenther Exp $ */ +/* $OpenBSD: ffs_extern.h,v 1.39 2013/06/11 16:42:18 deraadt Exp $ */ /* $NetBSD: ffs_extern.h,v 1.4 1996/02/09 22:22:22 christos Exp $ */ /* @@ -99,21 +99,21 @@ extern struct vops ffs_specvops; extern struct vops ffs_fifovops; /* ffs_alloc.c */ -int ffs_alloc(struct inode *, daddr64_t, daddr64_t , int, struct ucred *, - daddr64_t *); -int ffs_realloccg(struct inode *, daddr64_t, daddr64_t, int, int , - struct ucred *, struct buf **, daddr64_t *); +int ffs_alloc(struct inode *, daddr_t, daddr_t , int, struct ucred *, + daddr_t *); +int ffs_realloccg(struct inode *, daddr_t, daddr_t, int, int , + struct ucred *, struct buf **, daddr_t *); int ffs_reallocblks(void *); int ffs_inode_alloc(struct inode *, mode_t, struct ucred *, struct vnode **); int ffs_inode_free(struct inode *, ufsino_t, mode_t); int ffs_freefile(struct inode *, ufsino_t, mode_t); -int32_t ffs1_blkpref(struct inode *, daddr64_t, int, int32_t *); +int32_t ffs1_blkpref(struct inode *, daddr_t, int, int32_t *); #ifdef FFS2 -int64_t ffs2_blkpref(struct inode *, daddr64_t, int, int64_t *); +int64_t ffs2_blkpref(struct inode *, daddr_t, int, int64_t *); #endif -void ffs_blkfree(struct inode *, daddr64_t, long); -void ffs_clusteracct(struct fs *, struct cg *, daddr64_t, int); +void ffs_blkfree(struct inode *, daddr_t, long); +void ffs_clusteracct(struct fs *, struct cg *, daddr_t, int); /* ffs_balloc.c */ int ffs_balloc(struct inode *, off_t, int, struct ucred *, int, struct buf **); @@ -129,10 +129,10 @@ void ffs_fragacct(struct fs *, int, int32_t[], int); #ifdef DIAGNOSTIC void ffs_checkoverlap(struct buf *, struct inode *); #endif -int ffs_isfreeblock(struct fs *, u_char *, daddr64_t); -int ffs_isblock(struct fs *, u_char *, daddr64_t); -void ffs_clrblock(struct fs *, u_char *, daddr64_t); -void ffs_setblock(struct fs *, u_char *, daddr64_t); +int ffs_isfreeblock(struct fs *, u_char *, daddr_t); +int ffs_isblock(struct fs *, u_char *, daddr_t); +void ffs_clrblock(struct fs *, u_char *, daddr_t); +void ffs_setblock(struct fs *, u_char *, daddr_t); /* ffs_vfsops.c */ int ffs_mountroot(void); @@ -178,13 +178,13 @@ void softdep_load_inodeblock(struct inode *); void softdep_freefile(struct vnode *, ufsino_t, mode_t); void softdep_setup_freeblocks(struct inode *, off_t); void softdep_setup_inomapdep(struct buf *, struct inode *, ufsino_t); -void softdep_setup_blkmapdep(struct buf *, struct fs *, daddr64_t); -void softdep_setup_allocdirect(struct inode *, daddr64_t, daddr64_t, - daddr64_t, long, long, struct buf *); +void softdep_setup_blkmapdep(struct buf *, struct fs *, daddr_t); +void softdep_setup_allocdirect(struct inode *, daddr_t, daddr_t, + daddr_t, long, long, struct buf *); void softdep_setup_allocindir_meta(struct buf *, struct inode *, - struct buf *, int, daddr64_t); -void softdep_setup_allocindir_page(struct inode *, daddr64_t, - struct buf *, int, daddr64_t, daddr64_t, struct buf *); + struct buf *, int, daddr_t); +void softdep_setup_allocindir_page(struct inode *, daddr_t, + struct buf *, int, daddr_t, daddr_t, struct buf *); void softdep_fsync_mountdev(struct vnode *, int); int softdep_sync_metadata(struct vop_fsync_args *); int softdep_fsync(struct vnode *); diff --git a/sys/ufs/ffs/ffs_inode.c b/sys/ufs/ffs/ffs_inode.c index 76abe5dbcd0..b32906f680e 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.63 2013/04/22 02:07:46 tedu Exp $ */ +/* $OpenBSD: ffs_inode.c,v 1.64 2013/06/11 16:42:18 deraadt Exp $ */ /* $NetBSD: ffs_inode.c,v 1.10 1996/05/11 18:27:19 mycroft Exp $ */ /* @@ -53,7 +53,7 @@ #include <ufs/ffs/fs.h> #include <ufs/ffs/ffs_extern.h> -int ffs_indirtrunc(struct inode *, daddr64_t, daddr64_t, daddr64_t, int, long *); +int ffs_indirtrunc(struct inode *, daddr_t, daddr_t, daddr_t, int, long *); /* * Update the access, modified, and inode change times as specified by the @@ -157,9 +157,9 @@ int ffs_truncate(struct inode *oip, off_t length, int flags, struct ucred *cred) { struct vnode *ovp; - daddr64_t lastblock; - daddr64_t bn, lbn, lastiblock[NIADDR], indir_lbn[NIADDR]; - daddr64_t oldblks[NDADDR + NIADDR], newblks[NDADDR + NIADDR]; + daddr_t lastblock; + daddr_t bn, lbn, lastiblock[NIADDR], indir_lbn[NIADDR]; + daddr_t oldblks[NDADDR + NIADDR], newblks[NDADDR + NIADDR]; struct fs *fs; struct buf *bp; int offset, size, level; @@ -469,15 +469,15 @@ done: * NB: triple indirect blocks are untested. */ int -ffs_indirtrunc(struct inode *ip, daddr64_t lbn, daddr64_t dbn, - daddr64_t lastbn, int level, long *countp) +ffs_indirtrunc(struct inode *ip, daddr_t lbn, daddr_t dbn, + daddr_t lastbn, int level, long *countp) { int i; struct buf *bp; struct fs *fs = ip->i_fs; struct vnode *vp; void *copy = NULL; - daddr64_t nb, nlbn, last; + daddr_t nb, nlbn, last; long blkcount, factor; int nblocks, blocksreleased = 0; int error = 0, allerror = 0; @@ -565,7 +565,7 @@ ffs_indirtrunc(struct inode *ip, daddr64_t lbn, daddr64_t dbn, continue; if (level > SINGLE) { error = ffs_indirtrunc(ip, nlbn, fsbtodb(fs, nb), - (daddr64_t)-1, level - 1, + (daddr_t)-1, level - 1, &blkcount); if (error) allerror = error; diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index 56b7f9b0fcf..feb6c00d017 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.118 2013/05/30 19:19:09 guenther Exp $ */ +/* $OpenBSD: ffs_softdep.c,v 1.119 2013/06/11 16:42:18 deraadt Exp $ */ /* * Copyright 1998, 2000 Marshall Kirk McKusick. All Rights Reserved. @@ -139,7 +139,7 @@ STATIC struct dirrem *newdirrem(struct buf *, struct inode *, STATIC void free_diradd(struct diradd *); STATIC void free_allocindir(struct allocindir *, struct inodedep *); STATIC void free_newdirblk(struct newdirblk *); -STATIC int indir_trunc(struct inode *, daddr64_t, int, daddr64_t, long *); +STATIC int indir_trunc(struct inode *, daddr_t, int, daddr_t, long *); STATIC void deallocate_dependencies(struct buf *, struct inodedep *); STATIC void free_allocdirect(struct allocdirectlst *, struct allocdirect *, int); @@ -149,17 +149,17 @@ STATIC void handle_workitem_freeblocks(struct freeblks *); STATIC void merge_inode_lists(struct inodedep *); STATIC void setup_allocindir_phase2(struct buf *, struct inode *, struct allocindir *); -STATIC struct allocindir *newallocindir(struct inode *, int, daddr64_t, - daddr64_t); +STATIC struct allocindir *newallocindir(struct inode *, int, daddr_t, + daddr_t); STATIC void handle_workitem_freefrag(struct freefrag *); -STATIC struct freefrag *newfreefrag(struct inode *, daddr64_t, long); +STATIC struct freefrag *newfreefrag(struct inode *, daddr_t, long); STATIC void allocdirect_merge(struct allocdirectlst *, struct allocdirect *, struct allocdirect *); STATIC struct bmsafemap *bmsafemap_lookup(struct buf *); -STATIC int newblk_lookup(struct fs *, daddr64_t, int, +STATIC int newblk_lookup(struct fs *, daddr_t, int, struct newblk **); STATIC int inodedep_lookup(struct fs *, ufsino_t, int, struct inodedep **); -STATIC int pagedep_lookup(struct inode *, daddr64_t, int, struct pagedep **); +STATIC int pagedep_lookup(struct inode *, daddr_t, int, struct pagedep **); STATIC void pause_timer(void *); STATIC int request_cleanup(int, int); STATIC int process_worklist_item(struct mount *, int); @@ -956,7 +956,7 @@ STATIC struct sema pagedep_in_progress; * This routine must be called with splbio interrupts blocked. */ STATIC int -pagedep_lookup(struct inode *ip, daddr64_t lbn, int flags, +pagedep_lookup(struct inode *ip, daddr_t lbn, int flags, struct pagedep **pagedeppp) { struct pagedep *pagedep; @@ -1102,7 +1102,7 @@ STATIC struct sema newblk_in_progress; * Found or allocated entry is returned in newblkpp. */ STATIC int -newblk_lookup(struct fs *fs, daddr64_t newblkno, int flags, +newblk_lookup(struct fs *fs, daddr_t newblkno, int flags, struct newblk **newblkpp) { struct newblk *newblk; @@ -1308,7 +1308,7 @@ softdep_setup_inomapdep(struct buf *bp, struct inode *ip, ufsino_t newinum) /* filesystem doing allocation */ /* number of newly allocated block */ void -softdep_setup_blkmapdep(struct buf *bp, struct fs *fs, daddr64_t newblkno) +softdep_setup_blkmapdep(struct buf *bp, struct fs *fs, daddr_t newblkno) { struct newblk *newblk; struct bmsafemap *bmsafemap; @@ -1398,8 +1398,8 @@ bmsafemap_lookup(struct buf *bp) /* size of new block */ /* bp for allocated block */ void -softdep_setup_allocdirect(struct inode *ip, daddr64_t lbn, daddr64_t newblkno, - daddr64_t oldblkno, long newsize, long oldsize, struct buf *bp) +softdep_setup_allocdirect(struct inode *ip, daddr_t lbn, daddr_t newblkno, + daddr_t oldblkno, long newsize, long oldsize, struct buf *bp) { struct allocdirect *adp, *oldadp; struct allocdirectlst *adphead; @@ -1573,7 +1573,7 @@ allocdirect_merge(struct allocdirectlst *adphead, struct allocdirect *newadp, * Allocate a new freefrag structure if needed. */ STATIC struct freefrag * -newfreefrag(struct inode *ip, daddr64_t blkno, long size) +newfreefrag(struct inode *ip, daddr_t blkno, long size) { struct freefrag *freefrag; struct fs *fs; @@ -1648,8 +1648,8 @@ handle_workitem_freefrag(struct freefrag *freefrag) /* disk block number being added */ /* previous block number, 0 if none */ STATIC struct allocindir * -newallocindir(struct inode *ip, int ptrno, daddr64_t newblkno, - daddr64_t oldblkno) +newallocindir(struct inode *ip, int ptrno, daddr_t newblkno, + daddr_t oldblkno) { struct allocindir *aip; @@ -1675,8 +1675,8 @@ newallocindir(struct inode *ip, int ptrno, daddr64_t newblkno, /* previous block number, 0 if none */ /* buffer holding allocated page */ void -softdep_setup_allocindir_page(struct inode *ip, daddr64_t lbn, struct buf *bp, - int ptrno, daddr64_t newblkno, daddr64_t oldblkno, struct buf *nbp) +softdep_setup_allocindir_page(struct inode *ip, daddr_t lbn, struct buf *bp, + int ptrno, daddr_t newblkno, daddr_t oldblkno, struct buf *nbp) { struct allocindir *aip; struct pagedep *pagedep; @@ -1713,7 +1713,7 @@ softdep_setup_allocindir_page(struct inode *ip, daddr64_t lbn, struct buf *bp, /* disk block number being added */ void softdep_setup_allocindir_meta(struct buf *nbp, struct inode *ip, - struct buf *bp, int ptrno, daddr64_t newblkno) + struct buf *bp, int ptrno, daddr_t newblkno) { struct allocindir *aip; @@ -2331,7 +2331,7 @@ STATIC void handle_workitem_freeblocks(struct freeblks *freeblks) { struct inode tip; - daddr64_t bn; + daddr_t bn; union { struct ufs1_dinode di1; struct ufs2_dinode di2; @@ -2340,7 +2340,7 @@ handle_workitem_freeblocks(struct freeblks *freeblks) int i, level, bsize; long nblocks, blocksreleased = 0; int error, allerror = 0; - daddr64_t baselbns[NIADDR], tmpval; + daddr_t baselbns[NIADDR], tmpval; if (VFSTOUFS(freeblks->fb_mnt)->um_fstype == UM_UFS1) tip.i_din1 = &di.di1; @@ -2401,7 +2401,7 @@ handle_workitem_freeblocks(struct freeblks *freeblks) * blocks. */ STATIC int -indir_trunc(struct inode *ip, daddr64_t dbn, int level, daddr64_t lbn, +indir_trunc(struct inode *ip, daddr_t dbn, int level, daddr_t lbn, long *countp) { struct buf *bp; @@ -2546,7 +2546,7 @@ softdep_setup_directory_add(struct buf *bp, struct inode *dp, off_t diroffset, long newinum, struct buf *newdirbp, int isnewblk) { int offset; /* offset of new entry within directory block */ - daddr64_t lbn; /* block in directory containing new entry */ + daddr_t lbn; /* block in directory containing new entry */ struct fs *fs; struct diradd *dap; struct allocdirect *adp; @@ -2694,7 +2694,7 @@ softdep_change_directoryentry_offset(struct inode *dp, caddr_t base, int offset, oldoffset, newoffset; struct pagedep *pagedep; struct diradd *dap; - daddr64_t lbn; + daddr_t lbn; ACQUIRE_LOCK(&lk); lbn = lblkno(dp->i_fs, dp->i_offset); @@ -2850,7 +2850,7 @@ newdirrem(struct buf *bp, struct inode *dp, struct inode *ip, int isrmdir, struct dirrem **prevdirremp) { int offset; - daddr64_t lbn; + daddr_t lbn; struct diradd *dap; struct dirrem *dirrem; struct pagedep *pagedep; @@ -3374,7 +3374,7 @@ initiate_write_inodeblock_ufs1(struct inodedep *inodedep, struct buf *bp) struct ufs1_dinode *dp; struct fs *fs; #ifdef DIAGNOSTIC - daddr64_t prevlbn = 0; + daddr_t prevlbn = 0; int32_t d1, d2; #endif int i, deplist; @@ -3521,7 +3521,7 @@ initiate_write_inodeblock_ufs2(struct inodedep *inodedep, struct buf *bp) struct ufs2_dinode *dp; struct fs *fs = inodedep->id_fs; #ifdef DIAGNOSTIC - daddr64_t prevlbn = -1, d1, d2; + daddr_t prevlbn = -1, d1, d2; #endif int deplist, i; @@ -4487,7 +4487,7 @@ softdep_fsync(struct vnode *vp) struct proc *p = CURPROC; /* XXX */ int error, flushparent; ufsino_t parentino; - daddr64_t lbn; + daddr_t lbn; ip = VTOI(vp); fs = ip->i_fs; diff --git a/sys/ufs/ffs/ffs_softdep_stub.c b/sys/ufs/ffs/ffs_softdep_stub.c index ac39eeb2d1a..26ec89c73bb 100644 --- a/sys/ufs/ffs/ffs_softdep_stub.c +++ b/sys/ufs/ffs/ffs_softdep_stub.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_softdep_stub.c,v 1.17 2013/05/30 19:19:09 guenther Exp $ */ +/* $OpenBSD: ffs_softdep_stub.c,v 1.18 2013/06/11 16:42:18 deraadt Exp $ */ /* * Copyright 1998 Marshall Kirk McKusick. All Rights Reserved. @@ -74,28 +74,28 @@ softdep_setup_inomapdep(struct buf *bp, struct inode *ip, ufsino_t newinum) } void -softdep_setup_blkmapdep(struct buf *bp, struct fs *fs, daddr64_t newblkno) +softdep_setup_blkmapdep(struct buf *bp, struct fs *fs, daddr_t newblkno) { panic("softdep_setup_blkmapdep called"); } void -softdep_setup_allocdirect(struct inode *ip, daddr64_t lbn, daddr64_t newblkno, - daddr64_t oldblkno, long newsize, long oldsize, struct buf *bp) +softdep_setup_allocdirect(struct inode *ip, daddr_t lbn, daddr_t newblkno, + daddr_t oldblkno, long newsize, long oldsize, struct buf *bp) { panic("softdep_setup_allocdirect called"); } void -softdep_setup_allocindir_page(struct inode *ip, daddr64_t lbn, struct buf *bp, - int ptrno, daddr64_t newblkno, daddr64_t oldblkno, struct buf *nbp) +softdep_setup_allocindir_page(struct inode *ip, daddr_t lbn, struct buf *bp, + int ptrno, daddr_t newblkno, daddr_t oldblkno, struct buf *nbp) { panic("softdep_setup_allocindir_page called"); } void softdep_setup_allocindir_meta(struct buf *nbp, struct inode *ip, - struct buf *bp, int ptrno, daddr64_t newblkno) + struct buf *bp, int ptrno, daddr_t newblkno) { panic("softdep_setup_allocindir_meta called"); } diff --git a/sys/ufs/ffs/ffs_subr.c b/sys/ufs/ffs/ffs_subr.c index 02a69e1f987..30cab351fd4 100644 --- a/sys/ufs/ffs/ffs_subr.c +++ b/sys/ufs/ffs/ffs_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_subr.c,v 1.26 2011/07/04 04:30:41 tedu Exp $ */ +/* $OpenBSD: ffs_subr.c,v 1.27 2013/06/11 16:42:18 deraadt Exp $ */ /* $NetBSD: ffs_subr.c,v 1.6 1996/03/17 02:16:23 christos Exp $ */ /* @@ -59,7 +59,7 @@ ffs_bufatoff(struct inode *ip, off_t offset, char **res, struct buf **bpp) struct fs *fs; struct vnode *vp; struct buf *bp; - daddr64_t lbn; + daddr_t lbn; int bsize, error; vp = ITOV(ip); @@ -81,10 +81,10 @@ ffs_bufatoff(struct inode *ip, off_t offset, char **res, struct buf **bpp) #else /* Prototypes for userland */ void ffs_fragacct(struct fs *, int, int32_t[], int); -int ffs_isfreeblock(struct fs *, u_char *, daddr64_t); -int ffs_isblock(struct fs *, u_char *, daddr64_t); -void ffs_clrblock(struct fs *, u_char *, daddr64_t); -void ffs_setblock(struct fs *, u_char *, daddr64_t); +int ffs_isfreeblock(struct fs *, u_char *, daddr_t); +int ffs_isblock(struct fs *, u_char *, daddr_t); +void ffs_clrblock(struct fs *, u_char *, daddr_t); +void ffs_setblock(struct fs *, u_char *, daddr_t); __dead void panic(const char *, ...); #endif @@ -123,7 +123,7 @@ ffs_fragacct(struct fs *fs, int fragmap, int32_t fraglist[], int cnt) void ffs_checkoverlap(struct buf *bp, struct inode *ip) { - daddr64_t start, last; + daddr_t start, last; struct vnode *vp; struct buf *ep; @@ -133,7 +133,7 @@ ffs_checkoverlap(struct buf *bp, struct inode *ip) if (ep == bp || (ep->b_flags & B_INVAL) || ep->b_vp == NULLVP) continue; - if (VOP_BMAP(ep->b_vp, (daddr64_t)0, &vp, NULL, NULL)) + if (VOP_BMAP(ep->b_vp, (daddr_t)0, &vp, NULL, NULL)) continue; if (vp != ip->i_devvp) continue; @@ -156,7 +156,7 @@ ffs_checkoverlap(struct buf *bp, struct inode *ip) * check if a block is available */ int -ffs_isblock(struct fs *fs, u_char *cp, daddr64_t h) +ffs_isblock(struct fs *fs, u_char *cp, daddr_t h) { u_char mask; @@ -180,7 +180,7 @@ ffs_isblock(struct fs *fs, u_char *cp, daddr64_t h) * take a block out of the map */ void -ffs_clrblock(struct fs *fs, u_char *cp, daddr64_t h) +ffs_clrblock(struct fs *fs, u_char *cp, daddr_t h) { switch (fs->fs_frag) { @@ -204,7 +204,7 @@ ffs_clrblock(struct fs *fs, u_char *cp, daddr64_t h) * put a block into the map */ void -ffs_setblock(struct fs *fs, u_char *cp, daddr64_t h) +ffs_setblock(struct fs *fs, u_char *cp, daddr_t h) { switch (fs->fs_frag) { @@ -228,7 +228,7 @@ ffs_setblock(struct fs *fs, u_char *cp, daddr64_t h) * check if a block is free */ int -ffs_isfreeblock(struct fs *fs, u_char *cp, daddr64_t h) +ffs_isfreeblock(struct fs *fs, u_char *cp, daddr_t h) { switch (fs->fs_frag) { diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index d7dfe29ea7b..f5b85dfce2c 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.137 2013/05/30 19:19:09 guenther Exp $ */ +/* $OpenBSD: ffs_vfsops.c,v 1.138 2013/06/11 16:42:18 deraadt Exp $ */ /* $NetBSD: ffs_vfsops.c,v 1.19 1996/02/09 22:22:26 christos Exp $ */ /* @@ -70,7 +70,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 *, daddr64_t); +void ffs1_compat_read(struct fs *, struct ufsmount *, daddr_t); void ffs1_compat_write(struct fs *, struct ufsmount *); const struct vfsops ffs_vfsops = { @@ -663,7 +663,7 @@ ffs_mountfs(struct vnode *devvp, struct mount *mp, struct proc *p) struct fs *fs; dev_t dev; caddr_t space; - daddr64_t sbloc; + daddr_t sbloc; int error, i, blks, size, ronly; int32_t *lp; size_t strsize; @@ -953,7 +953,7 @@ ffs_oldfscompat(struct fs *fs) * Auxiliary function for reading FFS1 super blocks. */ void -ffs1_compat_read(struct fs *fs, struct ufsmount *ump, daddr64_t sbloc) +ffs1_compat_read(struct fs *fs, struct ufsmount *ump, daddr_t sbloc) { if (fs->fs_magic == FS_UFS2_MAGIC) return; /* UFS2 */ diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index cf4ac62c3d6..6cbdf6f0b5d 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_vnops.c,v 1.70 2013/01/16 22:41:47 beck Exp $ */ +/* $OpenBSD: ffs_vnops.c,v 1.71 2013/06/11 16:42:18 deraadt Exp $ */ /* $NetBSD: ffs_vnops.c,v 1.7 1996/05/11 18:27:24 mycroft Exp $ */ /* @@ -201,7 +201,7 @@ ffs_read(void *v) struct uio *uio; struct fs *fs; struct buf *bp; - daddr64_t lbn, nextlbn; + daddr_t lbn, nextlbn; off_t bytesinfile; long size, xfersize, blkoffset; mode_t mode; @@ -295,7 +295,7 @@ ffs_write(void *v) struct inode *ip; struct fs *fs; struct buf *bp; - daddr64_t lbn; + daddr_t lbn; off_t osize; int blkoffset, error, extended, flags, ioflag, resid, size, xfersize; int overrun; diff --git a/sys/ufs/ffs/fs.h b/sys/ufs/ffs/fs.h index 3698a53b5b3..5bce97e793c 100644 --- a/sys/ufs/ffs/fs.h +++ b/sys/ufs/ffs/fs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: fs.h,v 1.36 2013/04/23 20:42:38 tedu Exp $ */ +/* $OpenBSD: fs.h,v 1.37 2013/06/11 16:42:18 deraadt Exp $ */ /* $NetBSD: fs.h,v 1.6 1995/04/12 21:21:02 mycroft Exp $ */ /* @@ -60,8 +60,8 @@ #define SBSIZE 8192 #define BBOFF ((off_t)(0)) #define SBOFF ((off_t)(BBOFF + BBSIZE)) -#define BBLOCK ((daddr64_t)(0)) -#define SBLOCK ((daddr64_t)(BBLOCK + BBSIZE / DEV_BSIZE)) +#define BBLOCK ((daddr_t)(0)) +#define SBLOCK ((daddr_t)(BBLOCK + BBSIZE / DEV_BSIZE)) #define SBLOCK_UFS1 8192 #define SBLOCK_UFS2 65536 #define SBLOCK_PIGGY 262144 @@ -463,7 +463,7 @@ struct ocg { * Cylinder group macros to locate things in cylinder groups. * They calc file system addresses of cylinder group data structures. */ -#define cgbase(fs, c) ((daddr64_t)(fs)->fs_fpg * (c)) +#define cgbase(fs, c) ((daddr_t)(fs)->fs_fpg * (c)) #define cgdata(fs, c) (cgdmin(fs, c) + (fs)->fs_minfree) /* data zone */ #define cgmeta(fs, c) (cgdmin(fs, c)) /* meta data */ #define cgdmin(fs, c) (cgstart(fs, c) + (fs)->fs_dblkno) /* 1st data */ @@ -481,7 +481,7 @@ struct ocg { */ #define ino_to_cg(fs, x) ((x) / (fs)->fs_ipg) #define ino_to_fsba(fs, x) \ - ((daddr64_t)(cgimin(fs, ino_to_cg(fs, x)) + \ + ((daddr_t)(cgimin(fs, ino_to_cg(fs, x)) + \ (blkstofrags((fs), (((x) % (fs)->fs_ipg) / INOPB(fs)))))) #define ino_to_fsbo(fs, x) ((x) % INOPB(fs)) diff --git a/sys/ufs/ffs/softdep.h b/sys/ufs/ffs/softdep.h index 01f2417fc63..e9350d8aef7 100644 --- a/sys/ufs/ffs/softdep.h +++ b/sys/ufs/ffs/softdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: softdep.h,v 1.16 2013/05/30 19:19:09 guenther Exp $ */ +/* $OpenBSD: softdep.h,v 1.17 2013/06/11 16:42:18 deraadt Exp $ */ /* * Copyright 1998, 2000 Marshall Kirk McKusick. All Rights Reserved. @@ -192,7 +192,7 @@ struct pagedep { LIST_ENTRY(pagedep) pd_hash; /* hashed lookup */ struct mount *pd_mnt; /* associated mount point */ ufsino_t pd_ino; /* associated file */ - daddr64_t pd_lbn; /* block within file */ + daddr_t pd_lbn; /* block within file */ struct dirremhd pd_dirremhd; /* dirrem's waiting for page */ struct diraddhd pd_diraddhd[DAHASHSZ]; /* diradd dir entry updates */ struct diraddhd pd_pendinghd; /* directory entries awaiting write */ @@ -280,7 +280,7 @@ struct inodedep { struct newblk { LIST_ENTRY(newblk) nb_hash; /* hashed lookup */ struct fs *nb_fs; /* associated filesystem */ - daddr64_t nb_newblkno; /* allocated block number */ + daddr_t nb_newblkno; /* allocated block number */ int nb_state; /* state of bitmap dependency */ LIST_ENTRY(newblk) nb_deps; /* bmsafemap's list of newblk's */ struct bmsafemap *nb_bmsafemap; /* associated bmsafemap */ @@ -336,9 +336,9 @@ struct allocdirect { struct worklist ad_list; /* buffer holding block */ # define ad_state ad_list.wk_state /* block pointer state */ TAILQ_ENTRY(allocdirect) ad_next; /* inodedep's list of allocdirect's */ - daddr64_t ad_lbn; /* block within file */ - daddr64_t ad_newblkno; /* new value of block pointer */ - daddr64_t ad_oldblkno; /* old value of block pointer */ + daddr_t ad_lbn; /* block within file */ + daddr_t ad_newblkno; /* new value of block pointer */ + daddr_t ad_oldblkno; /* old value of block pointer */ long ad_newsize; /* size of new block */ long ad_oldsize; /* size of old block */ LIST_ENTRY(allocdirect) ad_deps; /* bmsafemap's list of allocdirect's */ @@ -392,8 +392,8 @@ struct allocindir { # define ai_state ai_list.wk_state /* indirect block pointer state */ LIST_ENTRY(allocindir) ai_next; /* indirdep's list of allocindir's */ int ai_offset; /* pointer offset in indirect block */ - daddr64_t ai_newblkno; /* new block pointer value */ - daddr64_t ai_oldblkno; /* old block pointer value */ + daddr_t ai_newblkno; /* new block pointer value */ + daddr_t ai_oldblkno; /* old block pointer value */ struct freefrag *ai_freefrag; /* block to be freed when complete */ struct indirdep *ai_indirdep; /* address of associated indirdep */ LIST_ENTRY(allocindir) ai_deps; /* bmsafemap's list of allocindir's */ @@ -415,7 +415,7 @@ struct freefrag { # define ff_state ff_list.wk_state /* owning user; should be uid_t */ struct vnode *ff_devvp; /* filesystem device vnode */ struct mount *ff_mnt; /* associated mount point */ - daddr64_t ff_blkno; /* fragment physical block number */ + daddr_t ff_blkno; /* fragment physical block number */ long ff_fragsize; /* size of fragment being deleted */ ufsino_t ff_inum; /* owning inode number */ }; @@ -436,8 +436,8 @@ struct freeblks { off_t fb_newsize; /* new file size */ int fb_chkcnt; /* used to check cnt of blks released */ uid_t fb_uid; /* uid of previous owner of blocks */ - daddr64_t fb_dblks[NDADDR]; /* direct blk ptrs to deallocate */ - daddr64_t fb_iblks[NIADDR]; /* indirect blk ptrs to deallocate */ + daddr_t fb_dblks[NDADDR]; /* direct blk ptrs to deallocate */ + daddr_t fb_iblks[NIADDR]; /* indirect blk ptrs to deallocate */ }; /* diff --git a/sys/ufs/ufs/inode.h b/sys/ufs/ufs/inode.h index b44c15ca2cb..133fdc8068d 100644 --- a/sys/ufs/ufs/inode.h +++ b/sys/ufs/ufs/inode.h @@ -1,4 +1,4 @@ -/* $OpenBSD: inode.h,v 1.39 2013/05/30 19:19:09 guenther Exp $ */ +/* $OpenBSD: inode.h,v 1.40 2013/06/11 16:42:19 deraadt Exp $ */ /* $NetBSD: inode.h,v 1.8 1995/06/15 23:22:50 cgd Exp $ */ /* @@ -306,7 +306,7 @@ struct inode_vtbl { * ufs_getlbns and used by truncate and bmap code. */ struct indir { - daddr64_t in_lbn; /* Logical block number. */ + daddr_t in_lbn; /* Logical block number. */ int in_off; /* Offset in buffer. */ int in_exists; /* Flag if the block exists. */ }; diff --git a/sys/ufs/ufs/quota.h b/sys/ufs/ufs/quota.h index 1dfb1daa9bf..c82e1cd75a7 100644 --- a/sys/ufs/ufs/quota.h +++ b/sys/ufs/ufs/quota.h @@ -1,4 +1,4 @@ -/* $OpenBSD: quota.h,v 1.10 2012/12/05 23:20:24 deraadt Exp $ */ +/* $OpenBSD: quota.h,v 1.11 2013/06/11 16:42:19 deraadt Exp $ */ /* $NetBSD: quota.h,v 1.6 1995/03/26 20:38:17 jtc Exp $ */ /* @@ -128,8 +128,8 @@ __BEGIN_DECLS #define ufs_quota_free_blocks(i, c, cr) ufs_quota_free_blocks2(i, c, cr, 0) #define ufs_quota_alloc_inode(i, cr) ufs_quota_alloc_inode2(i, cr, 0) #define ufs_quota_free_inode(i, cr) ufs_quota_free_inode2(i, cr, 0) -int ufs_quota_alloc_blocks2(struct inode *, daddr64_t, struct ucred *, enum ufs_quota_flags); -int ufs_quota_free_blocks2(struct inode *, daddr64_t, struct ucred *, enum ufs_quota_flags); +int ufs_quota_alloc_blocks2(struct inode *, daddr_t, struct ucred *, enum ufs_quota_flags); +int ufs_quota_free_blocks2(struct inode *, daddr_t, struct ucred *, enum ufs_quota_flags); int ufs_quota_alloc_inode2(struct inode *, struct ucred *, enum ufs_quota_flags); int ufs_quota_free_inode2(struct inode *, struct ucred *, enum ufs_quota_flags); diff --git a/sys/ufs/ufs/ufs_bmap.c b/sys/ufs/ufs/ufs_bmap.c index 86a49ff93c5..a584164e740 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.32 2012/03/23 15:51:26 guenther Exp $ */ +/* $OpenBSD: ufs_bmap.c,v 1.33 2013/06/11 16:42:19 deraadt Exp $ */ /* $NetBSD: ufs_bmap.c,v 1.3 1996/02/09 22:36:00 christos Exp $ */ /* @@ -88,7 +88,7 @@ ufs_bmap(void *v) * next block and the disk address of the block (if it is assigned). */ int -ufs_bmaparray(struct vnode *vp, daddr64_t bn, daddr64_t *bnp, struct indir *ap, +ufs_bmaparray(struct vnode *vp, daddr_t bn, daddr_t *bnp, struct indir *ap, int *nump, int *runp) { struct inode *ip; @@ -97,7 +97,7 @@ ufs_bmaparray(struct vnode *vp, daddr64_t bn, daddr64_t *bnp, struct indir *ap, struct mount *mp; struct vnode *devvp; struct indir a[NIADDR+1], *xap; - daddr64_t daddr, metalbn; + daddr_t daddr, metalbn; int error, maxrun = 0, num; ip = VTOI(vp); @@ -225,9 +225,9 @@ ufs_bmaparray(struct vnode *vp, daddr64_t bn, daddr64_t *bnp, struct indir *ap, * once with the offset into the page itself. */ int -ufs_getlbns(struct vnode *vp, daddr64_t bn, struct indir *ap, int *nump) +ufs_getlbns(struct vnode *vp, daddr_t bn, struct indir *ap, int *nump) { - daddr64_t metalbn, realbn; + daddr_t metalbn, realbn; struct ufsmount *ump; int64_t blockcnt; int i, numlevels, off; diff --git a/sys/ufs/ufs/ufs_extern.h b/sys/ufs/ufs/ufs_extern.h index 437883ccab4..ecd41a55f80 100644 --- a/sys/ufs/ufs/ufs_extern.h +++ b/sys/ufs/ufs/ufs_extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ufs_extern.h,v 1.33 2013/05/30 19:19:09 guenther Exp $ */ +/* $OpenBSD: ufs_extern.h,v 1.34 2013/06/11 16:42:19 deraadt Exp $ */ /* $NetBSD: ufs_extern.h,v 1.5 1996/02/09 22:36:03 christos Exp $ */ /*- @@ -93,9 +93,9 @@ int ufsfifo_close(void *); #endif /* ufs_bmap.c */ -int ufs_bmaparray(struct vnode *, daddr64_t, daddr64_t *, struct indir *, +int ufs_bmaparray(struct vnode *, daddr_t, daddr_t *, struct indir *, int *, int *); -int ufs_getlbns(struct vnode *, daddr64_t, struct indir *, int *); +int ufs_getlbns(struct vnode *, daddr_t, struct indir *, int *); /* ufs_ihash.c */ void ufs_ihashinit(void); diff --git a/sys/ufs/ufs/ufs_quota.c b/sys/ufs/ufs/ufs_quota.c index 287e5531e8d..cc01bfd33ef 100644 --- a/sys/ufs/ufs/ufs_quota.c +++ b/sys/ufs/ufs/ufs_quota.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ufs_quota.c,v 1.30 2008/01/05 19:49:26 otto Exp $ */ +/* $OpenBSD: ufs_quota.c,v 1.31 2013/06/11 16:42:19 deraadt Exp $ */ /* $NetBSD: ufs_quota.c,v 1.8 1996/02/09 22:36:09 christos Exp $ */ /* @@ -177,7 +177,7 @@ getinoquota(struct inode *ip) * Update disk usage, and take corrective action. */ int -ufs_quota_alloc_blocks2(struct inode *ip, daddr64_t change, +ufs_quota_alloc_blocks2(struct inode *ip, daddr_t change, struct ucred *cred, enum ufs_quota_flags flags) { struct dquot *dq; @@ -218,7 +218,7 @@ ufs_quota_alloc_blocks2(struct inode *ip, daddr64_t change, } int -ufs_quota_free_blocks2(struct inode *ip, daddr64_t change, +ufs_quota_free_blocks2(struct inode *ip, daddr_t change, struct ucred *cred, enum ufs_quota_flags flags) { struct dquot *dq; diff --git a/sys/ufs/ufs/ufs_quota_stub.c b/sys/ufs/ufs/ufs_quota_stub.c index 19f3fdba50d..14ace5fc135 100644 --- a/sys/ufs/ufs/ufs_quota_stub.c +++ b/sys/ufs/ufs/ufs_quota_stub.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ufs_quota_stub.c,v 1.5 2008/01/05 19:49:26 otto Exp $ */ +/* $OpenBSD: ufs_quota_stub.c,v 1.6 2013/06/11 16:42:19 deraadt Exp $ */ #include <sys/param.h> #include <sys/kernel.h> @@ -23,13 +23,13 @@ getinoquota(struct inode *ip) { } int -ufs_quota_alloc_blocks2(struct inode *ip, daddr64_t change, +ufs_quota_alloc_blocks2(struct inode *ip, daddr_t change, struct ucred *cred, enum ufs_quota_flags flags) { return (0); } int -ufs_quota_free_blocks2(struct inode *ip, daddr64_t change, +ufs_quota_free_blocks2(struct inode *ip, daddr_t change, struct ucred *cred, enum ufs_quota_flags flags) { return (0); } diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index e321b2e94f0..a007fec5c0e 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ufs_vnops.c,v 1.106 2013/03/28 03:29:44 guenther Exp $ */ +/* $OpenBSD: ufs_vnops.c,v 1.107 2013/06/11 16:42:19 deraadt Exp $ */ /* $NetBSD: ufs_vnops.c,v 1.18 1996/05/11 18:28:04 mycroft Exp $ */ /* @@ -446,7 +446,7 @@ ufs_chown(struct vnode *vp, uid_t uid, gid_t gid, struct ucred *cred, uid_t ouid; gid_t ogid; int error = 0; - daddr64_t change; + daddr_t change; enum ufs_quota_flags quota_flags = 0; if (uid == (uid_t)VNOVAL) |