Initialize the cleaner information in the Ifile from the same info from
the superblock at fs mount time, enabling the previous patch to fsck_lfs. Patch from Jesse Off <joff@gci-net.com> (Closes PR #11470).
This commit is contained in:
parent
53b6556eda
commit
b880487624
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: lfs_vfsops.c,v 1.58 2000/09/09 04:49:55 perseant Exp $ */
|
||||
/* $NetBSD: lfs_vfsops.c,v 1.59 2000/11/14 00:42:55 perseant Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
|
||||
@ -339,6 +339,7 @@ lfs_mountfs(devvp, mp, p)
|
||||
dev_t dev;
|
||||
int error, i, ronly, size;
|
||||
struct ucred *cred;
|
||||
CLEANERINFO *cip;
|
||||
SEGUSE *sup;
|
||||
|
||||
cred = p ? p->p_ucred : NOCRED;
|
||||
@ -476,13 +477,24 @@ lfs_mountfs(devvp, mp, p)
|
||||
VREF(vp);
|
||||
vput(vp);
|
||||
|
||||
/*
|
||||
* Initialize the ifile cleaner info with information from
|
||||
* the superblock.
|
||||
*/
|
||||
LFS_CLEANERINFO(cip, fs, bp);
|
||||
cip->clean = fs->lfs_nclean;
|
||||
cip->dirty = fs->lfs_nseg - fs->lfs_nclean;
|
||||
cip->avail = fs->lfs_avail;
|
||||
cip->bfree = fs->lfs_bfree;
|
||||
(void) VOP_BWRITE(bp); /* Ifile */
|
||||
|
||||
/*
|
||||
* Mark the current segment as ACTIVE, since we're going to
|
||||
* be writing to it.
|
||||
*/
|
||||
LFS_SEGENTRY(sup, fs, datosn(fs, fs->lfs_offset), bp);
|
||||
sup->su_flags |= SEGUSE_DIRTY | SEGUSE_ACTIVE;
|
||||
(void) VOP_BWRITE(bp);
|
||||
(void) VOP_BWRITE(bp); /* Ifile */
|
||||
|
||||
return (0);
|
||||
out:
|
||||
|
Loading…
Reference in New Issue
Block a user