| /openbsd/src/usr.sbin/makefs/ffs/ |
| D | ffs_balloc.c | 71 daddr_t lbn, lastlbn; in ffs_balloc_ufs1() local 83 lbn = lblkno(fs, offset); in ffs_balloc_ufs1() 90 if (lbn < 0) in ffs_balloc_ufs1() 100 if (lastlbn < NDADDR && lastlbn < lbn) { in ffs_balloc_ufs1() 113 if (lbn < NDADDR) { in ffs_balloc_ufs1() 114 nb = ip->i_ffs1_db[lbn]; in ffs_balloc_ufs1() 115 if (nb != 0 && ip->i_ffs1_size >= lblktosize(fs, lbn + 1)) { in ffs_balloc_ufs1() 125 error = bread(ip->i_devvp, lbn, fs->fs_bsize, in ffs_balloc_ufs1() 151 error = bread(ip->i_devvp, lbn, osize, in ffs_balloc_ufs1() 170 if (ip->i_ffs1_size < lblktosize(fs, lbn + 1)) in ffs_balloc_ufs1() [all …]
|
| D | ffs_alloc.c | 85 ffs_alloc(struct inode *ip, daddr_t lbn __unused, daddr_t bpref, int size, in ffs_alloc() 143 ffs_blkpref_ufs1(struct inode *ip, daddr_t lbn, int indx, int32_t *bap) in ffs_blkpref_ufs1() argument 151 if (lbn < NDADDR + NINDIR(fs)) { in ffs_blkpref_ufs1() 161 ino_to_cg(fs, ip->i_number) + lbn / fs->fs_maxbpg; in ffs_blkpref_ufs1() 181 ffs_blkpref_ufs2(struct inode *ip, daddr_t lbn, int indx, int64_t *bap) in ffs_blkpref_ufs2() argument 189 if (lbn < NDADDR + NINDIR(fs)) { in ffs_blkpref_ufs2() 199 ino_to_cg(fs, ip->i_number) + lbn / fs->fs_maxbpg; in ffs_blkpref_ufs2()
|
| /openbsd/src/sys/ufs/ffs/ |
| D | ffs_balloc.c | 73 daddr_t lbn, nb, newb, pref; in ffs1_balloc() local 87 lbn = lblkno(fs, startoffset); in ffs1_balloc() 93 if (lbn < 0) in ffs1_balloc() 102 if (nb < NDADDR && nb < lbn) { in ffs1_balloc() 126 if (lbn < NDADDR) { in ffs1_balloc() 127 nb = ip->i_ffs1_db[lbn]; in ffs1_balloc() 128 if (nb != 0 && ip->i_ffs1_size >= lblktosize(fs, lbn + 1)) { in ffs1_balloc() 137 error = bread(vp, lbn, fs->fs_bsize, bpp); in ffs1_balloc() 158 error = bread(vp, lbn, fs->fs_bsize, in ffs1_balloc() 172 error = ffs_realloccg(ip, lbn, in ffs1_balloc() [all …]
|
| D | ffs_vnops.c | 189 daddr_t lbn, nextlbn; in ffs_read() local 219 lbn = lblkno(fs, uio->uio_offset); in ffs_read() 220 nextlbn = lbn + 1; in ffs_read() 230 error = bread(vp, lbn, size, &bp); in ffs_read() 231 else if (lbn - 1 == ip->i_ci.ci_lastr || in ffs_read() 233 error = bread_cluster(vp, lbn, size, &bp); in ffs_read() 235 error = bread(vp, lbn, size, &bp); in ffs_read() 239 ip->i_ci.ci_lastr = lbn; in ffs_read() 280 daddr_t lbn; in ffs_write() local 335 lbn = lblkno(fs, uio->uio_offset); in ffs_write() [all …]
|
| D | fs.h | 550 #define blksize(fs, ip, lbn) \ argument 551 (((lbn) >= NDADDR || DIP((ip), size) >= ((lbn) + 1) << (fs)->fs_bshift) \ 554 #define dblksize(fs, dip, lbn) \ argument 555 (((lbn) >= NDADDR || (dip)->di_size >= ((lbn) + 1) << (fs)->fs_bshift) \ 559 #define sblksize(fs, size, lbn) \ argument 560 (((lbn) >= NDADDR || (size) >= ((lbn) + 1) << (fs)->fs_bshift) \
|
| D | ffs_subr.c | 62 daddr_t lbn; in ffs_bufatoff() local 67 lbn = lblkno(fs, offset); in ffs_bufatoff() 68 bsize = blksize(fs, ip, lbn); in ffs_bufatoff() 71 if ((error = bread(vp, lbn, fs->fs_bsize, &bp)) != 0) { in ffs_bufatoff()
|
| D | ffs_inode.c | 131 daddr_t bn, lbn, lastiblock[NIADDR], indir_lbn[NIADDR]; in ffs_truncate() local 213 lbn = lblkno(fs, length); in ffs_truncate() 222 size = blksize(fs, oip, lbn); in ffs_truncate() 404 ffs_indirtrunc(struct inode *ip, daddr_t lbn, daddr_t dbn, in ffs_indirtrunc() argument 442 bp = getblk(vp, lbn, (int)fs->fs_bsize, 0, INFSLP); in ffs_indirtrunc() 493 for (i = NINDIR(fs) - 1, nlbn = lbn + 1 - i * factor; i > last; in ffs_indirtrunc()
|
| D | ffs_alloc.c | 99 ffs_alloc(struct inode *ip, daddr_t lbn, daddr_t bpref, int size, in ffs_alloc() argument 594 ffs1_blkpref(struct inode *ip, daddr_t lbn, int indx, int32_t *bap) in ffs1_blkpref() argument 626 if (indx == -1 && lbn < NDADDR + NINDIR(fs) && in ffs1_blkpref() 636 if (lbn == NDADDR) { in ffs1_blkpref() 660 if (lbn < NDADDR + NINDIR(fs)) in ffs1_blkpref() 667 startcg = inocg + lbn / fs->fs_maxbpg; in ffs1_blkpref() 695 ffs2_blkpref(struct inode *ip, daddr_t lbn, int indx, int64_t *bap) in ffs2_blkpref() argument 727 if (indx == -1 && lbn < NDADDR + NINDIR(fs) && in ffs2_blkpref() 737 if (lbn == NDADDR) { in ffs2_blkpref() 762 if (lbn < NDADDR + NINDIR(fs)) in ffs2_blkpref() [all …]
|
| /openbsd/src/sys/ufs/ext2fs/ |
| D | ext2fs_extents.c | 45 *path, daddr_t lbn) in ext4_ext_binsearch_index() argument 54 if (lbn < m->ei_blk) in ext4_ext_binsearch_index() 64 ext4_ext_binsearch(struct inode *ip, struct ext4_extent_path *path, daddr_t lbn) in ext4_ext_binsearch() argument 76 if (lbn < m->e_blk) in ext4_ext_binsearch() 89 ext4_ext_in_cache(struct inode *ip, daddr_t lbn, struct ext4_extent *ep) in ext4_ext_in_cache() argument 100 if (lbn >= ecp->ec_blk && lbn < ecp->ec_blk + ecp->ec_len) { in ext4_ext_in_cache() 130 daddr_t lbn, struct ext4_extent_path *path) in ext4_ext_find_extent() argument 147 ext4_ext_binsearch_index(ip, path, lbn); in ext4_ext_find_extent() 172 ext4_ext_binsearch(ip, path, lbn); in ext4_ext_find_extent()
|
| D | ext2fs_readwrite.c | 87 daddr_t lbn, nextlbn; in ext2_ind_read() local 110 lbn = lblkno(fs, uio->uio_offset); in ext2_ind_read() 111 nextlbn = lbn + 1; in ext2_ind_read() 121 error = bread(vp, lbn, size, &bp); in ext2_ind_read() 122 else if (lbn - 1 == ip->i_ci.ci_lastr) { in ext2_ind_read() 124 error = breadn(vp, lbn, size, &nextlbn, &nextsize, in ext2_ind_read() 127 error = bread(vp, lbn, size, &bp); in ext2_ind_read() 130 ip->i_ci.ci_lastr = lbn; in ext2_ind_read() 165 daddr_t lbn, pos; in ext4_ext_read() local 180 lbn = lblkno(fs, uio->uio_offset); in ext4_ext_read() [all …]
|
| D | ext2fs_balloc.c | 67 daddr_t lbn, pref; in ext2fs_buf_alloc() local 71 lbn = bn; in ext2fs_buf_alloc() 96 ip->i_e2fs_last_lblk = lbn; in ext2fs_buf_alloc() 125 pref = ext2fs_blkpref(ip, lbn, 0, NULL); in ext2fs_buf_alloc() 126 error = ext2fs_alloc(ip, lbn, pref, cred, &newb); in ext2fs_buf_alloc() 164 pref = ext2fs_blkpref(ip, lbn, 0, NULL); in ext2fs_buf_alloc() 165 error = ext2fs_alloc(ip, lbn, pref, cred, &newb); in ext2fs_buf_alloc() 201 pref = ext2fs_blkpref(ip, lbn, indirs[num].in_off, bap); in ext2fs_buf_alloc() 202 error = ext2fs_alloc(ip, lbn, pref, cred, &newb); in ext2fs_buf_alloc() 209 ip->i_e2fs_last_lblk = lbn; in ext2fs_buf_alloc() [all …]
|
| D | ext2fs_subr.c | 65 daddr_t lbn, pos; in ext2fs_bufatoff() local 70 lbn = lblkno(fs, offset); in ext2fs_bufatoff() 77 if (ext4_ext_find_extent(fs, ip, lbn, &path) == NULL || in ext2fs_bufatoff() 85 pos = lbn - ep->e_blk + (((daddr_t)ep->e_start_hi << 32) | ep->e_start_lo); in ext2fs_bufatoff() 102 if ((error = bread(vp, lbn, fs->e2fs_bsize, &bp)) != 0) { in ext2fs_bufatoff()
|
| D | ext2fs_inode.c | 211 int32_t bn, lbn, lastiblock[NIADDR], indir_lbn[NIADDR]; in ext2fs_truncate() local 257 lbn = lblkno(fs, length - 1); in ext2fs_truncate() 261 error = ext2fs_buf_alloc(oip, lbn, offset + 1, cred, &bp, in ext2fs_truncate() 286 lbn = lblkno(fs, length); in ext2fs_truncate() 290 error = ext2fs_buf_alloc(oip, lbn, offset, cred, &bp, in ext2fs_truncate() 422 ext2fs_indirtrunc(struct inode *ip, int32_t lbn, int32_t dbn, int32_t lastbn, int level, long *coun… in ext2fs_indirtrunc() argument 455 bp = getblk(vp, lbn, (int)fs->e2fs_bsize, 0, INFSLP); in ext2fs_indirtrunc() 489 nlbn = lbn + 1 - i * factor; i > last; in ext2fs_indirtrunc()
|
| D | ext2fs_alloc.c | 80 ext2fs_alloc(struct inode *ip, u_int32_t lbn, u_int32_t bpref, in ext2fs_alloc() argument 220 ext2fs_blkpref(struct inode *ip, u_int32_t lbn, int baps, u_int32_t *bap) in ext2fs_blkpref() argument 231 if ( ip->i_e2fs_last_blk && lbn == ip->i_e2fs_last_lblk + 1) { in ext2fs_blkpref()
|
| /openbsd/src/sys/nfs/ |
| D | nfs_bio.c | 74 daddr_t lbn, bn, rabn; in nfs_bioread() local 137 lbn = uio->uio_offset / biosize; in nfs_bioread() 139 bn = lbn * (biosize / DEV_BSIZE); in nfs_bioread() 147 (lbn + 1 + nra) * biosize < np->n_size; nra++) { in nfs_bioread() 148 rabn = (lbn + 1 + nra) * (biosize / DEV_BSIZE); in nfs_bioread() 254 daddr_t lbn, bn; in nfs_write() local 318 lbn = uio->uio_offset / biosize; in nfs_write() 321 bn = lbn * (biosize / DEV_BSIZE); in nfs_write()
|
| /openbsd/src/sys/isofs/cd9660/ |
| D | cd9660_lookup.c | 430 daddr_t lbn; in cd9660_bufatoff() local 435 lbn = lblkno(imp, offset); in cd9660_bufatoff() 436 bsize = blksize(imp, ip, lbn); in cd9660_bufatoff() 438 if ((error = bread(vp, lbn, bsize, &bp)) != 0) { in cd9660_bufatoff()
|
| D | cd9660_vnops.c | 224 daddr_t lbn, rablock; in cd9660_read() local 239 lbn = lblkno(imp, uio->uio_offset); in cd9660_read() 247 size = blksize(imp, ip, lbn); in cd9660_read() 248 rablock = lbn + 1; in cd9660_read() 250 if (ci->ci_lastr + 1 == lbn) { in cd9660_read() 264 error = breadn(vp, lbn, size, ra->blks, in cd9660_read() 268 error = bread(vp, lbn, size, &bp); in cd9660_read() 269 ci->ci_lastr = lbn; in cd9660_read()
|
| D | cd9660_vfsops.c | 736 int lbn, off; in cd9660_vget_internal() local 738 lbn = lblkno(imp, ino); in cd9660_vget_internal() 739 if (lbn >= imp->volume_space_size) { in cd9660_vget_internal() 741 printf("fhtovp: lbn exceed volume space %d\n", lbn); in cd9660_vget_internal() 755 lbn << (imp->im_bshift - DEV_BSHIFT), in cd9660_vget_internal()
|
| D | cd9660_extern.h | 81 #define blksize(imp, ip, lbn) ((imp)->logical_block_size) argument
|
| /openbsd/src/usr.sbin/makefs/msdos/ |
| D | msdosfs_vnops.c | 526 daddr_t lbn; in msdosfs_mkdire() local 561 lbn = de_bn2kb(pmp, bn); in msdosfs_mkdire() 563 bn, lbn)); in msdosfs_mkdire() 565 bp = getblk(pmp->pm_devvp, lbn, pmp->pm_bpcluster, 0, 0); in msdosfs_mkdire()
|
| D | msdosfs_fat.c | 856 u_long readcn, lbn = -1; in freeclusterchain() local 861 if (lbn != bn) { in freeclusterchain() 863 updatefats(pmp, bp, lbn); in freeclusterchain() 869 lbn = bn; in freeclusterchain()
|
| /openbsd/src/sys/msdosfs/ |
| D | msdosfs_fat.c | 818 uint32_t readcn, lbn = -1; in freeclusterchain() local 823 if (lbn != bn) { in freeclusterchain() 825 updatefats(pmp, bp, lbn); in freeclusterchain() 831 lbn = bn; in freeclusterchain()
|
| D | msdosfs_vnops.c | 1418 uint32_t cn, lbn; in msdosfs_readdir() local 1513 lbn = de_cluster(pmp, offset - bias); in msdosfs_readdir() 1520 if ((error = pcbmap(dep, lbn, &bn, &cn, &blsize)) != 0) in msdosfs_readdir()
|
| /openbsd/src/sbin/growfs/ |
| D | growfs.c | 2059 daddr_t len, lbn, numblks; in updrefs() local 2097 lbn = NDADDR; in updrefs() 2106 indirchk(blksperindir, lbn, iptr, numblks, bp, fsi, fso, Nflag); in updrefs() 2108 lbn += blksperindir; in updrefs() 2119 indirchk(daddr_t blksperindir, daddr_t lbn, daddr_t blkno, in indirchk() argument 2131 last = howmany(lastlbn - lbn, blksperindir) < NINDIR(&sblock) ? in indirchk() 2132 howmany(lastlbn - lbn, blksperindir) : NINDIR(&sblock); in indirchk() 2148 indirchk(blksperindir / NINDIR(&sblock), lbn + blksperindir * i, in indirchk()
|
| /openbsd/src/sys/arch/sparc64/stand/bootblk/ |
| D | bootblk.fth | 235 : ffs-dblksize ( lbn.lo lbn.hi inodep fs -- size ) 236 >r -rot 2dup ndaddr l>d d> ( inop d-lbn >ndaddr? ) 237 -rot 1 0 d+ ( inop >ndaddr? d-lbn+1 ) 238 r@ fs_bshift l@ d<< ( inop >ndaddr? d-lbn+1<<bshift ) 239 2swap >r di-size d@ ( d-lbn+1<<bshift d-size )
|