Lines Matching refs:lbn
56 ext2_ext_balloc(struct inode *ip, uint32_t lbn, int size, in ext2_ext_balloc() argument
68 error = ext4_ext_get_blocks(ip, lbn, blks, cred, NULL, &allocated, &newblk); in ext2_ext_balloc()
73 bp = getblk(vp, lbn, fs->e2fs_bsize, 0, 0, 0); in ext2_ext_balloc()
77 error = bread(vp, lbn, fs->e2fs_bsize, NOCRED, &bp); in ext2_ext_balloc()
98 ext2_balloc(struct inode *ip, e2fs_lbn_t lbn, int size, struct ucred *cred, in ext2_balloc() argument
111 if (lbn < 0) in ext2_balloc()
121 if (lbn == ip->i_next_alloc_block + 1) { in ext2_balloc()
127 return (ext2_ext_balloc(ip, lbn, size, cred, bpp, flags)); in ext2_balloc()
132 if (lbn < EXT2_NDADDR) { in ext2_balloc()
133 nb = ip->i_db[lbn]; in ext2_balloc()
139 error = bread(vp, lbn, fs->e2fs_bsize, NOCRED, &bp); in ext2_balloc()
144 if (ip->i_size >= (lbn + 1) * fs->e2fs_bsize) { in ext2_balloc()
150 error = ext2_alloc(ip, lbn, in ext2_balloc()
151 ext2_blkpref(ip, lbn, (int)lbn, &ip->i_db[0], 0), in ext2_balloc()
161 bp = getblk(vp, lbn, fs->e2fs_bsize, 0, 0, 0); in ext2_balloc()
166 ip->i_db[lbn] = dbtofsb(fs, bp->b_blkno); in ext2_balloc()
175 if ((error = ext2_getlbns(vp, lbn, indirs, &num)) != 0) in ext2_balloc()
188 pref = ext2_blkpref(ip, lbn, indirs[0].in_off + in ext2_balloc()
190 if ((error = ext2_alloc(ip, lbn, pref, fs->e2fs_bsize, cred, in ext2_balloc()
230 pref = ext2_blkpref(ip, lbn, indirs[i].in_off, bap, in ext2_balloc()
232 error = ext2_alloc(ip, lbn, pref, (int)fs->e2fs_bsize, cred, &newb); in ext2_balloc()
270 pref = ext2_blkpref(ip, lbn, indirs[i].in_off, &bap[0], in ext2_balloc()
273 lbn, pref, (int)fs->e2fs_bsize, cred, &newb)) != 0) { in ext2_balloc()
280 nbp = getblk(vp, lbn, fs->e2fs_bsize, 0, 0, 0); in ext2_balloc()
304 error = cluster_read(vp, ip->i_size, lbn, in ext2_balloc()
308 error = bread(vp, lbn, (int)fs->e2fs_bsize, NOCRED, &nbp); in ext2_balloc()
315 nbp = getblk(vp, lbn, fs->e2fs_bsize, 0, 0, 0); in ext2_balloc()