Make daddr_t and u_daddr_t 64bits wide.

Retire daddr64_t and use daddr_t instead.

Sponsored by:	DARPA & NAI Labs.
This commit is contained in:
Poul-Henning Kamp 2002-05-14 11:09:43 +00:00
parent 3f2bb38c5c
commit 98b0c78978
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=96572
14 changed files with 30 additions and 31 deletions

View File

@ -1693,7 +1693,7 @@ coda_bmap(v)
struct vnode *vp __attribute__((unused)) = ap->a_vp; /* file's vnode */
daddr_t bn __attribute__((unused)) = ap->a_bn; /* fs block number */
struct vnode **vpp = ap->a_vpp; /* RETURN vp of device */
daddr64_t *bnp __attribute__((unused)) = ap->a_bnp; /* RETURN device block number */
daddr_t *bnp __attribute__((unused)) = ap->a_bnp; /* RETURN device block number */
struct thread *td __attribute__((unused)) = curthread;
/* upcall decl */
/* locals */

View File

@ -1693,7 +1693,7 @@ coda_bmap(v)
struct vnode *vp __attribute__((unused)) = ap->a_vp; /* file's vnode */
daddr_t bn __attribute__((unused)) = ap->a_bn; /* fs block number */
struct vnode **vpp = ap->a_vpp; /* RETURN vp of device */
daddr64_t *bnp __attribute__((unused)) = ap->a_bnp; /* RETURN device block number */
daddr_t *bnp __attribute__((unused)) = ap->a_bnp; /* RETURN device block number */
struct thread *td __attribute__((unused)) = curthread;
/* upcall decl */
/* locals */

View File

@ -1741,9 +1741,9 @@ static int
msdosfs_bmap(ap)
struct vop_bmap_args /* {
struct vnode *a_vp;
daddr64_t a_bn;
daddr_t a_bn;
struct vnode **a_vpp;
daddr64_t *a_bnp;
daddr_t *a_bnp;
int *a_runp;
int *a_runb;
} */ *ap;

View File

