Home | History | Annotate | Download | only in ffs

Lines Matching defs:lbn

113 	daddr_t lbn, lastlbn;
128 lbn = ffs_lblkno(fs, off);
135 UVMHIST_LOG(ubchist, "vp %#jx lbn 0x%jx size 0x%jx", (uintptr_t)vp,
136 lbn, size, 0);
138 if (lbn < 0)
148 if (lastlbn < UFS_NDADDR && lastlbn < lbn) {
178 if (lbn < UFS_NDADDR) {
179 nb = ufs_rw32(ip->i_ffs1_db[lbn], needswap);
180 if (nb != 0 && ip->i_size >= ffs_lblktosize(fs, lbn + 1)) {
190 error = bread(vp, lbn, fs->fs_bsize,
215 error = bread(vp, lbn, osize,
229 error = ffs_realloccg(ip, lbn,
230 ffs_getdb(fs, ip, lbn),
231 ffs_blkpref_ufs1(ip, lbn, (int)lbn, flags,
244 if (ip->i_size < ffs_lblktosize(fs, lbn + 1))
249 error = ffs_alloc(ip, lbn,
250 ffs_blkpref_ufs1(ip, lbn, (int)lbn, flags,
256 error = ffs_getblk(vp, lbn, FFS_FSBTODB(fs, newb),
262 ip->i_ffs1_db[lbn] = ufs_rw32((u_int32_t)newb, needswap);
272 if ((error = ufs_getlbns(vp, lbn, indirs, &num)) != 0)
285 pref = ffs_blkpref_ufs1(ip, lbn, 0, flags | B_METAONLY, NULL);
286 error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize,
334 pref = ffs_blkpref_ufs1(ip, lbn, indirs[i-1].in_off,
337 pref = ffs_blkpref_ufs1(ip, lbn, 0, flags | B_METAONLY,
339 error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize,
393 pref = ffs_blkpref_ufs1(ip, lbn, indirs[num].in_off, flags,
395 error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, flags, cred,
404 error = ffs_getblk(vp, lbn, FFS_FSBTODB(fs, nb),
431 error = bread(vp, lbn, (int)fs->fs_bsize,
437 error = ffs_getblk(vp, lbn, FFS_FSBTODB(fs, nb),
531 daddr_t lbn, lastlbn;
548 lbn = ffs_lblkno(fs, off);
555 UVMHIST_LOG(ubchist, "vp %#jx lbn 0x%jx size 0x%jx", (uintptr_t)vp,
556 lbn, size, 0);
558 if (lbn < 0)
566 if (lbn >= UFS_NXADDR)
574 if (lastlbn < lbn) {
599 nb = dp->di_extb[lbn];
600 if (nb != 0 && dp->di_extsize >= ffs_lblktosize(fs, lbn + 1)) {
601 error = bread(vp, -1 - lbn, fs->fs_bsize,
619 error = bread(vp, -1 - lbn, osize,
629 error = ffs_realloccg(ip, -1 - lbn,
630 ffs_extb(fs, dp, lbn),
631 ffs_blkpref_ufs2(ip, lbn, (int)lbn, flags,
638 if (dp->di_extsize < ffs_lblktosize(fs, lbn + 1))
643 error = ffs_alloc(ip, lbn,
644 ffs_blkpref_ufs2(ip, lbn, (int)lbn, flags,
649 error = ffs_getblk(vp, -1 - lbn, FFS_FSBTODB(fs, newb),
654 dp->di_extb[lbn] = FFS_DBTOFSB(fs, bp->b_blkno);
666 if (lastlbn < UFS_NDADDR && lastlbn < lbn) {
671 error = ffs_realloccg(ip, nb, ffs_getdb(fs, ip, lbn),
696 if (lbn < UFS_NDADDR) {
697 nb = ufs_rw64(ip->i_ffs2_db[lbn], needswap);
698 if (nb != 0 && ip->i_size >= ffs_lblktosize(fs, lbn + 1)) {
708 error = bread(vp, lbn, fs->fs_bsize,
733 error = bread(vp, lbn, osize,
747 error = ffs_realloccg(ip, lbn,
748 ffs_getdb(fs, ip, lbn),
749 ffs_blkpref_ufs2(ip, lbn, (int)lbn, flags,
762 if (ip->i_size < ffs_lblktosize(fs, lbn + 1))
767 error = ffs_alloc(ip, lbn,
768 ffs_blkpref_ufs2(ip, lbn, (int)lbn, flags,
774 error = ffs_getblk(vp, lbn, FFS_FSBTODB(fs, newb),
780 ip->i_ffs2_db[lbn] = ufs_rw64(newb, needswap);
790 if ((error = ufs_getlbns(vp, lbn, indirs, &num)) != 0)
803 pref = ffs_blkpref_ufs2(ip, lbn, 0, flags | B_METAONLY, NULL);
804 error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize,
852 pref = ffs_blkpref_ufs2(ip, lbn, indirs[i-1].in_off,
855 pref = ffs_blkpref_ufs2(ip, lbn, 0, flags | B_METAONLY,
857 error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize,
911 pref = ffs_blkpref_ufs2(ip, lbn, indirs[num].in_off, flags,
913 error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, flags, cred,
922 error = ffs_getblk(vp, lbn, FFS_FSBTODB(fs, nb),
949 error = bread(vp, lbn, (int)fs->fs_bsize,
955 error = ffs_getblk(vp, lbn, FFS_FSBTODB(fs, nb),