log 49 kernel/log.c struct log log; log 60 kernel/log.c initlock(&log.lock, "log"); log 61 kernel/log.c log.start = sb->logstart; log 62 kernel/log.c log.dev = dev; log 72 kernel/log.c for (tail = 0; tail < log.lh.n; tail++) { log 74 kernel/log.c printk("recovering tail %d dst %d\n", tail, log.lh.block[tail]); log 76 kernel/log.c struct buf *lbuf = bread(log.dev, log.start + tail + 1); // read log block log 77 kernel/log.c struct buf *dbuf = bread(log.dev, log.lh.block[tail]); // read dst log 91 kernel/log.c struct buf *buf = bread(log.dev, log.start); log 94 kernel/log.c log.lh.n = lh->n; log 95 kernel/log.c for (i = 0; i < log.lh.n; i++) { log 96 kernel/log.c log.lh.block[i] = lh->block[i]; log 107 kernel/log.c struct buf *buf = bread(log.dev, log.start); log 110 kernel/log.c hb->n = log.lh.n; log 111 kernel/log.c for (i = 0; i < log.lh.n; i++) { log 112 kernel/log.c hb->block[i] = log.lh.block[i]; log 123 kernel/log.c log.lh.n = 0; log 131 kernel/log.c acquire(&log.lock); log 133 kernel/log.c if (log.committing) { log 134 kernel/log.c sleep_prepare(&log); log 135 kernel/log.c release(&log.lock); log 137 kernel/log.c acquire(&log.lock); log 138 kernel/log.c } else if (log.lh.n + (log.outstanding + 1) * MAXOPBLOCKS > LOGBLOCKS) { log 140 kernel/log.c sleep_prepare(&log); log 141 kernel/log.c release(&log.lock); log 143 kernel/log.c acquire(&log.lock); log 145 kernel/log.c log.outstanding += 1; log 146 kernel/log.c release(&log.lock); log 159 kernel/log.c acquire(&log.lock); log 160 kernel/log.c log.outstanding -= 1; log 161 kernel/log.c if (log.committing) log 163 kernel/log.c if (log.outstanding == 0) { log 165 kernel/log.c log.committing = 1; log 170 kernel/log.c wakeup(&log); log 172 kernel/log.c release(&log.lock); log 178 kernel/log.c acquire(&log.lock); log 179 kernel/log.c log.committing = 0; log 180 kernel/log.c log.ncommit += 1; log 181 kernel/log.c wakeup(&log); log 182 kernel/log.c release(&log.lock); log 192 kernel/log.c for (tail = 0; tail < log.lh.n; tail++) { log 193 kernel/log.c struct buf *to = bread(log.dev, log.start + tail + 1); // log block log 194 kernel/log.c struct buf *from = bread(log.dev, log.lh.block[tail]); // cache block log 205 kernel/log.c if (log.lh.n > 0) { log 209 kernel/log.c log.lh.n = 0; log 228 kernel/log.c acquire(&log.lock); log 229 kernel/log.c if (log.lh.n >= LOGBLOCKS) log 231 kernel/log.c if (log.outstanding < 1) log 234 kernel/log.c for (i = 0; i < log.lh.n; i++) { log 235 kernel/log.c if (log.lh.block[i] == b->blockno) // log absorption log 238 kernel/log.c log.lh.block[i] = b->blockno; log 239 kernel/log.c if (i == log.lh.n) { // Add new block to log? log 241 kernel/log.c log.lh.n++; log 243 kernel/log.c release(&log.lock); log 249 kernel/log.c acquire(&log.lock); log 250 kernel/log.c if (log.committing || log.outstanding > 0) { log 251 kernel/log.c int n = log.ncommit + 1; log 252 kernel/log.c while (log.ncommit < n) { log 253 kernel/log.c sleep_prepare(&log); log 254 kernel/log.c release(&log.lock); log 256 kernel/log.c acquire(&log.lock); log 259 kernel/log.c release(&log.lock);