sb 37 defs.h void readsb(int dev, struct superblock *sb); sb 25 fs.c struct superblock sb; // there should be one per dev, but we run with one dev sb 29 fs.c readsb(int dev, struct superblock *sb) sb 34 fs.c memmove(sb, bp->data, sizeof(*sb)); sb 60 fs.c for(b = 0; b < sb.size; b += BPB){ sb 61 fs.c bp = bread(dev, BBLOCK(b, sb)); sb 62 fs.c for(bi = 0; bi < BPB && b + bi < sb.size; bi++){ sb 84 fs.c readsb(dev, &sb); sb 85 fs.c bp = bread(dev, BBLOCK(b, sb)); sb 166 fs.c readsb(dev, &sb); sb 167 fs.c cprintf("sb: size %d nblocks %d ninodes %d nlog %d logstart %d inodestart %d bmap start %d\n", sb.size, sb 168 fs.c sb.nblocks, sb.ninodes, sb.nlog, sb.logstart, sb.inodestart, sb.bmapstart); sb 183 fs.c for(inum = 1; inum < sb.ninodes; inum++){ sb 184 fs.c bp = bread(dev, IBLOCK(inum, sb)); sb 205 fs.c bp = bread(ip->dev, IBLOCK(ip->inum, sb)); sb 282 fs.c bp = bread(ip->dev, IBLOCK(ip->inum, sb)); sb 41 fs.h #define IBLOCK(i, sb) ((i) / IPB + sb.inodestart) sb 47 fs.h #define BBLOCK(b, sb) (b/BPB + sb.bmapstart) sb 207 lapic.c int sb, bcd; sb 209 lapic.c sb = cmos_read(CMOS_STATB); sb 211 lapic.c bcd = (sb & (1 << 2)) == 0; sb 58 log.c struct superblock sb; sb 60 log.c readsb(dev, &sb); sb 61 log.c log.start = sb.logstart; sb 62 log.c log.size = sb.nlog; sb 30 mkfs.c struct superblock sb; sb 97 mkfs.c sb.size = xint(FSSIZE); sb 98 mkfs.c sb.nblocks = xint(nblocks); sb 99 mkfs.c sb.ninodes = xint(NINODES); sb 100 mkfs.c sb.nlog = xint(nlog); sb 101 mkfs.c sb.logstart = xint(2); sb 102 mkfs.c sb.inodestart = xint(2+nlog); sb 103 mkfs.c sb.bmapstart = xint(2+nlog+ninodeblocks); sb 114 mkfs.c memmove(buf, &sb, sizeof(sb)); sb 190 mkfs.c bn = IBLOCK(inum, sb); sb 204 mkfs.c bn = IBLOCK(inum, sb); sb 249 mkfs.c printf("balloc: write bitmap block at sector %d\n", sb.bmapstart); sb 250 mkfs.c wsect(sb.bmapstart, buf);