Searched refs:lbn (Results 1 - 25 of 38) sorted by relevance

12

/freebsd-10.0-release/sys/fs/ext2fs/
H A Dext2_balloc.c60 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 Dext2_extents.c47 *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 Dext2_subr.c72 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 Dfs.h150 #define blksize(fs, ip, lbn) ((fs)->e2fs_fsize)
H A Dext2_inode.c116 int32_t bn, lbn, lastiblock[NIADDR], indir_lbn[NIADDR]; local
161 lbn = lblkno(fs, length - 1);
163 error = ext2_balloc(oip, lbn, offset + 1, cred, &bp, flags);
192 lbn = lblkno(fs, length);
194 error = ext2_balloc(oip, lbn, offset, cred, &bp, flags);
198 size = blksize(fs, oip, lbn);
359 ext2_indirtrunc(struct inode *ip, daddr_t lbn, daddr_t dbn, argument
391 bp = getblk(vp, lbn, (int)fs->e2fs_bsize, 0, 0, 0);
427 for (i = NINDIR(fs) - 1, nlbn = lbn + 1 - i * factor; i > last;
H A Dext2_bmap.c98 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 Dext2_vnops.c1638 daddr_t lbn, nextlbn; local
1674 lbn = lblkno(fs, uio->uio_offset);
1675 nextlbn = lbn + 1;
1676 size = blksize(fs, ip, lbn);
1686 error = bread(vp, lbn, size, NOCRED, &bp);
1688 error = cluster_read(vp, ip->i_size, lbn, size,
1693 error = breadn(vp, lbn,
1696 error = bread(vp, lbn, size, NOCRED, &bp);
1798 daddr_t lbn, newblk; local
1822 lbn
1897 daddr_t lbn; local
[all...]
/freebsd-10.0-release/usr.sbin/makefs/ffs/
H A Dffs_balloc.c80 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 Dffs_alloc.c91 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-10.0-release/sys/ufs/ffs/
H A Dffs_balloc.c95 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 Dffs_snapshot.c1000 ufs_lbn_t lbn, rlbn; local
1010 lbn = fragstoblks(fs, ino_to_fsba(fs, cancelip->i_number));
1012 if (lbn < NDADDR) {
1013 blkno = VTOI(snapvp)->i_din1->di_db[lbn];
1018 error = ffs_balloc_ufs1(snapvp, lblktosize(fs, (off_t)lbn),
1023 indiroff = (lbn - NDADDR) % NINDIR(fs);
1028 if ((error = bread(snapvp, lbn, fs->fs_bsize, KERNCRED, &bp)))
1031 error = ffs_balloc_ufs1(snapvp, lblktosize(fs, (off_t)lbn),
1035 if ((error = readblock(snapvp, bp, lbn)) != 0)
1063 lbn
1189 ufs_lbn_t lbn; local
1284 ufs_lbn_t lbn, rlbn; local
1473 ufs_lbn_t lbn; local
1750 ufs_lbn_t lbn; local
2130 ufs2_daddr_t lbn, *snapblklist; local
2244 ufs2_daddr_t lbn, blkno, *snapblklist; local
[all...]
H A Dfs.h97 * 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 Dffs_vnops.c220 ufs_lbn_t lbn; local
241 lbn = lblkno(ip->i_fs, (ip->i_size + ip->i_fs->fs_bsize - 1));
260 if (bp->b_lblkno > lbn)
426 ufs_lbn_t lbn, nextlbn; local
479 lbn = lblkno(fs, uio->uio_offset);
480 nextlbn = lbn + 1;
488 size = blksize(fs, ip, lbn);
512 error = bread_gb(vp, lbn, size, NOCRED,
522 error = cluster_read(vp, ip->i_size, lbn,
535 error = breadn_flags(vp, lbn, siz
649 ufs_lbn_t lbn; local
893 ufs_lbn_t lbn, nextlbn; local
1048 ufs_lbn_t lbn; local
1375 daddr_t lbn; local
[all...]
H A Dffs_subr.c77 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 Dffs_inode.c181 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-10.0-release/sbin/fsck_ffs/
H A Dsuj.c499 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
959 indir_visit(ino_t ino, ufs_lbn_t lbn, ufs2_daddr_t blk, uint64_t *frags, ino_visitor visitor, int flags) argument
1027 ufs_lbn_t lbn; local
1083 null_visit(ino_t ino, ufs_lbn_t lbn, ufs2_daddr_t blk, int frags) argument
1144 blk_free_visit(ino_t ino, ufs_lbn_t lbn, ufs2_daddr_t blk, int frags) argument
1156 blk_free_lbn(ufs2_daddr_t blk, ino_t ino, ufs_lbn_t lbn, int frags, int follow) argument
1234 ino_free_children(ino_t ino, ufs_lbn_t lbn, ufs2_daddr_t blk, int frags) argument
1442 indir_trunc(ino_t ino, ufs_lbn_t lbn, ufs2_daddr_t blk, ufs_lbn_t lastlbn) argument
1518 ufs_lbn_t lbn; local
2527 suj_add_block(ino_t ino, ufs_lbn_t lbn, ufs2_daddr_t blk, int frags) argument
2636 suj_find(ino_t ino, ufs_lbn_t lbn, ufs2_daddr_t blk, int frags) argument
[all...]
/freebsd-10.0-release/sys/boot/common/
H A Dufsread.c183 ufs_lbn_t lbn; local
252 lbn = lblkno(&fs, fs_off);
254 if (lbn < NDADDR) {
255 addr2 = DIP(di_db[lbn]);
256 } else if (lbn < NDADDR + NINDIR(&fs)) {
259 u = (u_int)(lbn - NDADDR) / n * DBPERVBLK;
266 n = (lbn - NDADDR) & (n - 1);
287 n = sblksize(&fs, size, lbn) - (off & ~VBLKMASK);
/freebsd-10.0-release/sys/kern/
H A Dvfs_cluster.c67 daddr_t lbn, daddr_t blkno, long size, int run, int gbflags,
310 cluster_rbuild(struct vnode *vp, u_quad_t filesize, daddr_t lbn, argument
327 while ((u_quad_t) size * (lbn + run) > filesize) {
335 tbp = getblk(vp, lbn, size, 0, 0, gbflags);
367 bp->b_lblkno = lbn;
395 tbp = getblk(vp, lbn + i, size, 0, 0, GB_LOCK_NOWAIT |
630 daddr_t lbn; local
645 lbn = bp->b_lblkno;
649 if (lbn == 0)
652 if (vp->v_clen == 0 || lbn !
1037 daddr_t lbn; local
[all...]
/freebsd-10.0-release/sys/fs/fuse/
H A Dfuse_io.c178 daddr_t lbn; local
201 lbn = uio->uio_offset / biosize;
204 FS_DEBUG2G("biosize %d, lbn %d, on %d\n", biosize, (int)lbn, on);
217 if ((off_t)lbn * biosize >= filesize) {
219 } else if ((off_t)(lbn + 1) * biosize > filesize) {
220 bcount = filesize - (off_t)lbn *biosize;
222 bp = getblk(vp, lbn, bcount, PCATCH, 0, 0);
376 daddr_t lbn; local
407 lbn
[all...]
/freebsd-10.0-release/sys/fs/nfsclient/
H A Dnfs_clbio.c434 daddr_t lbn, rabn; local
486 lbn = uio->uio_offset / biosize;
487 on = uio->uio_offset - (lbn * biosize);
494 (off_t)(lbn + 1 + nra) * biosize < nsize; nra++) {
495 rabn = lbn + 1 + nra;
522 if ((off_t)lbn * biosize >= nsize) {
524 } else if ((off_t)(lbn + 1) * biosize > nsize) {
525 bcount = nsize - (off_t)lbn * biosize;
527 bp = nfs_getcacheblk(vp, lbn, bcount, td);
587 lbn
876 daddr_t lbn; local
1862 daddr_t lbn; local
[all...]
/freebsd-10.0-release/sys/nfsclient/
H A Dnfs_bio.c430 daddr_t lbn, rabn; local
477 lbn = uio->uio_offset / biosize;
478 on = uio->uio_offset - (lbn * biosize);
485 (off_t)(lbn + 1 + nra) * biosize < nsize; nra++) {
486 rabn = lbn + 1 + nra;
513 if ((off_t)lbn * biosize >= nsize) {
515 } else if ((off_t)(lbn + 1) * biosize > nsize) {
516 bcount = nsize - (off_t)lbn * biosize;
518 bp = nfs_getcacheblk(vp, lbn, bcount, td);
578 lbn
867 daddr_t lbn; local
1782 daddr_t lbn; local
[all...]
/freebsd-10.0-release/sys/fs/cd9660/
H A Dcd9660_lookup.c453 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 Dcd9660_vnops.c301 daddr_t lbn, rablock; local
318 lbn = lblkno(imp, uio->uio_offset);
326 size = blksize(imp, ip, lbn);
327 rablock = lbn + 1;
331 lbn, size, NOCRED, uio->uio_resid,
334 error = bread(vp, lbn, size, NOCRED, &bp);
339 error = breadn(vp, lbn, size, &rablock,
342 error = bread(vp, lbn, size, NOCRED, &bp);
/freebsd-10.0-release/sbin/tunefs/
H A Dtunefs.c792 ufs_lbn_t lbn; local
816 lbn = lblkno(&sblock, dp1->di_size);
818 blk = dp1->di_db[lbn];
819 size = sblksize(&sblock, (off_t)dp1->di_size, lbn);
821 lbn = lblkno(&sblock, dp2->di_size);
823 blk = dp2->di_db[lbn];
824 size = sblksize(&sblock, (off_t)dp2->di_size, lbn);
836 dp1->di_db[lbn] = nblk;
837 dp1->di_size = lblktosize(&sblock, lbn+1);
840 dp2->di_db[lbn]
[all...]
/freebsd-10.0-release/sys/fs/nandfs/
H A Dbmap.c304 nandfs_lbn_t i, lbn, nlbn, factor, tosub; local
316 lbn = ap->in_lbn;
318 error = nandfs_bread_meta(node, lbn, NOCRED, 0, &bp);
333 for (nlbn = lbn + 1 - i * factor; i >= 0 && *left > 0; i--,
382 error = nandfs_bread_meta(node, lbn, NOCRED, 0, &bp);

Completed in 308 milliseconds

12