@ -63,7 +63,7 @@ static int udf_lookup(struct vop_cachedlookup_args *);
static int udf_reclaim(struct vop_reclaim_args *);
static void udf_dumpblock(void *, int) __unused;
static int udf_readatoffset(struct udf_node *, int *, int, struct buf **, uint8_t **);
static int udf_bmap_internal(struct udf_node *, uint32_t, daddr64_t *, uint32_t *);
static int udf_bmap_internal(struct udf_node *, uint32_t, daddr_t *, uint32_t *);
vop_t **udf_vnodeop_p;
static struct vnodeopv_entry_desc udf_vnodeop_entries[] = {
@ -799,7 +799,7 @@ udf_bmap(struct vop_bmap_args *a)
{
struct udf_node *node;
uint32_t max_size;
daddr64_t lsector;
daddr_t lsector;
int error;
node = VTON(a->a_vp);
@ -1084,7 +1084,7 @@ udf_readatoffset(struct udf_node *node, int *size, int offset, struct buf **bp,
struct file_entry *fentry = NULL;
struct buf *bp1;
uint32_t max_size;
daddr64_t sector;
daddr_t sector;
int error;
udfmp = node->udfmp;
@ -1124,14 +1124,14 @@ udf_readatoffset(struct udf_node *node, int *size, int offset, struct buf **bp,
* block.
*/
static int
udf_bmap_internal(struct udf_node *node, uint32_t offset, daddr64_t *sector, uint32_t *max_size)
udf_bmap_internal(struct udf_node *node, uint32_t offset, daddr_t *sector, uint32_t *max_size)
{
struct udf_mnt *udfmp;
struct file_entry *fentry;
void *icb;
struct icb_tag *tag;
uint32_t icblen = 0;
daddr64_t lsector;
daddr_t lsector;
int ad_offset, ad_num = 0;
int i, p_offset;

View File

@ -64,9 +64,9 @@ int
ufs_bmap(ap)
struct vop_bmap_args /* {
struct vnode *a_vp;
daddr64_t a_bn;
daddr_t a_bn;
struct vnode **a_vpp;
daddr64_t *a_bnp;
daddr_t *a_bnp;
int *a_runp;
int *a_runb;
} */ *ap;

View File

@ -64,9 +64,9 @@ int
ufs_bmap(ap)
struct vop_bmap_args /* {
struct vnode *a_vp;
daddr64_t a_bn;
daddr_t a_bn;
struct vnode **a_vpp;
daddr64_t *a_bnp;
daddr_t *a_bnp;
int *a_runp;
int *a_runb;
} */ *ap;

View File

@ -67,7 +67,7 @@ static struct cluster_save *
cluster_collectbufs(struct vnode *vp, struct buf *last_bp);
static struct buf *
cluster_rbuild(struct vnode *vp, u_quad_t filesize, daddr_t lbn,
daddr64_t blkno, long size, int run, struct buf *fbp);
daddr_t blkno, long size, int run, struct buf *fbp);
static int write_behind = 1;
SYSCTL_INT(_vfs, OID_AUTO, write_behind, CTLFLAG_RW, &write_behind, 0,
@ -103,7 +103,7 @@ cluster_read(vp, filesize, lblkno, size, cred, totread, seqcount, bpp)
struct buf **bpp;
{
struct buf *bp, *rbp, *reqbp;
daddr64_t blkno, origblkno;
daddr_t blkno, origblkno;
int error, num_ra;
int i;
int maxra, racluster;
@ -319,7 +319,7 @@ cluster_rbuild(vp, filesize, lbn, blkno, size, run, fbp)
struct vnode *vp;
u_quad_t filesize;
daddr_t lbn;
daddr64_t blkno;
daddr_t blkno;
long size;
int run;
struct buf *fbp;

View File

@ -378,9 +378,9 @@ vop_unlock {
#
vop_bmap {
IN struct vnode *vp;
IN daddr64_t bn;
IN daddr_t bn;
OUT struct vnode **vpp;
IN daddr64_t *bnp;
IN daddr_t *bnp;
OUT int *runp;
OUT int *runb;
};

View File

@ -65,7 +65,7 @@ struct iodone_chain {
struct bio {
u_int bio_cmd; /* I/O operation. */
dev_t bio_dev; /* Device to do I/O on. */
daddr64_t bio_blkno; /* Underlying physical block number. */
daddr_t bio_blkno; /* Underlying physical block number. */
off_t bio_offset; /* Offset into file. */
long bio_bcount; /* Valid bytes in buffer. */
caddr_t bio_data; /* Memory, superblocks, indirect etc. */
@ -81,7 +81,7 @@ struct bio {
TAILQ_ENTRY(bio) bio_queue; /* Disksort queue. */
/* XXX: these go away when bio chaining is introduced */
daddr64_t bio_pblkno; /* physical block number */
daddr_t bio_pblkno; /* physical block number */
struct iodone_chain *bio_done_chain;
struct bio *bio_linkage;
off_t bio_length;
@ -135,7 +135,7 @@ biofinish(struct bio *bp, struct devstat *stat, int error)
struct bio_queue_head {
TAILQ_HEAD(bio_queue, bio) queue;
daddr64_t last_pblkno;
daddr_t last_pblkno;
struct bio *insert_point;
struct bio *switch_point;
int busy;

View File

@ -126,7 +126,7 @@ struct buf {
long b_runningbufspace; /* when I/O is running, pipelining */
caddr_t b_kvabase; /* base kva for buffer */
int b_kvasize; /* size of kva for buffer */
daddr64_t b_lblkno; /* Logical block number. */
daddr_t b_lblkno; /* Logical block number. */
struct vnode *b_vp; /* Device vnode. */
int b_dirtyoff; /* Offset in buffer of dirty region. */
int b_dirtyend; /* Offset of end of dirty region. */
@ -366,7 +366,7 @@ BUF_REFCNT(struct buf *bp)
struct buf_queue_head {
TAILQ_HEAD(buf_queue, buf) queue;
daddr64_t last_pblkno;
daddr_t last_pblkno;
struct buf *insert_point;
struct buf *switch_point;
};

View File

@ -126,9 +126,8 @@ typedef quad_t * qaddr_t;
typedef char * caddr_t; /* core address */
typedef __const char * c_caddr_t; /* core address, pointer to const */
typedef __volatile char *v_caddr_t; /* core address, pointer to volatile */
typedef int32_t daddr_t; /* disk address */
typedef int64_t daddr64_t; /* 64-bit disk address */
typedef u_int32_t u_daddr_t; /* unsigned disk address */
typedef int64_t daddr_t; /* disk address */
typedef u_int64_t u_daddr_t; /* unsigned disk address */
typedef u_int32_t fixpt_t; /* fixed point number */
#ifdef _BSD_GID_T_

View File

@ -64,9 +64,9 @@ int
ufs_bmap(ap)
struct vop_bmap_args /* {
struct vnode *a_vp;
daddr64_t a_bn;
daddr_t a_bn;
struct vnode **a_vpp;
daddr64_t *a_bnp;
daddr_t *a_bnp;
int *a_runp;
int *a_runb;
} */ *ap;

View File

@ -60,7 +60,7 @@ int ufs_vnoperatefifo(struct vop_generic_args *);
int ufs_vnoperatespec(struct vop_generic_args *);
int ufs_bmap(struct vop_bmap_args *);
int ufs_bmaparray(struct vnode *, daddr_t, daddr_t *, int *, int *);
int ufs_bmaparray(struct vnode *, ufs_daddr_t, ufs_daddr_t *, int *, int *);
int ufs_fhtovp(struct mount *, struct ufid *, struct vnode **);
int ufs_checkpath(struct inode *, struct inode *, struct ucred *);
void ufs_dirbad(struct inode *, doff_t, char *);

View File

@ -193,7 +193,7 @@ vnode_pager_haspage(object, pindex, before, after)
int *after;
{
struct vnode *vp = object->handle;
daddr64_t bn;
daddr_t bn;
int err;
daddr_t reqblock;
int poff;
@ -369,7 +369,7 @@ vnode_pager_addr(vp, address, run)
{
int rtaddress;
int bsize;
daddr64_t block;
daddr_t block;
struct vnode *rtvp;
int err;
daddr_t vblock;