mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-11 17:04:19 +01:00
Remove -DDIAGNOSTIC in makefile. The DIAGNOSTIC code is severly broken and
will change if I have more time to look at it. Keep at least 5 segments cleaned if possible (instead of 2 which is a bare minimum for FS operation).
This commit is contained in:
parent
7c49ab48fa
commit
b77430dcb0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=5395
@ -1,7 +1,7 @@
|
||||
# @(#)Makefile 8.1 (Berkeley) 6/5/93
|
||||
|
||||
PROG= lfs_cleanerd
|
||||
CFLAGS+=-I/sys/ufs/lfs -I${.CURDIR} -DDIAGNOSTIC
|
||||
CFLAGS+=-I/sys/ufs/lfs -I${.CURDIR} ${DEBUG}
|
||||
MAN8= lfs_cleanerd.8
|
||||
SRCS= cleanerd.c lfs_cksum.c library.c misc.c print.c
|
||||
|
||||
|
@ -63,7 +63,7 @@
|
||||
#define BUSY_LIM 0.50
|
||||
#define IDLE_LIM 0.90
|
||||
|
||||
#define MIN_SEGS(lfsp) (3)
|
||||
#define MIN_SEGS(lfsp) (5)
|
||||
#define NUM_TO_CLEAN(fsp) (1)
|
||||
|
||||
#define MAXLOADS 3
|
||||
|
@ -256,15 +256,17 @@ clean_loop(fsp)
|
||||
perror("getloadavg: failed\n");
|
||||
return (-1);
|
||||
}
|
||||
if (loadavg[ONE_MIN] == 0.0 && loadavg[FIVE_MIN] &&
|
||||
if (loadavg[ONE_MIN] == 0.2 && loadavg[FIVE_MIN] &&
|
||||
fsp->fi_cip->clean < max_free_segs * IDLE_LIM) {
|
||||
clean_fs(fsp, cost_benefit);
|
||||
printf("Cleaner Running at %s (system idle)\n",
|
||||
printf("Cleaner running (system idle) at %s",
|
||||
ctime(&now));
|
||||
return (1);
|
||||
}
|
||||
}
|
||||
printf("Cleaner Not Running at %s\n", ctime(&now));
|
||||
#ifdef VERBOSE
|
||||
printf("Cleaner not running at %s", ctime(&now));
|
||||
#endif
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
@ -89,7 +89,7 @@ fs_getmntinfo(buf, name, type)
|
||||
/* check to see if it's the one we want */
|
||||
if (((*buf)->f_type != type) ||
|
||||
strncmp(name, (*buf)->f_mntonname, MNAMELEN)) {
|
||||
/* "this is not the filesystem you're looking for */
|
||||
/* "this is not the filesystem you're looking for" */
|
||||
free(*buf);
|
||||
return 0;
|
||||
}
|
||||
@ -300,7 +300,7 @@ lfs_segmapv(fsp, seg, seg_buf, blocks, bcount)
|
||||
timestamp = ((SEGSUM*)s)->ss_create;
|
||||
|
||||
#ifdef DIAGNOSTIC
|
||||
/* Verfiy size of summary block */
|
||||
/* Verify size of summary block */
|
||||
sumsize = sizeof(SEGSUM) +
|
||||
(sp->ss_ninos + INOPB(lfsp) - 1) / INOPB(lfsp);
|
||||
for (fip = (FINFO *)(sp + 1); i < sp->ss_nfinfo; ++i) {
|
||||
|
Loading…
Reference in New Issue
Block a user