提交 afd34b05 创建 作者: Nickolai Zeldovich's avatar Nickolai Zeldovich

do not evict dirty blocks

上级 8bdfd0b1
......@@ -54,7 +54,7 @@ evict(void *vkey, void *bp)
{
struct buf *b = bp;
acquire(&b->lock);
if ((b->flags & (B_BUSY | B_VALID)) == 0)
if ((b->flags & (B_BUSY | B_DIRTY | B_VALID)) == 0)
return b;
release(&b->lock);
return 0;
......@@ -65,7 +65,7 @@ evict_valid(void *vkey, void *bp)
{
struct buf *b = bp;
acquire(&b->lock);
if ((b->flags & (B_BUSY)) == 0)
if ((b->flags & (B_BUSY | B_DIRTY)) == 0)
return b;
release(&b->lock);
return 0;
......
......@@ -178,7 +178,7 @@ ialloc(uint dev, short type)
return ip;
}
iunlockput(ip);
cprintf("ialloc oops %d\n", inum); // XXX harmless
//cprintf("ialloc oops %d\n", inum); // XXX harmless
}
}
panic("ialloc: no inodes");
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论