Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/lfs Initialize the cleaner information in the Ifile ...
details: https://anonhg.NetBSD.org/src/rev/3a4ac68561df
branches: trunk
changeset: 499177:3a4ac68561df
user: perseant <perseant%NetBSD.org@localhost>
date: Tue Nov 14 00:42:55 2000 +0000
description:
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@localhost> (Closes PR #11470).
diffstat:
sys/ufs/lfs/lfs_vfsops.c | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diffs (42 lines):
diff -r d81afdc514a5 -r 3a4ac68561df sys/ufs/lfs/lfs_vfsops.c
--- a/sys/ufs/lfs/lfs_vfsops.c Tue Nov 14 00:10:16 2000 +0000
+++ b/sys/ufs/lfs/lfs_vfsops.c Tue Nov 14 00:42:55 2000 +0000
@@ -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 @@
dev_t dev;
int error, i, ronly, size;
struct ucred *cred;
+ CLEANERINFO *cip;
SEGUSE *sup;
cred = p ? p->p_ucred : NOCRED;
@@ -477,12 +478,23 @@
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:
Home |
Main Index |
Thread Index |
Old Index