/freebsd/sbin/fsck_ffs/ |
H A D | fsck.h | 154 ufs2_daddr_t b_bno; /* disk block number */ 165 ufs2_daddr_t *b_indir2; /* UFS2 indirect block */ 233 (bp)->b_bno = (ufs2_daddr_t)-4; \ 257 ufs2_daddr_t id_blkno; /* current block number being examined */ 262 ufs2_daddr_t id_entryno;/* for DATA nodes, current entry number */ 296 ufs2_daddr_t dup; 313 ufs2_daddr_t i_blks[1]; /* actually longer */ 365 extern ufs2_daddr_t maxfsblock; /* number of blocks in the file system */ 367 extern ufs2_daddr_t n_blks; /* number of blocks in use */ 461 ufs2_daddr_t allocblk(long cg, long frags, ufs2_daddr_t (*checkblkavail) [all …]
|
H A D | inode.c | 51 static ufs2_daddr_t indir_blkatoff(ufs2_daddr_t, ino_t, ufs_lbn_t, ufs_lbn_t, 54 static void chkcopyonwrite(struct fs *, ufs2_daddr_t, 55 ufs2_daddr_t (*checkblkavail)(ufs2_daddr_t, long)); 64 ufs2_daddr_t ndb; in ckinode() 257 ufs2_daddr_t 319 static ufs2_daddr_t 320 indir_blkatoff(ufs2_daddr_t blk, ino_t ino, ufs_lbn_t cur, ufs_lbn_t lbn, in indir_blkatoff() 376 chkrange(ufs2_daddr_t blk, int cnt) in chkrange() 431 ufs2_daddr_t iblk; in ginode() 521 ufs2_daddr_t ndb, blk; in getnextinode() [all …]
|
H A D | suj.c | 91 ufs2_daddr_t sb_blk; 128 typedef void (*ino_visitor)(ino_t, ufs_lbn_t, ufs2_daddr_t, int); 134 static int blk_isfree(ufs2_daddr_t); 238 blk_lookup(ufs2_daddr_t blk, int creat) in blk_lookup() 263 blk_overlaps(struct jblkrec *brec, ufs2_daddr_t start, int frags) in blk_overlaps() 265 ufs2_daddr_t bstart; in blk_overlaps() 266 ufs2_daddr_t bend; in blk_overlaps() 267 ufs2_daddr_t end; in blk_overlaps() 278 blk_equals(struct jblkrec *brec, ino_t ino, ufs_lbn_t lbn, ufs2_daddr_t start, in blk_equals() 309 blk_freemask(ufs2_daddr_t blk, ino_t ino, ufs_lbn_t lbn, int frags) in blk_freemask() [all …]
|
H A D | pass5.c | 45 static void check_maps(u_char *, u_char *, int, ufs2_daddr_t, const char *, 47 static void clear_blocks(ufs2_daddr_t start, ufs2_daddr_t end); 55 ufs2_daddr_t d, dbase, dmax, start; in pass5() 479 oldcg->cg_cgx * (ufs2_daddr_t)fs->fs_ipg, "DIR", freedirs, in update_maps() 482 oldcg->cg_cgx * (ufs2_daddr_t)fs->fs_ipg, "FILE", freefiles, in update_maps() 486 oldcg->cg_cgx * (ufs2_daddr_t)fs->fs_fpg, "FRAG", in update_maps() 495 ufs2_daddr_t startvalue, /* resource value for first element in map */ in check_maps() 505 ufs2_daddr_t n, astart, aend, ustart, uend; in check_maps() 630 clear_blocks(ufs2_daddr_t start, ufs2_daddr_t end) in clear_blocks()
|
H A D | fsutil.c | 302 getdatablk(ufs2_daddr_t blkno, long size, int type) in getdatablk() 395 getblk(struct bufarea *bp, ufs2_daddr_t blk, long size) in getblk() 397 ufs2_daddr_t dblk; in getblk() 518 snapflush(ufs2_daddr_t (*checkblkavail)(ufs2_daddr_t, long)) in snapflush() argument 593 rwerror(const char *mesg, ufs2_daddr_t blk) in rwerror() 861 blread(int fd, char *buf, ufs2_daddr_t blk, long size) in blread() 911 blwrite(int fd, char *buf, ufs2_daddr_t blk, ssize_t size) in blwrite() 936 blerase(int fd, ufs2_daddr_t blk, long size) in blerase() 954 blzero(int fd, ufs2_daddr_t blk, long size) in blzero() 1122 ufs2_daddr_t [all …]
|
H A D | pass1.c | 47 static ufs2_daddr_t badblk; 48 static ufs2_daddr_t dupblk; 61 ufs2_daddr_t i, cgd; in pass1() 251 ufs2_daddr_t ndb; in checkinode() 270 UFS_NDADDR * sizeof(ufs2_daddr_t)) || in checkinode() 272 UFS_NIADDR * sizeof(ufs2_daddr_t)) || in checkinode() 335 sizeof(ufs2_daddr_t)); in checkinode() 520 ufs2_daddr_t blkno = idesc->id_blkno; in pass1check()
|
/freebsd/sys/ufs/ffs/ |
H A D | ffs_extern.h | 55 int ffs_alloc(struct inode *, ufs2_daddr_t, ufs2_daddr_t, int, int, 56 struct ucred *, ufs2_daddr_t *); 62 ufs2_daddr_t, long, ino_t, __enum_uint8(vtype), struct workhead *, 64 ufs2_daddr_t ffs_blkpref_ufs1(struct inode *, ufs_lbn_t, int, ufs1_daddr_t *); 65 ufs2_daddr_t ffs_blkpref_ufs2(struct inode *, ufs_lbn_t, int, ufs2_daddr_t *); 90 int ffs_realloccg(struct inode *, ufs2_daddr_t, ufs2_daddr_t, 91 ufs2_daddr_t, int, int, int, struct ucred *, struct buf **); 99 int ffs_snapblkfree(struct fs *, struct vnode *, ufs2_daddr_t, long, ino_t, 183 void softdep_setup_blkmapdep(struct buf *, struct mount *, ufs2_daddr_t, 185 void softdep_setup_allocdirect(struct inode *, ufs_lbn_t, ufs2_daddr_t, [all …]
|
H A D | ffs_inode.c | 68 static int ffs_indirtrunc(struct inode *, ufs2_daddr_t, ufs2_daddr_t, 69 ufs2_daddr_t, int, ufs2_daddr_t *); 237 ufs2_daddr_t bn, lbn, lastblock, lastiblock[UFS_NIADDR]; in ffs_truncate() 238 ufs2_daddr_t indir_lbn[UFS_NIADDR], oldblks[UFS_NDADDR + UFS_NIADDR]; in ffs_truncate() 240 ufs2_daddr_t newblks[UFS_NDADDR + UFS_NIADDR]; in ffs_truncate() 242 ufs2_daddr_t count, blocksreleased = 0, blkno; in ffs_truncate() 399 blkno = ((ufs2_daddr_t *)(bp->b_data))[indiroff]; in ffs_truncate() 698 ufs2_daddr_t lbn, in ffs_indirtrunc() 699 ufs2_daddr_t dbn, in ffs_indirtrunc() 700 ufs2_daddr_t lastbn, in ffs_indirtrunc() [all …]
|
H A D | ffs_snapshot.c | 87 ufs2_daddr_t bno, in ffs_snapblkfree() 149 int (*)(struct vnode *, ufs2_daddr_t *, ufs2_daddr_t *, struct fs *, 152 ufs2_daddr_t, ufs_lbn_t, ufs_lbn_t, ufs_lbn_t, ufs_lbn_t, struct fs *, 153 int (*)(struct vnode *, ufs2_daddr_t *, ufs2_daddr_t *, struct fs *, 155 static int fullacct_ufs2(struct vnode *, ufs2_daddr_t *, ufs2_daddr_t *, 157 static int snapacct_ufs2(struct vnode *, ufs2_daddr_t *, ufs2_daddr_t *, 1312 expunge_ufs2(struct vnode * snapvp,struct inode * cancelip,struct fs * fs,int (* acctfunc)(struct vnode *,ufs2_daddr_t *,ufs2_daddr_t *,struct fs *,ufs_lbn_t,int),int expungetype,int clearmode) expunge_ufs2() argument 1415 indiracct_ufs2(struct vnode * snapvp,struct vnode * cancelvp,int level,ufs2_daddr_t blkno,ufs_lbn_t lbn,ufs_lbn_t rlbn,ufs_lbn_t remblks,ufs_lbn_t blksperindir,struct fs * fs,int (* acctfunc)(struct vnode *,ufs2_daddr_t *,ufs2_daddr_t *,struct fs *,ufs_lbn_t,int),int expungetype) indiracct_ufs2() argument [all...] |
H A D | ffs_alloc.c | 102 typedef ufs2_daddr_t allocfcn_t(struct inode *ip, uint64_t cg, 103 ufs2_daddr_t bpref, int size, int rsize); 105 static ufs2_daddr_t ffs_alloccg(struct inode *, uint64_t, ufs2_daddr_t, int, 107 static ufs2_daddr_t 108 ffs_alloccgblk(struct inode *, struct buf *, ufs2_daddr_t, int); 110 struct vnode *, ufs2_daddr_t, long, ino_t, 113 static int ffs_checkfreeblk(struct inode *, ufs2_daddr_t, long); 116 static ufs2_daddr_t ffs_clusteralloc(struct inode *, uint64_t, ufs2_daddr_t, 119 static ufs2_daddr_t ffs_fragextend(struct inode *, uint64_t, ufs2_daddr_t, 121 static ufs2_daddr_t ffs_hashalloc(struct inode *, uint64_t, ufs2_daddr_t, [all …]
|
H A D | softdep.h | 434 ufs2_daddr_t nb_newblkno; /* New value of block pointer. */ 470 ufs2_daddr_t ad_oldblkno; /* old value of block pointer */ 529 ufs2_daddr_t ai_oldblkno; /* old value of block pointer */ 559 ufs2_daddr_t ff_blkno; /* fragment physical block number */ 588 ufs2_daddr_t fb_chkcnt; /* Blocks released. */ 614 ufs2_daddr_t fw_blkno; /* Our block #. */ 882 ufs2_daddr_t jn_blkno; /* Blkno allocated */ 908 ufs2_daddr_t jf_blkno; /* Blkno being freed. */ 924 ufs2_daddr_t fr_blkno; /* Blkno being freed. */ 1024 ufs2_daddr_t je_daddr; /* Disk block address. */
|
H A D | fs.h | 240 #define BLK_NOCOPY ((ufs2_daddr_t)(1)) 241 #define BLK_SNAP ((ufs2_daddr_t)(2)) 421 ufs2_daddr_t fs_csaddr; /* blk addr of cyl grp summary area */ 652 #define cgbase(fs, c) (((ufs2_daddr_t)(fs)->fs_fpg) * (c)) 671 ((ufs2_daddr_t)(cgimin(fs, ino_to_cg(fs, (ino_t)(x))) + \ 869 ufs2_daddr_t jb_blkno;
|
/freebsd/lib/libufs/ |
H A D | block.c | 52 bread(struct uufsd *disk, ufs2_daddr_t blockno, void *data, size_t size) in bread() 90 bwrite(struct uufsd *disk, ufs2_daddr_t blockno, const void *data, size_t size) in bwrite() 127 berase_helper(struct uufsd *disk, ufs2_daddr_t blockno, ufs2_daddr_t size) in berase_helper() 139 berase_helper(struct uufsd *disk, ufs2_daddr_t blockno, ufs2_daddr_t size) in berase_helper() 172 berase(struct uufsd *disk, ufs2_daddr_t blockno, ufs2_daddr_t size) in berase()
|
H A D | libufs.h | 66 ufs2_daddr_t d_sblock; /* superblock location */ 144 ssize_t bread(struct uufsd *, ufs2_daddr_t, void *, size_t); 145 ssize_t bwrite(struct uufsd *, ufs2_daddr_t, const void *, size_t); 146 int berase(struct uufsd *, ufs2_daddr_t, ufs2_daddr_t); 151 ufs2_daddr_t cgballoc(struct uufsd *); 152 int cgbfree(struct uufsd *, ufs2_daddr_t, long);
|
/freebsd/tools/diag/prtblknos/ |
H A D | prtblknos.c | 48 static const char *distance(struct fs *, ufs2_daddr_t, ufs2_daddr_t); 49 static void printblk(struct fs *, ufs_lbn_t, ufs2_daddr_t, int, ufs_lbn_t); 50 static void indirprt(struct fs *, int, ufs_lbn_t, ufs_lbn_t, ufs2_daddr_t, 58 ufs2_daddr_t blkno; in prtblknos() 154 ufs2_daddr_t blkno, ufs_lbn_t lastlbn) 187 blkno = ((ufs2_daddr_t *)indir)[i]; 196 blkno = ((ufs2_daddr_t *)indir)[i]; 203 distance(struct fs *fs, ufs2_daddr_t lastblk, ufs2_daddr_t firstblk) 205 ufs2_daddr_t delta; 228 printblk(struct fs *fs, ufs_lbn_t lbn, ufs2_daddr_t blkno, int numfrags, [all …]
|
/freebsd/sys/ufs/ufs/ |
H A D | ufs_bmap.c | 60 static int readindir(struct vnode *, ufs_lbn_t, ufs2_daddr_t, struct buf **); 78 ufs2_daddr_t blkno; in ufs_bmap() 99 ufs2_daddr_t daddr, in readindir() 156 ufs2_daddr_t bn, in ufs_bmaparray() 157 ufs2_daddr_t *bnp, in ufs_bmaparray() 167 ufs2_daddr_t daddr; in ufs_bmaparray() 225 ufs2_daddr_t bnb = bn; in ufs_bmaparray() 267 daddr = ((ufs2_daddr_t *)bp->b_data)[ap->in_off]; in ufs_bmaparray() 296 ((ufs2_daddr_t *)bp->b_data)[bn - 1], in ufs_bmaparray() 297 ((ufs2_daddr_t *)bp->b_data)[bn]); in ufs_bmaparray() [all …]
|
H A D | dinode.h | 90 typedef int64_t ufs2_daddr_t; typedef 144 ufs2_daddr_t di_extb[UFS_NXADDR];/* 96: External attributes block. */ 147 ufs2_daddr_t di_db /* 112: Direct disk blocks. */ 149 ufs2_daddr_t di_ib /* 208: Indirect disk blocks. */ 153 [(UFS_NDADDR + UFS_NIADDR) * sizeof(ufs2_daddr_t)];
|
H A D | ufs_extern.h | 56 int ufs_bmaparray(struct vnode *, ufs2_daddr_t, ufs2_daddr_t *, 73 int ufs_getlbns(struct vnode *, ufs2_daddr_t, struct indir *, int *);
|
/freebsd/sbin/ffsinfo/ |
H A D | ffsinfo.c | 493 ufs2_daddr_t *ind2ptr, *ind3ptr; in dump_whole_ufs2_inode() 537 rb -= howmany(sblock.fs_bsize, sizeof(ufs2_daddr_t)); in dump_whole_ufs2_inode() 552 howmany(rb, howmany(sblock.fs_bsize, sizeof(ufs2_daddr_t)))); in dump_whole_ufs2_inode() 554 sizeof(ufs2_daddr_t))) && (rb>0)); ind2ctr++) { in dump_whole_ufs2_inode() 555 ind2ptr = &((ufs2_daddr_t *)(void *)&i2blk)[ind2ctr]; in dump_whole_ufs2_inode() 565 rb -= howmany(sblock.fs_bsize, sizeof(ufs2_daddr_t)); in dump_whole_ufs2_inode() 583 SQUARE(howmany(sblock.fs_bsize, sizeof(ufs2_daddr_t))))); in dump_whole_ufs2_inode() 586 sizeof(ufs2_daddr_t))) && (rb > 0)); ind3ctr++) { in dump_whole_ufs2_inode() 587 ind3ptr = &((ufs2_daddr_t *)(void *)&i3blk)[ind3ctr]; in dump_whole_ufs2_inode() 600 howmany(sblock.fs_bsize, sizeof(ufs2_daddr_t)))); in dump_whole_ufs2_inode() [all …]
|
/freebsd/stand/libsa/ |
H A D | ufsread.c | 55 #define cgbase(fs, c) ((ufs2_daddr_t)((fs)->fs_fpg * (c))) 181 ufs2_daddr_t addr2, vbaddr; in fsread_size() 182 static ufs2_daddr_t blkmap, indmap; in fsread_size() 279 memcpy(&addr2, (ufs2_daddr_t *)indbuf + n, in fsread_size() 280 sizeof(ufs2_daddr_t)); in fsread_size() 287 memcpy(&addr2, (ufs2_daddr_t *)indbuf + n, in fsread_size() 288 sizeof(ufs2_daddr_t)); in fsread_size()
|
H A D | ufs.c | 124 ufs2_daddr_t f_blkno[UFS_NIADDR];/* disk address of block in buffer */ 125 ufs2_daddr_t f_buf_blkno; /* block number of data block */ 144 static int block_map(struct open_file *, ufs2_daddr_t, ufs2_daddr_t *); 216 block_map(struct open_file *f, ufs2_daddr_t file_block, in block_map() 217 ufs2_daddr_t *disk_block_p) in block_map() 223 ufs2_daddr_t ind_block_num; in block_map() 307 ind_block_num = ((ufs2_daddr_t *)fp->f_blk[level])[idx]; in block_map() 325 ufs2_daddr_t disk_block; in buf_write_file() 400 ufs2_daddr_t disk_block; in buf_read_file() 551 ufs2_daddr_t mult; in ufs_open() [all …]
|
/freebsd/sbin/dump/ |
H A D | traverse.c | 71 static int dirindir(ino_t ino, ufs2_daddr_t blkno, int level, long *size, 73 static void dmpindir(union dinode *dp, ino_t ino, ufs2_daddr_t blk, int level, 76 static void ufs2_blksout(union dinode *dp, ufs2_daddr_t *blkp, int frags, 80 static int searchdir(ino_t ino, ufs2_daddr_t blkno, long size, long filesize, 324 ufs2_daddr_t blkno, in dirindir() 333 ufs2_daddr_t ufs2[MAXBSIZE / sizeof(ufs2_daddr_t)]; in dirindir() 376 ufs2_daddr_t blkno, in searchdir() 573 dmpindir(union dinode *dp, ino_t ino, ufs2_daddr_t blk, int ind_level, in dmpindir() 578 ufs2_daddr_t ufs2[MAXBSIZE / sizeof(ufs2_daddr_t)]; in dmpindir() 653 ufs2_blksout(union dinode *dp, ufs2_daddr_t *blkp, int frags, ino_t ino, in ufs2_blksout() [all …]
|
/freebsd/sbin/newfs/ |
H A D | newfs.h | 66 #define MAXBLKPG(bsize) ((bsize) / sizeof(ufs2_daddr_t)) 123 extern ufs2_daddr_t part_ofs; /* partition offset in blocks */
|
/freebsd/sbin/tunefs/ |
H A D | tunefs.c | 565 static ufs2_daddr_t 568 ufs2_daddr_t blk; in journal_balloc() 623 dir_search(ufs2_daddr_t blk, int bytes) in dir_search() 712 dir_insert(ufs2_daddr_t blk, off_t off, ino_t ino) in dir_insert() 741 dir_extend(ufs2_daddr_t blk, ufs2_daddr_t nblk, off_t size, ino_t ino) in dir_extend() 768 ufs2_daddr_t nblk; in journal_insertfile() 769 ufs2_daddr_t blk; in journal_insertfile() 838 indir_fill(ufs2_daddr_t blk, int level, int *resid) in indir_fill() 842 ufs2_daddr_t *bap2; in indir_fill() 843 ufs2_daddr_t nblk; in indir_fill() [all …]
|
/freebsd/sbin/fsdb/ |
H A D | fsdb.h | 33 extern int blread(int fd, char *buf, ufs2_daddr_t blk, long size); 34 extern void rwerror(const char *mesg, ufs2_daddr_t blk);
|