Do make backups before you test this!
}
}
}
- bp->bf_time = ++bufclock; /* Time stamp it */
return bp;
}
}
bp->bf_dirty = false;
}
+ /* Time stamp the buffer on free up. It doesn't matter if we stamp it
+ on read or free as while locked it can't go away. However if we
+ stamp it on free we can in future make smarter decisions such as
+ recycling full dirty buffers faster than partial ones */
+ bp->bf_time = ++bufclock;
bunlock(bp);
return ret;
}
goto corrupt;
--dev->s_tfree;
+ /*
+ * FIXME: When we implement the rest of the bigger block size fs support
+ * this routine is responsible for zeroing the entire extent not just the
+ * 512 byte block
+ */
/* Zero out the new block */
buf = bread(devno, newno, 2);
if (buf == NULL)
} else
#endif
{
- /* FIXME: for big file system support we need
- to zero the rest of the logical extent here
- and then allocate and write the one we want */
/* we transfer through the buffer pool */
if (pblk == NULLBLK)
bp = zerobuf();
- else if (bp == NULL) {
+ else if (bp == NULL)
bp = bread(dev, pblk, 0);
- if (bp == NULL)
- break;
- } else {
- /* FIXME: this has to get sorted ASAP */
- bp->bf_time = ++bufclock;
- }
+ if (bp == NULL)
+ break;
uputblk(bp, uoff(), amount);
-
brelse(bp);
}
/* Bletch */