summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/vnd.c4
-rw-r--r--sys/isofs/cd9660/cd9660_vnops.c13
-rw-r--r--sys/kern/vfs_cluster.c29
-rw-r--r--sys/kern/vnode_if.src4
-rw-r--r--sys/msdosfs/fat.h4
-rw-r--r--sys/msdosfs/msdosfs_fat.c4
-rw-r--r--sys/msdosfs/msdosfs_lookup.c14
-rw-r--r--sys/msdosfs/msdosfs_vnops.c7
-rw-r--r--sys/sys/buf.h18
-rw-r--r--sys/sys/types.h6
-rw-r--r--sys/ufs/ext2fs/ext2fs_bmap.c8
-rw-r--r--sys/ufs/ufs/ufs_bmap.c4
-rw-r--r--sys/ufs/ufs/ufs_extern.h4
-rw-r--r--sys/uvm/uvm_swap.c4
14 files changed, 63 insertions, 60 deletions
diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c
index a8d132a8641..ee199b83748 100644
--- a/sys/dev/vnd.c
+++ b/sys/dev/vnd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vnd.c,v 1.63 2006/09/20 13:51:19 pedro Exp $ */
+/* $OpenBSD: vnd.c,v 1.64 2006/10/03 19:49:06 pedro Exp $ */
/* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */
/*
@@ -549,7 +549,7 @@ vndstrategy(bp)
flags = bp->b_flags | B_CALL;
for (resid = bp->b_resid; resid; resid -= sz) {
struct vnode *vp;
- daddr_t nbn;
+ daddr64_t nbn;
int off, s, nra;
nra = 0;
diff --git a/sys/isofs/cd9660/cd9660_vnops.c b/sys/isofs/cd9660/cd9660_vnops.c
index 670f7b41b41..4f35cea258e 100644
--- a/sys/isofs/cd9660/cd9660_vnops.c
+++ b/sys/isofs/cd9660/cd9660_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cd9660_vnops.c,v 1.34 2006/01/25 21:15:55 mickey Exp $ */
+/* $OpenBSD: cd9660_vnops.c,v 1.35 2006/10/03 19:49:06 pedro Exp $ */
/* $NetBSD: cd9660_vnops.c,v 1.42 1997/10/16 23:56:57 christos Exp $ */
/*-
@@ -400,13 +400,16 @@ cd9660_ioctl(v)
struct ucred *a_cred;
struct proc *a_p;
} */ *ap = v;
- daddr_t *block;
+ daddr32_t *blkp;
+ daddr64_t blk;
+ int error;
switch (ap->a_command) {
case FIBMAP:
- block = (daddr_t *)ap->a_data;
-
- return (VOP_BMAP(ap->a_vp, *block, NULL, block, 0));
+ blkp = (daddr32_t *) ap->a_data;
+ error = VOP_BMAP(ap->a_vp, *blkp, NULL, &blk, 0);
+ *blkp = (daddr32_t) blk;
+ return (error);
default:
return (ENOTTY);
}
diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c
index 0d5e311f1d6..e00595107d9 100644
--- a/sys/kern/vfs_cluster.c
+++ b/sys/kern/vfs_cluster.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_cluster.c,v 1.34 2005/11/08 15:43:44 pedro Exp $ */
+/* $OpenBSD: vfs_cluster.c,v 1.35 2006/10/03 19:49:06 pedro Exp $ */
/* $NetBSD: vfs_cluster.c,v 1.12 1996/04/22 01:39:05 christos Exp $ */
/*
@@ -43,18 +43,14 @@
#include <uvm/uvm_extern.h>
-/*
- * Local declarations
- */
-void cluster_callback(struct buf *);
-struct buf *cluster_newbuf(struct vnode *, struct buf *, long, daddr_t,
- daddr_t, long, int);
-struct buf *cluster_rbuild(struct vnode *, u_quad_t, struct buf *,
- daddr_t, daddr_t, long, int, long);
-void cluster_wbuild(struct vnode *, struct buf *, long,
- daddr_t, int, daddr_t);
-struct cluster_save *cluster_collectbufs(struct vnode *,
- struct cluster_info *, struct buf *);
+void cluster_callback(struct buf *);
+struct buf *cluster_newbuf(struct vnode *, struct buf *, long, daddr64_t,
+ daddr_t, long, int);
+struct buf *cluster_rbuild(struct vnode *, u_quad_t, struct buf *, daddr_t,
+ daddr64_t, long, int, long);
+void cluster_wbuild(struct vnode *, struct buf *, long, daddr_t, int, daddr_t);
+struct cluster_save *cluster_collectbufs(struct vnode *, struct cluster_info *,
+ struct buf *);
#ifdef DIAGNOSTIC
/*
@@ -103,7 +99,8 @@ cluster_read(struct vnode *vp, struct cluster_info *ci, u_quad_t filesize,
daddr_t lblkno, long size, struct ucred *cred, struct buf **bpp)
{
struct buf *bp, *rbp;
- daddr_t blkno, ioblkno;
+ daddr64_t blkno;
+ daddr_t ioblkno;
long flags;
int error, num_ra, alreadyincore;
@@ -263,7 +260,7 @@ skip_readahead:
*/
struct buf *
cluster_rbuild(struct vnode *vp, u_quad_t filesize, struct buf *bp,
- daddr_t lbn, daddr_t blkno, long size, int run, long flags)
+ daddr_t lbn, daddr64_t blkno, long size, int run, long flags)
{
struct cluster_save *b_save;
struct buf *tbp;
@@ -361,7 +358,7 @@ cluster_rbuild(struct vnode *vp, u_quad_t filesize, struct buf *bp,
* Either get a new buffer or grow the existing one.
*/
struct buf *
-cluster_newbuf(struct vnode *vp, struct buf *bp, long flags, daddr_t blkno,
+cluster_newbuf(struct vnode *vp, struct buf *bp, long flags, daddr64_t blkno,
daddr_t lblkno, long size, int run)
{
if (!bp) {
diff --git a/sys/kern/vnode_if.src b/sys/kern/vnode_if.src
index 2fd111b4db8..f16274ee4fe 100644
--- a/sys/kern/vnode_if.src
+++ b/sys/kern/vnode_if.src
@@ -1,4 +1,4 @@
-# $OpenBSD: vnode_if.src,v 1.29 2005/07/14 09:04:59 pedro Exp $
+# $OpenBSD: vnode_if.src,v 1.30 2006/10/03 19:49:06 pedro Exp $
# $NetBSD: vnode_if.src,v 1.10 1996/05/11 18:26:27 mycroft Exp $
#
# Copyright (c) 1992, 1993
@@ -398,7 +398,7 @@ vop_bmap {
IN SHOULDBELOCKED struct vnode *vp;
IN daddr_t bn;
OUT struct vnode **vpp;
- IN daddr_t *bnp;
+ IN daddr64_t *bnp;
OUT int *runp;
};
diff --git a/sys/msdosfs/fat.h b/sys/msdosfs/fat.h
index 55a5b90a06c..48d45bf0184 100644
--- a/sys/msdosfs/fat.h
+++ b/sys/msdosfs/fat.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: fat.h,v 1.7 2004/05/14 04:05:05 tedu Exp $ */
+/* $OpenBSD: fat.h,v 1.8 2006/10/03 19:49:06 pedro Exp $ */
/* $NetBSD: fat.h,v 1.11 1997/10/17 11:23:49 ws Exp $ */
/*-
@@ -97,7 +97,7 @@
*/
#define DE_CLEAR 1 /* Zero out the blocks allocated */
-int pcbmap(struct denode *, uint32_t, daddr_t *, uint32_t *, int *);
+int pcbmap(struct denode *, uint32_t, daddr64_t *, uint32_t *, int *);
int clusterfree(struct msdosfsmount *, uint32_t, uint32_t *);
int clusteralloc(struct msdosfsmount *, uint32_t, uint32_t, uint32_t, uint32_t *, uint32_t *);
int extendfile(struct denode *, uint32_t, struct buf **, uint32_t *, int);
diff --git a/sys/msdosfs/msdosfs_fat.c b/sys/msdosfs/msdosfs_fat.c
index e273ca57111..c9127de9d85 100644
--- a/sys/msdosfs/msdosfs_fat.c
+++ b/sys/msdosfs/msdosfs_fat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msdosfs_fat.c,v 1.17 2004/05/16 19:00:51 tedu Exp $ */
+/* $OpenBSD: msdosfs_fat.c,v 1.18 2006/10/03 19:49:06 pedro Exp $ */
/* $NetBSD: msdosfs_fat.c,v 1.26 1997/10/17 11:24:02 ws Exp $ */
/*-
@@ -138,7 +138,7 @@ int
pcbmap(dep, findcn, bnp, cnp, sp)
struct denode *dep;
uint32_t findcn; /* file relative cluster to get */
- daddr_t *bnp; /* returned filesys relative blk number */
+ daddr64_t *bnp; /* returned filesys relative blk number */
uint32_t *cnp; /* returned cluster number */
int *sp; /* returned block size */
{
diff --git a/sys/msdosfs/msdosfs_lookup.c b/sys/msdosfs/msdosfs_lookup.c
index 226bccb896d..29a4c461abc 100644
--- a/sys/msdosfs/msdosfs_lookup.c
+++ b/sys/msdosfs/msdosfs_lookup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msdosfs_lookup.c,v 1.15 2005/03/02 00:35:04 tom Exp $ */
+/* $OpenBSD: msdosfs_lookup.c,v 1.16 2006/10/03 19:49:06 pedro Exp $ */
/* $NetBSD: msdosfs_lookup.c,v 1.34 1997/10/18 22:12:27 ws Exp $ */
/*-
@@ -90,7 +90,7 @@ msdosfs_lookup(v)
struct vnode **vpp = ap->a_vpp;
struct componentname *cnp = ap->a_cnp;
struct proc *p = cnp->cn_proc;
- daddr_t bn;
+ daddr64_t bn;
int error;
int lockparent;
int wantparent;
@@ -594,7 +594,7 @@ createde(dep, ddep, depp, cnp)
struct direntry *ndep;
struct msdosfsmount *pmp = ddep->de_pmp;
struct buf *bp;
- daddr_t bn;
+ daddr64_t bn;
int blsize;
#ifdef MSDOSFS_DEBUG
@@ -716,7 +716,7 @@ dosdirempty(dep)
int blsize;
int error;
uint32_t cn;
- daddr_t bn;
+ daddr64_t bn;
struct buf *bp;
struct msdosfsmount *pmp = dep->de_pmp;
struct direntry *dentp;
@@ -935,7 +935,7 @@ removede(pdep, dep)
int error;
struct direntry *ep;
struct buf *bp;
- daddr_t bn;
+ daddr64_t bn;
int blsize;
struct msdosfsmount *pmp = pdep->de_pmp;
uint32_t offset = pdep->de_fndoffset;
@@ -1005,7 +1005,7 @@ uniqdosname(dep, cnp, cp)
int gen;
int blsize;
uint32_t cn;
- daddr_t bn;
+ daddr64_t bn;
struct buf *bp;
int error;
@@ -1068,7 +1068,7 @@ findwin95(dep)
struct direntry *dentp;
int blsize;
uint32_t cn;
- daddr_t bn;
+ daddr64_t bn;
struct buf *bp;
/*
diff --git a/sys/msdosfs/msdosfs_vnops.c b/sys/msdosfs/msdosfs_vnops.c
index 8743f04f75e..c17b725e8c4 100644
--- a/sys/msdosfs/msdosfs_vnops.c
+++ b/sys/msdosfs/msdosfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msdosfs_vnops.c,v 1.56 2005/12/01 22:13:33 pedro Exp $ */
+/* $OpenBSD: msdosfs_vnops.c,v 1.57 2006/10/03 19:49:06 pedro Exp $ */
/* $NetBSD: msdosfs_vnops.c,v 1.63 1997/10/17 11:24:19 ws Exp $ */
/*-
@@ -469,7 +469,7 @@ msdosfs_read(v)
int isadir;
uint32_t n;
long on;
- daddr_t lbn;
+ daddr64_t lbn;
daddr_t rablock;
daddr_t rablkno;
struct buf *bp;
@@ -1472,7 +1472,8 @@ msdosfs_readdir(v)
uint32_t cn;
uint32_t fileno;
long bias = 0;
- daddr_t bn, lbn;
+ daddr_t lbn;
+ daddr64_t bn;
struct buf *bp;
struct denode *dep = VTODE(ap->a_vp);
struct msdosfsmount *pmp = dep->de_pmp;
diff --git a/sys/sys/buf.h b/sys/sys/buf.h
index d5a78d2c937..4abd1aaf12d 100644
--- a/sys/sys/buf.h
+++ b/sys/sys/buf.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: buf.h,v 1.49 2006/09/22 23:29:45 mickey Exp $ */
+/* $OpenBSD: buf.h,v 1.50 2006/10/03 19:49:06 pedro Exp $ */
/* $NetBSD: buf.h,v 1.25 1997/04/09 21:12:17 mycroft Exp $ */
/*
@@ -88,7 +88,7 @@ struct buf {
} b_un;
void *b_saveaddr; /* Original b_addr for physio. */
daddr_t b_lblkno; /* Logical block number. */
- daddr_t b_blkno; /* Underlying physical block number. */
+ daddr64_t b_blkno; /* Underlying physical block number. */
/* Function to call upon completion.
* Will be called at splbio(). */
void (*b_iodone)(struct buf *);
@@ -203,13 +203,13 @@ struct cluster_save {
#define B_SYNC 0x02 /* Do all allocations synchronously. */
struct cluster_info {
- daddr_t ci_lastr; /* last read (read-ahead) */
- daddr_t ci_lastw; /* last write (write cluster) */
- daddr_t ci_cstart; /* start block of cluster */
- daddr_t ci_lasta; /* last allocation */
- int ci_clen; /* length of current cluster */
- int ci_ralen; /* Read-ahead length */
- daddr_t ci_maxra; /* last readahead block */
+ daddr64_t ci_lastr; /* last read (read-ahead) */
+ daddr64_t ci_lastw; /* last write (write cluster) */
+ daddr64_t ci_cstart; /* start block of cluster */
+ daddr64_t ci_lasta; /* last allocation */
+ int ci_clen; /* length of current cluster */
+ int ci_ralen; /* Read-ahead length */
+ daddr64_t ci_maxra; /* last readahead block */
};
#ifdef _KERNEL
diff --git a/sys/sys/types.h b/sys/sys/types.h
index 404697e2104..7be89167c38 100644
--- a/sys/sys/types.h
+++ b/sys/sys/types.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: types.h,v 1.29 2006/01/06 18:53:06 millert Exp $ */
+/* $OpenBSD: types.h,v 1.30 2006/10/03 19:49:06 pedro Exp $ */
/* $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ */
/*-
@@ -128,7 +128,9 @@ typedef __psize_t psize_t;
/* Standard system types */
typedef char * caddr_t; /* core address */
-typedef __int32_t daddr_t; /* disk address */
+typedef __int32_t daddr_t; /* 32-bit disk address */
+typedef __int32_t daddr32_t; /* 32-bit disk address */
+typedef __int64_t daddr64_t; /* 64-bit disk address */
typedef __dev_t dev_t; /* device number */
typedef __fixpt_t fixpt_t; /* fixed point number */
typedef __gid_t gid_t; /* group id */
diff --git a/sys/ufs/ext2fs/ext2fs_bmap.c b/sys/ufs/ext2fs/ext2fs_bmap.c
index 5f23ca1f72f..40fc4542cd6 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.11 2005/07/03 20:14:01 drahn Exp $ */
+/* $OpenBSD: ext2fs_bmap.c,v 1.12 2006/10/03 19:49:06 pedro Exp $ */
/* $NetBSD: ext2fs_bmap.c,v 1.5 2000/03/30 12:41:11 augustss Exp $ */
/*
@@ -56,8 +56,8 @@
#include <ufs/ext2fs/ext2fs.h>
#include <ufs/ext2fs/ext2fs_extern.h>
-static int ext2fs_bmaparray(struct vnode *, ufs1_daddr_t, ufs1_daddr_t *,
- struct indir *, int *, int *);
+static int ext2fs_bmaparray(struct vnode *, ufs1_daddr_t, daddr64_t *,
+ struct indir *, int *, int *);
/*
* Bmap converts a the logical block number of a file to its physical block
@@ -106,7 +106,7 @@ int
ext2fs_bmaparray(vp, bn, bnp, ap, nump, runp)
struct vnode *vp;
ufs1_daddr_t bn;
- ufs1_daddr_t *bnp;
+ daddr64_t *bnp;
struct indir *ap;
int *nump;
int *runp;
diff --git a/sys/ufs/ufs/ufs_bmap.c b/sys/ufs/ufs/ufs_bmap.c
index b8f5aa7beb6..df8ba0d45f9 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.20 2006/04/01 02:43:05 pedro Exp $ */
+/* $OpenBSD: ufs_bmap.c,v 1.21 2006/10/03 19:49:06 pedro Exp $ */
/* $NetBSD: ufs_bmap.c,v 1.3 1996/02/09 22:36:00 christos Exp $ */
/*
@@ -94,7 +94,7 @@ ufs_bmap(void *v)
* next block and the disk address of the block (if it is assigned).
*/
int
-ufs_bmaparray(struct vnode *vp, daddr_t bn, daddr_t *bnp, struct indir *ap,
+ufs_bmaparray(struct vnode *vp, daddr_t bn, daddr64_t *bnp, struct indir *ap,
int *nump, int *runp)
{
struct inode *ip;
diff --git a/sys/ufs/ufs/ufs_extern.h b/sys/ufs/ufs/ufs_extern.h
index 1771effe74e..997b9e978fc 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.25 2005/07/20 16:30:35 pedro Exp $ */
+/* $OpenBSD: ufs_extern.h,v 1.26 2006/10/03 19:49:06 pedro Exp $ */
/* $NetBSD: ufs_extern.h,v 1.5 1996/02/09 22:36:03 christos Exp $ */
/*-
@@ -102,7 +102,7 @@ int ufsfifo_close(void *);
#endif
/* ufs_bmap.c */
-int ufs_bmaparray(struct vnode *, daddr_t, daddr_t *, struct indir *,
+int ufs_bmaparray(struct vnode *, daddr_t, daddr64_t *, struct indir *,
int *, int *);
int ufs_getlbns(struct vnode *, daddr_t, struct indir *, int *);
diff --git a/sys/uvm/uvm_swap.c b/sys/uvm/uvm_swap.c
index abb7f1c526c..27548b8cb95 100644
--- a/sys/uvm/uvm_swap.c
+++ b/sys/uvm/uvm_swap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_swap.c,v 1.65 2006/07/31 11:51:29 mickey Exp $ */
+/* $OpenBSD: uvm_swap.c,v 1.66 2006/10/03 19:49:06 pedro Exp $ */
/* $NetBSD: uvm_swap.c,v 1.40 2000/11/17 11:39:39 mrg Exp $ */
/*
@@ -1288,7 +1288,7 @@ sw_reg_strategy(sdp, bp, bn)
{
struct vnode *vp;
struct vndxfer *vnx;
- daddr_t nbn;
+ daddr64_t nbn;
caddr_t addr;
off_t byteoff;
int s, off, nra, error, sz, resid;