2021-10-21から1日間の記事一覧
トップページ jupiteroak.hatenablog.com log.c https://github.com/mit-pdos/xv6-public/blob/master/log.c#L85 static void read_head(void) { struct buf *buf = bread(log.dev, log.start); struct logheader *lh = (struct logheader *) (buf->data); i…
トップページ jupiteroak.hatenablog.com log.c https://github.com/mit-pdos/xv6-public/blob/master/log.c#L101 static void write_head(void) { struct buf *buf = bread(log.dev, log.start); struct logheader *hb = (struct logheader *) (buf->data);…
トップページ jupiteroak.hatenablog.com log.c https://github.com/mit-pdos/xv6-public/blob/master/log.c#L177 static void write_log(void) { int tail; for (tail = 0; tail < log.lh.n; tail++) { struct buf *to = bread(log.dev, log.start+tail+1);…
トップページ jupiteroak.hatenablog.com log.c https://github.com/mit-pdos/xv6-public/blob/master/log.c#L69 static void install_trans(void) { int tail; for (tail = 0; tail < log.lh.n; tail++) { struct buf *lbuf = bread(log.dev, log.start+tai…
トップページ jupiteroak.hatenablog.com log.c https://github.com/mit-pdos/xv6-public/blob/master/log.c#L213 void log_write(struct buf *b) { int i; if (log.lh.n >= LOGSIZE || log.lh.n >= log.size - 1) panic("too big a transaction"); if (log.…
トップページ jupiteroak.hatenablog.com log.c https://github.com/mit-pdos/xv6-public/blob/master/log.c#L192 static void commit() { if (log.lh.n > 0) { write_log(); // Write modified blocks from cache to log write_head(); // Write header to …
トップページ jupiteroak.hatenablog.com log.c https://github.com/mit-pdos/xv6-public/blob/master/log.c#L145 void end_op(void) { int do_commit = 0; acquire(&log.lock); log.outstanding -= 1; if(log.committing) panic("log.committing"); if(log.…
トップページ jupiteroak.hatenablog.com log.c https://github.com/mit-pdos/xv6-public/blob/master/log.c#L125 void begin_op(void) { acquire(&log.lock); while(1){ if(log.committing){ sleep(&log, &log.lock); } else if(log.lh.n + (log.outstandin…
トップページ jupiteroak.hatenablog.com log.c https://github.com/mit-pdos/xv6-public/blob/master/log.c#L115 static void recover_from_log(void) { read_head(); install_trans(); // if committed, copy from log to disk log.lh.n = 0; write_head()…
トップページ jupiteroak.hatenablog.com log.c https://github.com/mit-pdos/xv6-public/blob/master/log.c#L53 void initlog(int dev) { if (sizeof(struct logheader) >= BSIZE) panic("initlog: too big logheader"); struct superblock sb; initlock(&l…