summaryrefslogtreecommitdiffstats
path: root/sys/gnu
diff options
context:
space:
mode:
authormckusick <mckusick@FreeBSD.org>2002-03-15 18:49:47 +0000
committermckusick <mckusick@FreeBSD.org>2002-03-15 18:49:47 +0000
commite929f2e4f07e568333e15d0f9fd992f632858bb0 (patch)
tree51f556e616d556c2c643350a9ffc80fda73ab27c /sys/gnu
parentfdd4d414b43758fe722809b27f610baa0b0607e1 (diff)
downloadFreeBSD-src-e929f2e4f07e568333e15d0f9fd992f632858bb0.zip
FreeBSD-src-e929f2e4f07e568333e15d0f9fd992f632858bb0.tar.gz
Introduce the new 64-bit size disk block, daddr64_t. Change
the bio and buffer structures to have daddr64_t bio_pblkno, b_blkno, and b_lblkno fields which allows access to disks larger than a Terabyte in size. This change also requires that the VOP_BMAP vnode operation accept and return daddr64_t blocks. This delta should not affect system operation in any way. It merely sets up the necessary interfaces to allow the development of disk drivers that work with these larger disk block addresses. It also allows for the development of UFS2 which will use 64-bit block addresses.
Diffstat (limited to 'sys/gnu')
-rw-r--r--sys/gnu/ext2fs/ext2_bmap.c13
-rw-r--r--sys/gnu/ext2fs/ext2_subr.c2
-rw-r--r--sys/gnu/fs/ext2fs/ext2_bmap.c13
-rw-r--r--sys/gnu/fs/ext2fs/ext2_subr.c2
4 files changed, 20 insertions, 10 deletions
diff --git a/sys/gnu/ext2fs/ext2_bmap.c b/sys/gnu/ext2fs/ext2_bmap.c
index ce4ddb8..fa8ea01 100644
--- a/sys/gnu/ext2fs/ext2_bmap.c
+++ b/sys/gnu/ext2fs/ext2_bmap.c
@@ -64,13 +64,16 @@ int
ufs_bmap(ap)
struct vop_bmap_args /* {
struct vnode *a_vp;
- ufs_daddr_t a_bn;
+ daddr64_t a_bn;
struct vnode **a_vpp;
- ufs_daddr_t *a_bnp;
+ daddr64_t *a_bnp;
int *a_runp;
int *a_runb;
} */ *ap;
{
+ daddr_t blkno;
+ int error;
+
/*
* Check for underlying vnode requests and ensure that logical
* to physical mapping is requested.
@@ -80,8 +83,10 @@ ufs_bmap(ap)
if (ap->a_bnp == NULL)
return (0);
- return (ufs_bmaparray(ap->a_vp, ap->a_bn, ap->a_bnp,
- ap->a_runp, ap->a_runb));
+ error = ufs_bmaparray(ap->a_vp, ap->a_bn, &blkno,
+ ap->a_runp, ap->a_runb);
+ *ap->a_bnp = blkno;
+ return (error);
}
/*
diff --git a/sys/gnu/ext2fs/ext2_subr.c b/sys/gnu/ext2fs/ext2_subr.c
index 49210b0..fc8b623 100644
--- a/sys/gnu/ext2fs/ext2_subr.c
+++ b/sys/gnu/ext2fs/ext2_subr.c
@@ -120,7 +120,7 @@ ext2_checkoverlap(bp, ip)
ep->b_blkno + btodb(ep->b_bcount) <= start)
continue;
vprint("Disk overlap", vp);
- (void)printf("\tstart %d, end %d overlap start %d, end %ld\n",
+ (void)printf("\tstart %d, end %d overlap start %lld, end %ld\n",
start, last, ep->b_blkno,
(long)(ep->b_blkno + btodb(ep->b_bcount) - 1));
panic("Disk buffer overlap");
diff --git a/sys/gnu/fs/ext2fs/ext2_bmap.c b/sys/gnu/fs/ext2fs/ext2_bmap.c
index ce4ddb8..fa8ea01 100644
--- a/sys/gnu/fs/ext2fs/ext2_bmap.c
+++ b/sys/gnu/fs/ext2fs/ext2_bmap.c
@@ -64,13 +64,16 @@ int
ufs_bmap(ap)
struct vop_bmap_args /* {
struct vnode *a_vp;
- ufs_daddr_t a_bn;
+ daddr64_t a_bn;
struct vnode **a_vpp;
- ufs_daddr_t *a_bnp;
+ daddr64_t *a_bnp;
int *a_runp;
int *a_runb;
} */ *ap;
{
+ daddr_t blkno;
+ int error;
+
/*
* Check for underlying vnode requests and ensure that logical
* to physical mapping is requested.
@@ -80,8 +83,10 @@ ufs_bmap(ap)
if (ap->a_bnp == NULL)
return (0);
- return (ufs_bmaparray(ap->a_vp, ap->a_bn, ap->a_bnp,
- ap->a_runp, ap->a_runb));
+ error = ufs_bmaparray(ap->a_vp, ap->a_bn, &blkno,
+ ap->a_runp, ap->a_runb);
+ *ap->a_bnp = blkno;
+ return (error);
}
/*
diff --git a/sys/gnu/fs/ext2fs/ext2_subr.c b/sys/gnu/fs/ext2fs/ext2_subr.c
index 49210b0..fc8b623 100644
--- a/sys/gnu/fs/ext2fs/ext2_subr.c
+++ b/sys/gnu/fs/ext2fs/ext2_subr.c
@@ -120,7 +120,7 @@ ext2_checkoverlap(bp, ip)
ep->b_blkno + btodb(ep->b_bcount) <= start)
continue;
vprint("Disk overlap", vp);
- (void)printf("\tstart %d, end %d overlap start %d, end %ld\n",
+ (void)printf("\tstart %d, end %d overlap start %lld, end %ld\n",
start, last, ep->b_blkno,
(long)(ep->b_blkno + btodb(ep->b_bcount) - 1));
panic("Disk buffer overlap");
OpenPOWER on IntegriCloud