/minix/usr.sbin/makefs/ffs/ |
H A D | ffs_balloc.c | 86 daddr_t lbn, lastlbn; in ffs_balloc_ufs1() local 99 lbn = ffs_lblkno(fs, offset); in ffs_balloc_ufs1() 106 if (lbn < 0) in ffs_balloc_ufs1() 129 if (lbn < UFS_NDADDR) { in ffs_balloc_ufs1() 190 error = ffs_alloc(ip, lbn, in ffs_balloc_ufs1() 191 ffs_blkpref_ufs1(ip, lbn, (int)lbn, in ffs_balloc_ufs1() 337 daddr_t lbn, lastlbn; in ffs_balloc_ufs2() local 356 if (lbn < 0) in ffs_balloc_ufs2() 379 if (lbn < UFS_NDADDR) { in ffs_balloc_ufs2() 440 error = ffs_alloc(ip, lbn, in ffs_balloc_ufs2() [all …]
|
H A D | ffs_alloc.c | 101 ffs_alloc(struct inode *ip, daddr_t lbn __unused, daddr_t bpref, int size, in ffs_alloc() 159 ffs_blkpref_ufs1(struct inode *ip, daddr_t lbn, int indx, int32_t *bap) in ffs_blkpref_ufs1() argument 167 if (lbn < UFS_NDADDR + FFS_NINDIR(fs)) { in ffs_blkpref_ufs1() 177 ino_to_cg(fs, ip->i_number) + lbn / fs->fs_maxbpg; in ffs_blkpref_ufs1() 198 ffs_blkpref_ufs2(struct inode *ip, daddr_t lbn, int indx, int64_t *bap) in ffs_blkpref_ufs2() argument 206 if (lbn < UFS_NDADDR + FFS_NINDIR(fs)) { in ffs_blkpref_ufs2() 216 ino_to_cg(fs, ip->i_number) + lbn / fs->fs_maxbpg; in ffs_blkpref_ufs2()
|
/minix/sys/ufs/ffs/ |
H A D | ffs_balloc.c | 102 daddr_t lbn, lastlbn; in ffs_balloc_ufs1() local 126 if (lbn < 0) in ffs_balloc_ufs1() 217 ffs_blkpref_ufs1(ip, lbn, (int)lbn, flags, in ffs_balloc_ufs1() 236 ffs_blkpref_ufs1(ip, lbn, (int)lbn, flags, in ffs_balloc_ufs1() 517 daddr_t lbn, lastlbn; in ffs_balloc_ufs2() local 541 if (lbn < 0) in ffs_balloc_ufs2() 557 if (lastlbn < lbn) { in ffs_balloc_ufs2() 619 ffs_blkpref_ufs2(ip, lbn, (int)lbn, flags, in ffs_balloc_ufs2() 633 ffs_blkpref_ufs2(ip, lbn, (int)lbn, flags, in ffs_balloc_ufs2() 738 ffs_blkpref_ufs2(ip, lbn, (int)lbn, flags, in ffs_balloc_ufs2() [all …]
|
H A D | ffs_snapshot.c | 1040 daddr_t lbn, rlbn; 1129 lbn = -UFS_NDADDR; 1209 lbn -= blksperindir; 1244 daddr_t lbn; 1280 if (lbn < UFS_NDADDR) 1551 daddr_t lbn; in ffs_snapblkfree() local 1668 if (lbn >= UFS_NDADDR) in ffs_snapblkfree() 2069 daddr_t lbn, nextlbn; in ffs_snapshot_read() local 2086 nextlbn = lbn + 1; in ffs_snapshot_read() 2145 KASSERT(lbn >= 0); in snapblkaddr() [all …]
|
H A D | ffs_inode.c | 314 daddr_t lbn; in ffs_truncate() local 324 lbn = ffs_lblkno(fs, length); in ffs_truncate() 325 size = ffs_blksize(fs, oip, lbn); in ffs_truncate() 326 eoz = MIN(MAX(ffs_lblktosize(fs, lbn) + size, round_page(pgoffset)), in ffs_truncate() 544 ffs_indirtrunc(struct inode *ip, daddr_t lbn, daddr_t dbn, daddr_t lastbn, in ffs_indirtrunc() argument 590 error = ffs_getblk(vp, lbn, FFS_NOBLK, fs->fs_bsize, false, &bp); in ffs_indirtrunc() 597 trace(TR_BREADHIT, pack(vp, fs->fs_bsize), lbn); in ffs_indirtrunc() 599 trace(TR_BREADMISS, pack(vp, fs->fs_bsize), lbn); in ffs_indirtrunc() 639 for (i = FFS_NINDIR(fs) - 1, nlbn = lbn + 1 - i * factor; i > last; in ffs_indirtrunc()
|
H A D | fs.h | 708 #define ffs_blksize(fs, ip, lbn) \ argument 709 (((lbn) >= UFS_NDADDR || (ip)->i_size >= ffs_lblktosize(fs, (lbn) + 1)) \ 713 #define ffs_sblksize(fs, size, lbn) \ argument 714 (((lbn) >= UFS_NDADDR || (size) >= ((lbn) + 1) << (fs)->fs_bshift) \
|
/minix/sys/ufs/lfs/ |
H A D | lfs_balloc.c | 122 daddr_t lbn, lastblock; in lfs_balloc() local 130 lbn = lfs_lblkno(fs, startoffset); in lfs_balloc() 180 if (lbn < ULFS_NDADDR && lfs_lblkno(fs, ip->i_size) <= lbn) { in lfs_balloc() 181 osize = lfs_blksize(fs, ip, lbn); in lfs_balloc() 189 *bpp = bp = getblk(vp, lbn, nsize, 0, 0); in lfs_balloc() 202 if (bpp && (error = bread(vp, lbn, osize, in lfs_balloc() 298 *bpp = bp = getblk(vp, lbn, lfs_blksize(fs, ip, lbn), 0, 0); in lfs_balloc() 304 lfs_register_block(vp, lbn); in lfs_balloc() 474 return a->lbn - b->lbn; in lge() 507 lbp->lbn = lbn; in lfs_register_block() [all …]
|
H A D | ulfs_readwrite.c | 148 daddr_t lbn, nextlbn; in BUFRD() local 186 lbn = lfs_lblkno(fs, uio->uio_offset); in BUFRD() 187 nextlbn = lbn + 1; in BUFRD() 188 size = lfs_blksize(fs, ip, lbn); in BUFRD() 194 error = bread(vp, lbn, size, 0, &bp); in BUFRD() 197 error = breadn(vp, lbn, in BUFRD() 471 daddr_t lbn; in BUFWR() local 516 lbn = lfs_lblkno(fs, uio->uio_offset); in BUFWR() 542 size = lfs_blksize(fs, ip, lbn) - bp->b_resid; in BUFWR()
|
H A D | lfs_segment.c | 1552 if (lbn >= 0 && lbn < ULFS_NDADDR) 1590 if (lbn >= 0 && lbn < ULFS_NDADDR) 1604 daddr_t lbn; local 2504 daddr_t lbn; local 2507 lbn = bp->b_lblkno; 2508 return (lbn < 0 && (-lbn - ULFS_NDADDR) % LFS_NINDIR(fs) == 0); 2514 daddr_t lbn; local 2517 lbn = bp->b_lblkno; 2518 return (lbn < 0 && (-lbn - ULFS_NDADDR) % LFS_NINDIR(fs) == 1); 2524 daddr_t lbn; local [all …]
|
H A D | lfs_rfw.c | 167 update_meta(struct lfs *fs, ino_t ino, int vers, daddr_t lbn, in update_meta() argument 182 KASSERT(lbn >= 0); /* no indirect blocks */ in update_meta() 190 if ((error = lfs_balloc(vp, (lbn << lfs_sb_getbshift(fs)), size, in update_meta() 210 if (ip->i_size <= (lbn << lfs_sb_getbshift(fs))) { in update_meta() 213 if (lbn < ULFS_NDADDR) { in update_meta() 214 newsize = (lbn << lfs_sb_getbshift(fs)) + in update_meta() 217 newsize = (lbn << lfs_sb_getbshift(fs)) + 1; in update_meta() 231 lfs_update_single(fs, NULL, vp, lbn, ndaddr, size); in update_meta() 244 ulfs_bmaparray(vp, lbn, &odaddr, &a[0], &num, NULL, NULL); in update_meta() 251 PRId64 " to %" PRId64 "\n", ino, lbn, ndaddr)); in update_meta()
|
H A D | lfs_inode.c | 206 daddr_t bn, lbn, lastiblock[ULFS_NIADDR], indir_lbn[ULFS_NIADDR]; in lfs_truncate() local 355 lbn = lfs_lblkno(fs, length); in lfs_truncate() 369 size = lfs_blksize(fs, oip, lbn); in lfs_truncate() 722 lfs_indirtrunc(struct inode *ip, daddr_t lbn, daddr_t dbn, in lfs_indirtrunc() argument 760 bp = getblk(vp, lbn, lfs_sb_getbsize(fs), 0, 0); in lfs_indirtrunc() 763 trace(TR_BREADHIT, pack(vp, lfs_sb_getbsize(fs)), lbn); in lfs_indirtrunc() 765 trace(TR_BREADMISS, pack(vp, lfs_sb_getbsize(fs)), lbn); in lfs_indirtrunc() 804 for (i = LFS_NINDIR(fs) - 1, nlbn = lbn + 1 - i * factor; i > last; in lfs_indirtrunc() 874 off = round_page((voff_t)lbn << vp->v_mount->mnt_fs_bshift); in lfs_vtruncbuf() 888 if (bp->b_lblkno < lbn) in lfs_vtruncbuf() [all …]
|
H A D | lfs_inode.h | 241 # define LFS_ENTER_LOG(theop, thefile, theline, lbn, theflags, thepid) do {\ argument 250 lfs_log[lfs_lognum].block = (lbn); \
|
H A D | lfs_kernel.h | 94 daddr_t lbn; member
|
/minix/sys/ufs/ext2fs/ |
H A D | ext2fs_balloc.c | 100 daddr_t newb, lbn, pref; in ext2fs_balloc() local 117 lbn = bn; in ext2fs_balloc() 151 ip->i_e2fs_last_lblk = lbn; in ext2fs_balloc() 184 pref = ext2fs_blkpref(ip, lbn, 0, (int32_t *)0); in ext2fs_balloc() 185 error = ext2fs_alloc(ip, lbn, pref, cred, &newb); in ext2fs_balloc() 224 pref = ext2fs_blkpref(ip, lbn, 0, (int32_t *)0); in ext2fs_balloc() 225 error = ext2fs_alloc(ip, lbn, pref, cred, &newb); in ext2fs_balloc() 270 ip->i_e2fs_last_lblk = lbn; in ext2fs_balloc() 284 nbp = getblk(vp, lbn, fs->e2fs_bsize, 0, 0); in ext2fs_balloc() 295 error = bread(vp, lbn, (int)fs->e2fs_bsize, in ext2fs_balloc() [all …]
|
H A D | ext2fs_subr.c | 87 daddr_t lbn; in ext2fs_blkatoff() local 92 lbn = ext2_lblkno(fs, offset); in ext2fs_blkatoff() 95 if ((error = bread(vp, lbn, fs->e2fs_bsize, 0, &bp)) != 0) { in ext2fs_blkatoff()
|
H A D | ext2fs_readwrite.c | 159 daddr_t lbn, nextlbn; in ext2fs_bufrd() local 188 lbn = ext2_lblkno(fs, uio->uio_offset); in ext2fs_bufrd() 189 nextlbn = lbn + 1; in ext2fs_bufrd() 199 error = bread(vp, lbn, size, 0, &bp); in ext2fs_bufrd() 202 error = breadn(vp, lbn, in ext2fs_bufrd() 369 daddr_t lbn; in ext2fs_bufwr() local 396 lbn = ext2_lblkno(fs, uio->uio_offset); in ext2fs_bufwr() 403 error = ext2fs_balloc(ip, lbn, blkoffset + xfersize, cred, &bp, in ext2fs_bufwr()
|
H A D | ext2fs_inode.c | 501 ext2fs_indirtrunc(struct inode *ip, daddr_t lbn, daddr_t dbn, daddr_t lastbn, in ext2fs_indirtrunc() argument 536 bp = getblk(vp, lbn, (int)fs->e2fs_bsize, 0, 0); in ext2fs_indirtrunc() 539 trace(TR_BREADHIT, pack(vp, fs->e2fs_bsize), lbn); in ext2fs_indirtrunc() 541 trace(TR_BREADMISS, pack(vp, fs->e2fs_bsize), lbn); in ext2fs_indirtrunc() 573 nlbn = lbn + 1 - i * factor; i > last; in ext2fs_indirtrunc()
|
/minix/sys/fs/cd9660/ |
H A D | cd9660_lookup.c | 385 daddr_t lbn; in cd9660_blkatoff() local 390 lbn = cd9660_lblkno(imp, offset); in cd9660_blkatoff() 391 bsize = cd9660_blksize(imp, ip, lbn); in cd9660_blkatoff() 393 if ((error = VOP_BMAP(vp, lbn, &devvp, &lbn, NULL)) != 0) { in cd9660_blkatoff() 397 if ((error = bread(devvp, lbn, bsize, 0, &bp)) != 0) { in cd9660_blkatoff()
|
H A D | cd9660_extern.h | 91 #define cd9660_blksize(imp, ip, lbn) ((imp)->logical_block_size) argument
|
H A D | cd9660_vfsops.c | 703 int lbn, off; in cd9660_loadvnode() local 720 lbn = cd9660_lblkno(imp, ino); in cd9660_loadvnode() 721 if (lbn >= imp->volume_space_size) { in cd9660_loadvnode() 723 printf("fhtovp: lbn exceed volume space %d\n", lbn); in cd9660_loadvnode() 736 lbn << (imp->im_bshift - DEV_BSHIFT), in cd9660_loadvnode()
|
H A D | cd9660_vnops.c | 219 daddr_t lbn, rablock; in cd9660_read() local 252 lbn = cd9660_lblkno(imp, uio->uio_offset); in cd9660_read() 260 size = cd9660_blksize(imp, ip, lbn); in cd9660_read() 261 rablock = lbn + 1; in cd9660_read() 264 error = breadn(vp, lbn, size, &rablock, in cd9660_read() 267 error = bread(vp, lbn, size, 0, &bp); in cd9660_read()
|
/minix/sys/ufs/ufs/ |
H A D | ufs_readwrite.c | 160 daddr_t lbn, nextlbn; in BUFRD() local 196 lbn = ufs_lblkno(fs, uio->uio_offset); in BUFRD() 197 nextlbn = lbn + 1; in BUFRD() 198 size = ufs_blksize(fs, ip, lbn); in BUFRD() 204 error = bread(vp, lbn, size, 0, &bp); in BUFRD() 207 error = breadn(vp, lbn, in BUFRD() 523 daddr_t lbn; in BUFWR() local 571 lbn = ufs_lblkno(fs, uio->uio_offset); in BUFWR() 597 size = ufs_blksize(fs, ip, lbn) - bp->b_resid; in BUFWR()
|
/minix/usr.sbin/makefs/msdos/ |
H A D | msdosfs_vnops.c | 539 daddr_t lbn; in msdosfs_mkdire() local 574 lbn = de_bn2kb(pmp, bn); in msdosfs_mkdire() 576 bn, lbn)); in msdosfs_mkdire() 578 bp = getblk(pmp->pm_devvp, lbn, pmp->pm_bpcluster, 0, 0); in msdosfs_mkdire()
|
/minix/sys/fs/msdosfs/ |
H A D | msdosfs_vnops.c | 462 daddr_t lbn; in msdosfs_read() local 502 lbn = de_cluster(pmp, uio->uio_offset); in msdosfs_read() 515 error = pcbmap(dep, lbn, &lbn, 0, &blsize); in msdosfs_read() 524 error = bread(pmp->pm_devvp, de_bn2kb(pmp, lbn), blsize, in msdosfs_read() 1194 daddr_t lbn; in msdosfs_mkdir() local 1230 lbn = de_bn2kb(pmp, bn); in msdosfs_mkdir() 1232 bp = getblk(pmp->pm_devvp, lbn, pmp->pm_bpcluster, 0, 0); in msdosfs_mkdir() 1386 daddr_t bn, lbn; in msdosfs_readdir() local 1494 lbn = de_cluster(pmp, offset - bias); in msdosfs_readdir() 1501 if ((error = pcbmap(dep, lbn, &bn, &cn, &blsize)) != 0) in msdosfs_readdir()
|
/minix/sys/ufs/chfs/ |
H A D | chfs_vnops.c | 597 #define chfs_blksize(chmp, ip, lbn) \ argument 598 (((lbn) >= UFS_NDADDR || (ip)->size >= chfs_lblktosize(chmp, (lbn) + 1)) \ 622 daddr_t lbn, nextlbn; in chfs_read() local 689 lbn = chfs_lblkno(chmp, uio->uio_offset); in chfs_read() 690 nextlbn = lbn + 1; in chfs_read() 691 size = chfs_blksize(chmp, ip, lbn); in chfs_read() 697 error = bread(vp, lbn, size, 0, &bp); in chfs_read() 702 error = breadn(vp, lbn, in chfs_read()
|