summaryrefslogtreecommitdiff
path: root/libexec/lfs_cleanerd
diff options
context:
space:
mode:
authorperseant <perseant@NetBSD.org>1999-08-25 00:14:13 +0000
committerperseant <perseant@NetBSD.org>1999-08-25 00:14:13 +0000
commit193a2fa9f096544b8a89b19c82e83054ebc8f855 (patch)
tree351675902707cb81a247ea412fa5dc247fb079d0 /libexec/lfs_cleanerd
parent2e649e46d36e3b42f2adc7865432cd39b74bcf18 (diff)
Remove partial-segment timestamp optimization from lfs_segmapv. If "time"
is not monotonically increasing (e.g. clock is slaved to another system) the optimization will result in segments being treated as corrupt (uncleanable). If enough such "bad" segments were created, the cleaner would clean continuously, and after some time the system would panic with "no clean segments". (Legitimately old partial-segments are relatively rare, and will have their blocks culled by lfs_bmapv.)
Diffstat (limited to 'libexec/lfs_cleanerd')
-rw-r--r--libexec/lfs_cleanerd/library.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/libexec/lfs_cleanerd/library.c b/libexec/lfs_cleanerd/library.c
index 75baae97484..e9bf10a8ab9 100644
--- a/libexec/lfs_cleanerd/library.c
+++ b/libexec/lfs_cleanerd/library.c
@@ -1,4 +1,4 @@
-/* $NetBSD: library.c,v 1.12 1999/03/14 11:43:25 drochner Exp $ */
+/* $NetBSD: library.c,v 1.13 1999/08/25 00:14:13 perseant Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)library.c 8.3 (Berkeley) 5/24/95";
#else
-__RCSID("$NetBSD: library.c,v 1.12 1999/03/14 11:43:25 drochner Exp $");
+__RCSID("$NetBSD: library.c,v 1.13 1999/08/25 00:14:13 perseant Exp $");
#endif
#endif /* not lint */
@@ -342,7 +342,6 @@ lfs_segmapv(fsp, seg, seg_buf, blocks, bcount)
caddr_t s;
daddr_t pseg_addr, seg_addr;
int nelem, nblocks, nsegs, sumsize, i, ssize;
- time_t timestamp;
i = 0;
lfsp = &fsp->fi_lfs;
@@ -360,7 +359,7 @@ lfs_segmapv(fsp, seg, seg_buf, blocks, bcount)
*bcount = 0;
- for (nsegs = 0, timestamp = 0; nsegs < sup->su_nsums; nsegs++) {
+ for (nsegs = 0; nsegs < sup->su_nsums; nsegs++) {
sp = (SEGSUM *)s;
nblocks = pseg_valid(fsp, sp, pseg_addr);
@@ -372,11 +371,6 @@ lfs_segmapv(fsp, seg, seg_buf, blocks, bcount)
/* break; */
}
- /* Check if we have hit old data */
- if (timestamp > sp->ss_create)
- break;
- timestamp = sp->ss_create;
-
#ifdef DIAGNOSTIC
/* Verify size of summary block */
sumsize = sizeof(SEGSUM) +