/freebsd-9.3-release/sys/fs/ext2fs/ |
H A D | ext2_balloc.c | 60 ext2_balloc(struct inode *ip, e2fs_lbn_t lbn, int size, struct ucred *cred, argument 73 if (lbn < 0) 83 if (lbn == ip->i_next_alloc_block + 1) { 91 if (lbn < NDADDR) { 92 nb = ip->i_db[lbn]; 95 if (nb != 0 && ip->i_size >= (lbn + 1) * fs->e2fs_bsize) { 96 error = bread(vp, lbn, fs->e2fs_bsize, NOCRED, &bp); 112 error = bread(vp, lbn, osize, NOCRED, &bp); 131 if (ip->i_size < (lbn + 1) * fs->e2fs_bsize) 136 error = ext2_alloc(ip, lbn, [all...] |
H A D | ext2_extents.c | 47 *path, daddr_t lbn) 56 if (lbn < m->ei_blk) 66 ext4_ext_binsearch(struct inode *ip, struct ext4_extent_path *path, daddr_t lbn) argument 78 if (lbn < m->e_blk) 91 ext4_ext_in_cache(struct inode *ip, daddr_t lbn, struct ext4_extent *ep) argument 102 if (lbn >= ecp->ec_blk && lbn < ecp->ec_blk + ecp->ec_len) { 132 daddr_t lbn, struct ext4_extent_path *path) 149 ext4_ext_binsearch_index(ip, path, lbn); 175 ext4_ext_binsearch(ip, path, lbn); 46 ext4_ext_binsearch_index(struct inode *ip, struct ext4_extent_path *path, daddr_t lbn) argument 131 ext4_ext_find_extent(struct m_ext2fs *fs, struct inode *ip, daddr_t lbn, struct ext4_extent_path *path) argument [all...] |
H A D | ext2_subr.c | 72 e2fs_lbn_t lbn; local 80 lbn = lblkno(fs, offset); 81 bsize = blksize(fs, ip, lbn); 92 if (ext4_ext_find_extent(fs, ip, lbn, &path) == NULL) 98 newblk = lbn - ep->e_blk + 116 bp->b_offset = lbn * bsize; 122 if ((error = bread(vp, lbn, bsize, NOCRED, &bp)) != 0) {
|
H A D | ext2_inode.c | 115 int32_t bn, lbn, lastiblock[NIADDR], indir_lbn[NIADDR]; local 160 lbn = lblkno(fs, length - 1); 162 error = ext2_balloc(oip, lbn, offset + 1, cred, &bp, flags); 191 lbn = lblkno(fs, length); 193 error = ext2_balloc(oip, lbn, offset, cred, &bp, flags); 197 size = blksize(fs, oip, lbn); 358 ext2_indirtrunc(struct inode *ip, daddr_t lbn, daddr_t dbn, argument 390 bp = getblk(vp, lbn, (int)fs->e2fs_bsize, 0, 0, 0); 426 for (i = NINDIR(fs) - 1, nlbn = lbn + 1 - i * factor; i > last;
|
H A D | fs.h | 150 #define blksize(fs, ip, lbn) ((fs)->e2fs_fsize)
|
H A D | ext2_bmap.c | 98 daddr_t lbn; local 102 lbn = bn; 113 ext4_ext_find_extent(fs, ip, lbn, &path); 118 *bnp = fsbtodb(fs, lbn - ep->e_blk +
|
H A D | ext2_vnops.c | 1643 daddr_t lbn, nextlbn; local 1679 lbn = lblkno(fs, uio->uio_offset); 1680 nextlbn = lbn + 1; 1681 size = blksize(fs, ip, lbn); 1691 error = bread(vp, lbn, size, NOCRED, &bp); 1693 error = cluster_read(vp, ip->i_size, lbn, size, 1697 error = breadn(vp, lbn, 1700 error = bread(vp, lbn, size, NOCRED, &bp); 1802 daddr_t lbn, newblk; local 1826 lbn 1901 daddr_t lbn; local [all...] |
/freebsd-9.3-release/usr.sbin/makefs/ffs/ |
H A D | ffs_balloc.c | 80 daddr_t lbn, lastlbn; local 93 lbn = lblkno(fs, offset); 100 if (lbn < 0) 110 if (lastlbn < NDADDR && lastlbn < lbn) { 123 if (lbn < NDADDR) { 124 nb = ufs_rw32(ip->i_ffs1_db[lbn], needswap); 125 if (nb != 0 && ip->i_ffs1_size >= lblktosize(fs, lbn + 1)) { 135 error = bread(ip->i_fd, ip->i_fs, lbn, 161 error = bread(ip->i_fd, ip->i_fs, lbn, 180 if (ip->i_ffs1_size < lblktosize(fs, lbn 332 daddr_t lbn, lastlbn; local [all...] |
H A D | ffs_alloc.c | 91 ffs_alloc(struct inode *ip, daddr_t lbn __unused, daddr_t bpref, int size, 152 ffs_blkpref_ufs1(struct inode *ip, daddr_t lbn, int indx, int32_t *bap) argument 160 if (lbn < NDADDR + NINDIR(fs)) { 170 ino_to_cg(fs, ip->i_number) + lbn / fs->fs_maxbpg; 191 ffs_blkpref_ufs2(struct inode *ip, daddr_t lbn, int indx, int64_t *bap) argument 199 if (lbn < NDADDR + NINDIR(fs)) { 209 ino_to_cg(fs, ip->i_number) + lbn / fs->fs_maxbpg;
|
/freebsd-9.3-release/sys/ufs/ffs/ |
H A D | ffs_balloc.c | 95 ufs_lbn_t lbn, lastlbn; local 116 lbn = lblkno(fs, startoffset); 124 if (lbn < 0) 136 if (lastlbn < NDADDR && lastlbn < lbn) { 164 if (lbn < NDADDR) { 167 nb = dp->di_db[lbn]; 168 if (nb != 0 && ip->i_size >= smalllblktosize(fs, lbn + 1)) { 169 error = bread(vp, lbn, fs->fs_bsize, NOCRED, &bp); 185 error = bread(vp, lbn, osize, NOCRED, &bp); 193 error = ffs_realloccg(ip, lbn, d 544 ufs_lbn_t lbn, lastlbn; local [all...] |
H A D | ffs_snapshot.c | 998 ufs_lbn_t lbn, rlbn; local 1008 lbn = fragstoblks(fs, ino_to_fsba(fs, cancelip->i_number)); 1010 if (lbn < NDADDR) { 1011 blkno = VTOI(snapvp)->i_din1->di_db[lbn]; 1016 error = ffs_balloc_ufs1(snapvp, lblktosize(fs, (off_t)lbn), 1021 indiroff = (lbn - NDADDR) % NINDIR(fs); 1026 if ((error = bread(snapvp, lbn, fs->fs_bsize, KERNCRED, &bp))) 1029 error = ffs_balloc_ufs1(snapvp, lblktosize(fs, (off_t)lbn), 1033 if ((error = readblock(snapvp, bp, lbn)) != 0) 1061 lbn 1187 ufs_lbn_t lbn; local 1282 ufs_lbn_t lbn, rlbn; local 1471 ufs_lbn_t lbn; local 1748 ufs_lbn_t lbn; local 2127 ufs2_daddr_t lbn, *snapblklist; local 2243 ufs2_daddr_t lbn, blkno, *snapblklist; local [all...] |
H A D | fs.h | 97 * information in the inode, using the ``blksize(fs, ip, lbn)'' macro. 610 #define blksize(fs, ip, lbn) \ 611 (((lbn) >= NDADDR || (ip)->i_size >= smalllblktosize(fs, (lbn) + 1)) \ 614 #define sblksize(fs, size, lbn) \ 615 (((lbn) >= NDADDR || (size) >= ((lbn) + 1) << (fs)->fs_bshift) \ 626 * are the negated address of the lowest lbn reachable, double indirects 627 * are this lbn - 1 and triple indirects are this lbn 631 lbn_level(ufs_lbn_t lbn) argument [all...] |
H A D | ffs_vnops.c | 219 ufs_lbn_t lbn; local 240 lbn = lblkno(ip->i_fs, (ip->i_size + ip->i_fs->fs_bsize - 1)); 259 if (bp->b_lblkno > lbn) 425 ufs_lbn_t lbn, nextlbn; local 478 lbn = lblkno(fs, uio->uio_offset); 479 nextlbn = lbn + 1; 487 size = blksize(fs, ip, lbn); 511 error = bread_gb(vp, lbn, size, NOCRED, 521 error = cluster_read_gb(vp, ip->i_size, lbn, 534 error = breadn_flags(vp, lbn, siz 648 ufs_lbn_t lbn; local 893 ufs_lbn_t lbn, nextlbn; local 1048 ufs_lbn_t lbn; local 1376 daddr_t lbn; local [all...] |
H A D | ffs_subr.c | 77 ufs_lbn_t lbn; local 82 lbn = lblkno(fs, offset); 83 bsize = blksize(fs, ip, lbn); 86 error = bread(vp, lbn, bsize, NOCRED, &bp);
|
H A D | ffs_inode.c | 181 ufs2_daddr_t bn, lbn, lastblock, lastiblock[NIADDR], indir_lbn[NIADDR]; local 369 lbn = lblkno(fs, length); 382 if (DOINGSOFTDEP(vp) && lbn < NDADDR && 388 size = blksize(fs, ip, lbn); 576 ffs_indirtrunc(ip, lbn, dbn, lastbn, level, countp) 578 ufs2_daddr_t lbn, lastbn; 613 bp = getblk(vp, lbn, (int)fs->fs_bsize, 0, 0, 0); 661 for (i = NINDIR(fs) - 1, nlbn = lbn + 1 - i * factor; i > last;
|
/freebsd-9.3-release/sbin/fsck_ffs/ |
H A D | suj.c | 499 blk_equals(struct jblkrec *brec, ino_t ino, ufs_lbn_t lbn, ufs2_daddr_t start, argument 503 if (brec->jb_ino != ino || brec->jb_lbn != lbn) 530 blk_freemask(ufs2_daddr_t blk, ino_t ino, ufs_lbn_t lbn, int frags) argument 559 if (blk_equals(brec, ino, lbn, blk, frags) == 1) 582 blk_isindir(ufs2_daddr_t blk, ino_t ino, ufs_lbn_t lbn) argument 593 if (blk_equals(brec, ino, lbn, blk, fs->fs_frag)) 694 * Fetch an indirect block to find the block at a given lbn. The lbn 699 indir_blkatoff(ufs2_daddr_t blk, ino_t ino, ufs_lbn_t cur, ufs_lbn_t lbn) argument 712 err_suj("Invalid indir lbn 750 ino_blkatoff(union dinode *ip, ino_t ino, ufs_lbn_t lbn, int *frags) argument 803 blk_isat(ino_t ino, ufs_lbn_t lbn, ufs2_daddr_t blk, int *frags) argument 828 ufs_lbn_t lbn; local 866 ufs_lbn_t lbn; local 956 indir_visit(ino_t ino, ufs_lbn_t lbn, ufs2_daddr_t blk, uint64_t *frags, ino_visitor visitor, int flags) argument 1024 ufs_lbn_t lbn; local 1080 null_visit(ino_t ino, ufs_lbn_t lbn, ufs2_daddr_t blk, int frags) argument 1141 blk_free_visit(ino_t ino, ufs_lbn_t lbn, ufs2_daddr_t blk, int frags) argument 1153 blk_free_lbn(ufs2_daddr_t blk, ino_t ino, ufs_lbn_t lbn, int frags, int follow) argument 1231 ino_free_children(ino_t ino, ufs_lbn_t lbn, ufs2_daddr_t blk, int frags) argument 1437 indir_trunc(ino_t ino, ufs_lbn_t lbn, ufs2_daddr_t blk, ufs_lbn_t lastlbn) argument 1513 ufs_lbn_t lbn; local 2521 suj_add_block(ino_t ino, ufs_lbn_t lbn, ufs2_daddr_t blk, int frags) argument 2630 suj_find(ino_t ino, ufs_lbn_t lbn, ufs2_daddr_t blk, int frags) argument [all...] |
/freebsd-9.3-release/sys/boot/common/ |
H A D | ufsread.c | 181 ufs_lbn_t lbn; local 250 lbn = lblkno(&fs, fs_off); 252 if (lbn < NDADDR) { 253 addr2 = DIP(di_db[lbn]); 254 } else if (lbn < NDADDR + NINDIR(&fs)) { 257 u = (u_int)(lbn - NDADDR) / n * DBPERVBLK; 264 n = (lbn - NDADDR) & (n - 1); 285 n = sblksize(&fs, size, lbn) - (off & ~VBLKMASK);
|
/freebsd-9.3-release/sys/kern/ |
H A D | vfs_cluster.c | 66 daddr_t lbn, daddr_t blkno, long size, int run, int gbflags, 318 cluster_rbuild(struct vnode *vp, u_quad_t filesize, daddr_t lbn, argument 335 while ((u_quad_t) size * (lbn + run) > filesize) { 343 tbp = getblk(vp, lbn, size, 0, 0, gbflags); 375 bp->b_lblkno = lbn; 395 tbp = getblk(vp, lbn + i, size, 0, 0, GB_LOCK_NOWAIT | 632 daddr_t lbn; local 647 lbn = bp->b_lblkno; 651 if (lbn == 0) 654 if (vp->v_clen == 0 || lbn ! 1044 daddr_t lbn; local [all...] |
/freebsd-9.3-release/sys/fs/nfsclient/ |
H A D | nfs_clbio.c | 433 daddr_t lbn, rabn; local 485 lbn = uio->uio_offset / biosize; 493 (off_t)(lbn + 1 + nra) * biosize < nsize; nra++) { 494 rabn = lbn + 1 + nra; 521 if ((off_t)lbn * biosize >= nsize) { 523 } else if ((off_t)(lbn + 1) * biosize > nsize) { 524 bcount = nsize - (off_t)lbn * biosize; 526 bp = nfs_getcacheblk(vp, lbn, bcount, td); 586 lbn = (uoff_t)uio->uio_offset / NFS_DIRBLKSIZ; 588 bp = nfs_getcacheblk(vp, lbn, NFS_DIRBLKSI 875 daddr_t lbn; local 1860 daddr_t lbn; local [all...] |
/freebsd-9.3-release/sys/nfsclient/ |
H A D | nfs_bio.c | 429 daddr_t lbn, rabn; local 476 lbn = uio->uio_offset / biosize; 484 (off_t)(lbn + 1 + nra) * biosize < nsize; nra++) { 485 rabn = lbn + 1 + nra; 512 if ((off_t)lbn * biosize >= nsize) { 514 } else if ((off_t)(lbn + 1) * biosize > nsize) { 515 bcount = nsize - (off_t)lbn * biosize; 517 bp = nfs_getcacheblk(vp, lbn, bcount, td); 577 lbn = (uoff_t)uio->uio_offset / NFS_DIRBLKSIZ; 579 bp = nfs_getcacheblk(vp, lbn, NFS_DIRBLKSI 866 daddr_t lbn; local 1781 daddr_t lbn; local [all...] |
/freebsd-9.3-release/sys/fs/cd9660/ |
H A D | cd9660_lookup.c | 453 daddr_t lbn; local 458 lbn = lblkno(imp, offset); 459 bsize = blksize(imp, ip, lbn); 462 if ((error = bread(vp, lbn, bsize, NOCRED, &bp)) != 0) {
|
H A D | cd9660_vnops.c | 302 daddr_t lbn, rablock; local 319 lbn = lblkno(imp, uio->uio_offset); 327 size = blksize(imp, ip, lbn); 328 rablock = lbn + 1; 332 lbn, size, NOCRED, uio->uio_resid, 335 error = bread(vp, lbn, size, NOCRED, &bp); 340 error = breadn(vp, lbn, size, &rablock, 343 error = bread(vp, lbn, size, NOCRED, &bp);
|
/freebsd-9.3-release/sbin/tunefs/ |
H A D | tunefs.c | 793 ufs_lbn_t lbn; local 817 lbn = lblkno(&sblock, dp1->di_size); 819 blk = dp1->di_db[lbn]; 820 size = sblksize(&sblock, (off_t)dp1->di_size, lbn); 822 lbn = lblkno(&sblock, dp2->di_size); 824 blk = dp2->di_db[lbn]; 825 size = sblksize(&sblock, (off_t)dp2->di_size, lbn); 837 dp1->di_db[lbn] = nblk; 838 dp1->di_size = lblktosize(&sblock, lbn+1); 841 dp2->di_db[lbn] [all...] |
/freebsd-9.3-release/sys/fs/hpfs/ |
H A D | hpfs_vnops.c | 285 daddr_t lbn, bn; local 295 lbn = uio->uio_offset >> DEV_BSHIFT; 297 dprintf(("hpfs_read: resid: 0x%x lbn: 0x%x off: 0x%x\n", 298 uio->uio_resid, lbn, off)); 299 error = hpfs_hpbmap(hp, lbn, &bn, &runl); 344 daddr_t lbn, bn; local 363 lbn = uio->uio_offset >> DEV_BSHIFT; 365 dprintf(("hpfs_write: resid: 0x%x lbn: 0x%x off: 0x%x\n", 366 uio->uio_resid, lbn, off)); 367 error = hpfs_hpbmap(hp, lbn, [all...] |
/freebsd-9.3-release/sys/gnu/fs/xfs/FreeBSD/ |
H A D | xfs_vnops.c | 385 xfs_fileoff_t lbn, nextlbn; local 409 lbn = XFS_B_TO_FSBT(mp, uio->uio_offset); 410 nextlbn = lbn + 1; 442 error = bread(vp, lbn, size, NOCRED, &bp); 451 error = cluster_read(vp, ip->i_d.di_size, lbn, 463 error = breadn(vp, lbn, 471 error = bread(vp, lbn, size, NOCRED, &bp); 577 daddr_t lbn; local 622 lbn = XFS_B_TO_FSBT(mp, offset); 637 bp = getblk(vp, lbn, fsblocksiz [all...] |