SCCS-vsn: sys/ufs/lfs/lfs_balloc.c 7.17
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)lfs_balloc.c 7.16 (Berkeley) %G%
+ * @(#)lfs_balloc.c 7.17 (Berkeley) %G%
* is done by using the logical block number to index into
* the array of block pointers described by the dinode.
*/
* is done by using the logical block number to index into
* the array of block pointers described by the dinode.
*/
lfs_bmap(ip, bn, bnp)
register struct inode *ip;
register daddr_t bn;
lfs_bmap(ip, bn, bnp)
register struct inode *ip;
register daddr_t bn;
struct buf *bp;
daddr_t *bap, daddr;
daddr_t lbn_ind;
struct buf *bp;
daddr_t *bap, daddr;
daddr_t lbn_ind;
int error;
printf("lfs_bmap: block number %d, inode %d\n", bn, ip->i_number);
int error;
printf("lfs_bmap: block number %d, inode %d\n", bn, ip->i_number);
if (bn < NDADDR) {
nb = ip->i_db[bn];
if (nb == 0) {
if (bn < NDADDR) {
nb = ip->i_db[bn];
if (nb == 0) {
devvp = VFSTOUFS(vp->v_mount)->um_devvp;
for (off = NIADDR - j, bap = ip->i_ib; j <= NIADDR; j++) {
if((daddr = bap[off]) == 0) {
devvp = VFSTOUFS(vp->v_mount)->um_devvp;
for (off = NIADDR - j, bap = ip->i_ib; j <= NIADDR; j++) {
if((daddr = bap[off]) == 0) {