mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-27 16:39:08 +00:00
Minor bug fixes uncovered while working on UFS2.
They should have no effect on existing systems.
This commit is contained in:
parent
b20b5a8b09
commit
088f357d12
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=95897
@ -195,7 +195,6 @@ getdatablk(ufs_daddr_t blkno, long size)
|
||||
getblk(bp, blkno, size);
|
||||
/* fall through */
|
||||
foundit:
|
||||
totalreads++;
|
||||
bp->b_prev->b_next = bp->b_next;
|
||||
bp->b_next->b_prev = bp->b_prev;
|
||||
bp->b_prev = &bufhead;
|
||||
@ -211,6 +210,7 @@ getblk(struct bufarea *bp, ufs_daddr_t blk, long size)
|
||||
{
|
||||
ufs_daddr_t dblk;
|
||||
|
||||
totalreads++;
|
||||
dblk = fsbtodb(&sblock, blk);
|
||||
if (bp->b_bno != dblk) {
|
||||
flush(fswritefd, bp);
|
||||
|
@ -186,7 +186,7 @@ pass5(void)
|
||||
dmax = fs->fs_size;
|
||||
newcg->cg_time = cg->cg_time;
|
||||
newcg->cg_cgx = c;
|
||||
if (c == fs->fs_ncg - 1)
|
||||
if (c == fs->fs_ncg - 1 && fs->fs_ncyl % fs->fs_cpg > 0)
|
||||
newcg->cg_ncyl = fs->fs_ncyl % fs->fs_cpg;
|
||||
else
|
||||
newcg->cg_ncyl = fs->fs_cpg;
|
||||
|
Loading…
Reference in New Issue
Block a user