diff options
author | mckusick <mckusick@FreeBSD.org> | 2002-03-15 18:49:47 +0000 |
---|---|---|
committer | mckusick <mckusick@FreeBSD.org> | 2002-03-15 18:49:47 +0000 |
commit | e929f2e4f07e568333e15d0f9fd992f632858bb0 (patch) | |
tree | 51f556e616d556c2c643350a9ffc80fda73ab27c /sys/ufs/ffs | |
parent | fdd4d414b43758fe722809b27f610baa0b0607e1 (diff) | |
download | FreeBSD-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/ufs/ffs')
-rw-r--r-- | sys/ufs/ffs/ffs_snapshot.c | 8 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_softdep.c | 7 |
2 files changed, 9 insertions, 6 deletions
diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c index fd47219..faca50f 100644 --- a/sys/ufs/ffs/ffs_snapshot.c +++ b/sys/ufs/ffs/ffs_snapshot.c @@ -511,8 +511,8 @@ out: /* * Copy a cylinder group map. All the unallocated blocks are marked * BLK_NOCOPY so that the snapshot knows that it need not copy them - * if they are later written. If how is one, then this is a first - * pass, so only setting needs to be done. If how is 2, then this + * if they are later written. If passno is one, then this is a first + * pass, so only setting needs to be done. If passno is 2, then this * is a revision to a previous pass which must be undone as the * replacement pass is done. */ @@ -1102,7 +1102,7 @@ ffs_snapblkfree(fs, devvp, bno, size, inum) } #ifdef DEBUG if (snapdebug) - printf("%s%d lbn %d for inum %d size %ld to blkno %d\n", + printf("%s%d lbn %d for inum %d size %ld to blkno %lld\n", "Copyonremove: snapino ", ip->i_number, lbn, inum, size, cbp->b_blkno); #endif @@ -1319,7 +1319,7 @@ retry: printf("fs metadata"); else printf("inum %d", VTOI(bp->b_vp)->i_number); - printf(" lblkno %d to blkno %d\n", bp->b_lblkno, + printf(" lblkno %lld to blkno %lld\n", bp->b_lblkno, cbp->b_blkno); } #endif diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index b07a356..475ba17 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -1654,6 +1654,7 @@ setup_allocindir_phase2(bp, ip, aip) struct allocindir *oldaip; struct freefrag *freefrag; struct newblk *newblk; + daddr_t blkno; if (bp->b_lblkno >= 0) panic("setup_allocindir_phase2: not indir blk"); @@ -1733,8 +1734,10 @@ setup_allocindir_phase2(bp, ip, aip) newindirdep->ir_state = ATTACHED; LIST_INIT(&newindirdep->ir_deplisthd); LIST_INIT(&newindirdep->ir_donehd); - if (bp->b_blkno == bp->b_lblkno) - ufs_bmaparray(bp->b_vp, bp->b_lblkno, &bp->b_blkno, NULL, NULL); + if (bp->b_blkno == bp->b_lblkno) { + ufs_bmaparray(bp->b_vp, bp->b_lblkno, &blkno, NULL, NULL); + bp->b_blkno = blkno; + } newindirdep->ir_savebp = getblk(ip->i_devvp, bp->b_blkno, bp->b_bcount, 0, 0); BUF_KERNPROC(newindirdep->ir_savebp); |