b                  38 kernel/bio.c     struct buf *b;
b                  45 kernel/bio.c     for (b = bcache.buf; b < bcache.buf + NBUF; b++) {
b                  46 kernel/bio.c       b->next = bcache.head.next;
b                  47 kernel/bio.c       b->prev = &bcache.head;
b                  48 kernel/bio.c       initsleeplock(&b->lock, "buffer");
b                  49 kernel/bio.c       bcache.head.next->prev = b;
b                  50 kernel/bio.c       bcache.head.next = b;
b                  60 kernel/bio.c     struct buf *b;
b                  65 kernel/bio.c     for (b = bcache.head.next; b != &bcache.head; b = b->next) {
b                  66 kernel/bio.c       if (b->dev == dev && b->blockno == blockno) {
b                  67 kernel/bio.c         b->refcnt++;
b                  69 kernel/bio.c         acquiresleep(&b->lock);
b                  70 kernel/bio.c         return b;
b                  76 kernel/bio.c     for (b = bcache.head.prev; b != &bcache.head; b = b->prev) {
b                  77 kernel/bio.c       if (b->refcnt == 0) {
b                  78 kernel/bio.c         b->dev = dev;
b                  79 kernel/bio.c         b->blockno = blockno;
b                  80 kernel/bio.c         b->valid = 0;
b                  81 kernel/bio.c         b->refcnt = 1;
b                  83 kernel/bio.c         acquiresleep(&b->lock);
b                  84 kernel/bio.c         return b;
b                  94 kernel/bio.c     struct buf *b;
b                  96 kernel/bio.c     b = bget(dev, blockno);
b                  97 kernel/bio.c     if (!b->valid) {
b                  98 kernel/bio.c       virtio_disk_rw(b, 0);
b                  99 kernel/bio.c       b->valid = 1;
b                 101 kernel/bio.c     return b;
b                 107 kernel/bio.c   bwrite(struct buf *b)
b                 109 kernel/bio.c     if (!holdingsleep(&b->lock))
b                 111 kernel/bio.c     virtio_disk_rw(b, 1);
b                 117 kernel/bio.c   brelse(struct buf *b)
b                 119 kernel/bio.c     if (!holdingsleep(&b->lock))
b                 122 kernel/bio.c     releasesleep(&b->lock);
b                 125 kernel/bio.c     b->refcnt--;
b                 126 kernel/bio.c     if (b->refcnt == 0) {
b                 128 kernel/bio.c       b->next->prev = b->prev;
b                 129 kernel/bio.c       b->prev->next = b->next;
b                 130 kernel/bio.c       b->next = bcache.head.next;
b                 131 kernel/bio.c       b->prev = &bcache.head;
b                 132 kernel/bio.c       bcache.head.next->prev = b;
b                 133 kernel/bio.c       bcache.head.next = b;
b                 140 kernel/bio.c   bpin(struct buf *b)
b                 143 kernel/bio.c     b->refcnt++;
b                 148 kernel/bio.c   bunpin(struct buf *b)
b                 151 kernel/bio.c     b->refcnt--;
b                  24 kernel/fs.c    #define min(a, b) ((a) < (b) ? (a) : (b))
b                  70 kernel/fs.c      int b, bi, m;
b                  74 kernel/fs.c      for (b = 0; b < sb.size; b += BPB) {
b                  75 kernel/fs.c        bp = bread(dev, BBLOCK(b, sb));
b                  76 kernel/fs.c        for (bi = 0; bi < BPB && b + bi < sb.size; bi++) {
b                  82 kernel/fs.c            bzero(dev, b + bi);
b                  83 kernel/fs.c            return b + bi;
b                  94 kernel/fs.c    bfree(int dev, uint b)
b                  99 kernel/fs.c      bp = bread(dev, BBLOCK(b, sb));
b                 100 kernel/fs.c      bi = b % BPB;
b                  51 kernel/fs.h    #define BBLOCK(b, sb) ((b) / BPB + sb.bmapstart)
b                 224 kernel/log.c   log_write(struct buf *b)
b                 235 kernel/log.c       if (log.lh.block[i] == b->blockno) // log absorption
b                 238 kernel/log.c     log.lh.block[i] = b->blockno;
b                 240 kernel/log.c       bpin(b);
b                  49 kernel/virtio_disk.c     struct buf *b;
b                 216 kernel/virtio_disk.c virtio_disk_rw(struct buf *b, int write)
b                 218 kernel/virtio_disk.c   uint64 sector = b->blockno * (BSIZE / 512);
b                 255 kernel/virtio_disk.c   disk.desc[idx[1]].addr = (uint64)b->data;
b                 271 kernel/virtio_disk.c   b->disk = 1;
b                 272 kernel/virtio_disk.c   disk.info[idx[0]].b = b;
b                 287 kernel/virtio_disk.c   while (b->disk == 1) {
b                 288 kernel/virtio_disk.c     sleep_prepare(b);
b                 294 kernel/virtio_disk.c   disk.info[idx[0]].b = 0;
b                 325 kernel/virtio_disk.c     struct buf *b = disk.info[id].b;
b                 326 kernel/virtio_disk.c     b->disk = 0; // disk is done with buf
b                 327 kernel/virtio_disk.c     wakeup(b);
b                  15 mkfs/mkfs.c    #define static_assert(a, b)                                                    \
b                 256 mkfs/mkfs.c    #define min(a, b) ((a) < (b) ? (a) : (b))
b                 144 user/usertests.c   char b[MAXPATH + 1];
b                 147 user/usertests.c     b[i] = 'x';
b                 148 user/usertests.c   b[MAXPATH] = '\0';
b                 150 user/usertests.c   int ret = unlink(b);
b                 152 user/usertests.c     printf("unlink(%s) returned %d, not -1\n", b, ret);
b                 156 user/usertests.c   int fd = open(b, O_CREATE | O_WRONLY);
b                 158 user/usertests.c     printf("open(%s) returned %d, not -1\n", b, fd);
b                 162 user/usertests.c   ret = link(b, b);
b                 164 user/usertests.c     printf("link(%s, %s) returned %d, not -1\n", b, b, ret);
b                 169 user/usertests.c   ret = exec(b, args);
b                 171 user/usertests.c     printf("exec(%s) returned %d, not -1\n", b, fd);
b                 217 user/usertests.c   char *b = (char *)(top - 1);
b                 218 user/usertests.c   *b = 'x';
b                 220 user/usertests.c   int ret = unlink(b);
b                 222 user/usertests.c     printf("unlink(%s) returned %d, not -1\n", b, ret);
b                 226 user/usertests.c   int fd = open(b, O_CREATE | O_WRONLY);
b                 228 user/usertests.c     printf("open(%s) returned %d, not -1\n", b, fd);
b                 232 user/usertests.c   ret = link(b, b);
b                 234 user/usertests.c     printf("link(%s, %s) returned %d, not -1\n", b, b, ret);
b                 239 user/usertests.c   ret = exec(b, args);
b                 241 user/usertests.c     printf("exec(%s) returned %d, not -1\n", b, fd);
b                2035 user/usertests.c   char *c, *a, *b;
b                2050 user/usertests.c     for (b = a; b < a + TOOMUCH; b += PGSIZE) {
b                2051 user/usertests.c       *b = 99;
b                2069 user/usertests.c     b = sbrk(1);
b                2070 user/usertests.c     if (b != a) {
b                2071 user/usertests.c       printf("%s: sbrk test failed %d %p %p\n", s, i, a, b);
b                2074 user/usertests.c     *b = 1;
b                2075 user/usertests.c     a = b + 1;
b                2883 user/usertests.c   char b;
b                2884 user/usertests.c   cc = read(fd, &b, 1);
b                2892 user/usertests.c   if (b != 'X') {
b                2893 user/usertests.c     printf("%s: read returned %c, expected X\n", s, b);
b                2917 user/usertests.c   cc = read(fd, &b, 1);
b                2925 user/usertests.c   if (b != 'X') {
b                2926 user/usertests.c     printf("%s: read returned %c, expected X\n", s, b);