sb 27 kernel/fs.c struct superblock sb; sb 31 kernel/fs.c readsb(int dev, struct superblock *sb) sb 36 kernel/fs.c memmove(sb, bp->data, sizeof(*sb)); sb 43 kernel/fs.c readsb(dev, &sb); sb 44 kernel/fs.c if(sb.magic != FSMAGIC) sb 46 kernel/fs.c initlog(dev, &sb); sb 72 kernel/fs.c for(b = 0; b < sb.size; b += BPB){ sb 73 kernel/fs.c bp = bread(dev, BBLOCK(b, sb)); sb 74 kernel/fs.c for(bi = 0; bi < BPB && b + bi < sb.size; bi++){ sb 97 kernel/fs.c bp = bread(dev, BBLOCK(b, sb)); sb 205 kernel/fs.c for(inum = 1; inum < sb.ninodes; inum++){ sb 206 kernel/fs.c bp = bread(dev, IBLOCK(inum, sb)); sb 231 kernel/fs.c bp = bread(ip->dev, IBLOCK(ip->inum, sb)); sb 304 kernel/fs.c bp = bread(ip->dev, IBLOCK(ip->inum, sb)); sb 45 kernel/fs.h #define IBLOCK(i, sb) ((i) / IPB + sb.inodestart) sb 51 kernel/fs.h #define BBLOCK(b, sb) ((b)/BPB + sb.bmapstart) sb 55 kernel/log.c initlog(int dev, struct superblock *sb) sb 61 kernel/log.c log.start = sb->logstart; sb 62 kernel/log.c log.size = sb->nlog; sb 30 mkfs/mkfs.c struct superblock sb; sb 96 mkfs/mkfs.c sb.magic = FSMAGIC; sb 97 mkfs/mkfs.c sb.size = xint(FSSIZE); sb 98 mkfs/mkfs.c sb.nblocks = xint(nblocks); sb 99 mkfs/mkfs.c sb.ninodes = xint(NINODES); sb 100 mkfs/mkfs.c sb.nlog = xint(nlog); sb 101 mkfs/mkfs.c sb.logstart = xint(2); sb 102 mkfs/mkfs.c sb.inodestart = xint(2+nlog); sb 103 mkfs/mkfs.c sb.bmapstart = xint(2+nlog+ninodeblocks); sb 114 mkfs/mkfs.c memmove(buf, &sb, sizeof(sb)); sb 193 mkfs/mkfs.c bn = IBLOCK(inum, sb); sb 207 mkfs/mkfs.c bn = IBLOCK(inum, sb); sb 248 mkfs/mkfs.c printf("balloc: write bitmap block at sector %d\n", sb.bmapstart); sb 249 mkfs/mkfs.c wsect(sb.bmapstart, buf);