summaryrefslogtreecommitdiffstats
path: root/sys/fs/msdosfs/msdosfs_fat.c
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/fs/msdosfs/msdosfs_fat.c
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/fs/msdosfs/msdosfs_fat.c')
-rw-r--r--sys/fs/msdosfs/msdosfs_fat.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/fs/msdosfs/msdosfs_fat.c b/sys/fs/msdosfs/msdosfs_fat.c
index 828edb70..7c4f6c9 100644
--- a/sys/fs/msdosfs/msdosfs_fat.c
+++ b/sys/fs/msdosfs/msdosfs_fat.c
@@ -994,6 +994,7 @@ extendfile(dep, count, bpp, ncp, flags)
u_long cn, got;
struct msdosfsmount *pmp = dep->de_pmp;
struct buf *bp;
+ daddr_t blkno;
/*
* Don't try to extend the root directory
@@ -1083,10 +1084,12 @@ extendfile(dep, count, bpp, ncp, flags)
*/
if (pcbmap(dep,
de_bn2cn(pmp, bp->b_lblkno),
- &bp->b_blkno, 0, 0))
+ &blkno, 0, 0))
bp->b_blkno = -1;
if (bp->b_blkno == -1)
panic("extendfile: pcbmap");
+ else
+ bp->b_blkno = blkno;
}
clrbuf(bp);
if (bpp) {
OpenPOWER on IntegriCloud