head	1.7;
access;
symbols
	netbsd-11-0-RC4:1.7
	netbsd-11-0-RC3:1.7
	netbsd-11-0-RC2:1.7
	netbsd-11-0-RC1:1.7
	perseant-exfatfs-base-20250801:1.7
	netbsd-11:1.7.0.96
	netbsd-11-base:1.7
	netbsd-10-1-RELEASE:1.7
	perseant-exfatfs-base-20240630:1.7
	perseant-exfatfs:1.7.0.94
	perseant-exfatfs-base:1.7
	netbsd-8-3-RELEASE:1.7
	netbsd-9-4-RELEASE:1.7
	netbsd-10-0-RELEASE:1.7
	netbsd-10-0-RC6:1.7
	netbsd-10-0-RC5:1.7
	netbsd-10-0-RC4:1.7
	netbsd-10-0-RC3:1.7
	netbsd-10-0-RC2:1.7
	netbsd-10-0-RC1:1.7
	netbsd-10:1.7.0.92
	netbsd-10-base:1.7
	netbsd-9-3-RELEASE:1.7
	cjep_sun2x-base1:1.7
	cjep_sun2x:1.7.0.90
	cjep_sun2x-base:1.7
	cjep_staticlib_x-base1:1.7
	netbsd-9-2-RELEASE:1.7
	cjep_staticlib_x:1.7.0.88
	cjep_staticlib_x-base:1.7
	netbsd-9-1-RELEASE:1.7
	phil-wifi-20200421:1.7
	phil-wifi-20200411:1.7
	is-mlppp:1.7.0.86
	is-mlppp-base:1.7
	phil-wifi-20200406:1.7
	netbsd-8-2-RELEASE:1.7
	netbsd-9-0-RELEASE:1.7
	netbsd-9-0-RC2:1.7
	netbsd-9-0-RC1:1.7
	phil-wifi-20191119:1.7
	netbsd-9:1.7.0.84
	netbsd-9-base:1.7
	phil-wifi-20190609:1.7
	netbsd-8-1-RELEASE:1.7
	netbsd-8-1-RC1:1.7
	pgoyette-compat-merge-20190127:1.7
	pgoyette-compat-20190127:1.7
	pgoyette-compat-20190118:1.7
	pgoyette-compat-1226:1.7
	pgoyette-compat-1126:1.7
	pgoyette-compat-1020:1.7
	pgoyette-compat-0930:1.7
	pgoyette-compat-0906:1.7
	netbsd-7-2-RELEASE:1.7
	pgoyette-compat-0728:1.7
	netbsd-8-0-RELEASE:1.7
	phil-wifi:1.7.0.82
	phil-wifi-base:1.7
	pgoyette-compat-0625:1.7
	netbsd-8-0-RC2:1.7
	pgoyette-compat-0521:1.7
	pgoyette-compat-0502:1.7
	pgoyette-compat-0422:1.7
	netbsd-8-0-RC1:1.7
	pgoyette-compat-0415:1.7
	pgoyette-compat-0407:1.7
	pgoyette-compat-0330:1.7
	pgoyette-compat-0322:1.7
	pgoyette-compat-0315:1.7
	netbsd-7-1-2-RELEASE:1.7
	pgoyette-compat:1.7.0.80
	pgoyette-compat-base:1.7
	netbsd-7-1-1-RELEASE:1.7
	matt-nb8-mediatek:1.7.0.78
	matt-nb8-mediatek-base:1.7
	perseant-stdc-iso10646:1.7.0.76
	perseant-stdc-iso10646-base:1.7
	netbsd-8:1.7.0.74
	netbsd-8-base:1.7
	prg-localcount2-base3:1.7
	prg-localcount2-base2:1.7
	prg-localcount2-base1:1.7
	prg-localcount2:1.7.0.72
	prg-localcount2-base:1.7
	pgoyette-localcount-20170426:1.7
	bouyer-socketcan-base1:1.7
	pgoyette-localcount-20170320:1.7
	netbsd-7-1:1.7.0.70
	netbsd-7-1-RELEASE:1.7
	netbsd-7-1-RC2:1.7
	netbsd-7-nhusb-base-20170116:1.7
	bouyer-socketcan:1.7.0.68
	bouyer-socketcan-base:1.7
	pgoyette-localcount-20170107:1.7
	netbsd-7-1-RC1:1.7
	pgoyette-localcount-20161104:1.7
	netbsd-7-0-2-RELEASE:1.7
	localcount-20160914:1.7
	netbsd-7-nhusb:1.7.0.66
	netbsd-7-nhusb-base:1.7
	pgoyette-localcount-20160806:1.7
	pgoyette-localcount-20160726:1.7
	pgoyette-localcount:1.7.0.64
	pgoyette-localcount-base:1.7
	netbsd-7-0-1-RELEASE:1.7
	netbsd-7-0:1.7.0.62
	netbsd-7-0-RELEASE:1.7
	netbsd-7-0-RC3:1.7
	netbsd-7-0-RC2:1.7
	netbsd-7-0-RC1:1.7
	netbsd-5-2-3-RELEASE:1.7
	netbsd-5-1-5-RELEASE:1.7
	netbsd-6-0-6-RELEASE:1.7
	netbsd-6-1-5-RELEASE:1.7
	netbsd-7:1.7.0.60
	netbsd-7-base:1.7
	yamt-pagecache-base9:1.7
	yamt-pagecache-tag8:1.7
	netbsd-6-1-4-RELEASE:1.7
	netbsd-6-0-5-RELEASE:1.7
	tls-earlyentropy:1.7.0.58
	tls-earlyentropy-base:1.7
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.7
	riastradh-drm2-base3:1.7
	netbsd-6-1-3-RELEASE:1.7
	netbsd-6-0-4-RELEASE:1.7
	netbsd-5-2-2-RELEASE:1.7
	netbsd-5-1-4-RELEASE:1.7
	netbsd-6-1-2-RELEASE:1.7
	netbsd-6-0-3-RELEASE:1.7
	netbsd-5-2-1-RELEASE:1.7
	netbsd-5-1-3-RELEASE:1.7
	netbsd-6-1-1-RELEASE:1.7
	riastradh-drm2-base2:1.7
	riastradh-drm2-base1:1.7
	riastradh-drm2:1.7.0.52
	riastradh-drm2-base:1.7
	netbsd-6-1:1.7.0.56
	netbsd-6-0-2-RELEASE:1.7
	netbsd-6-1-RELEASE:1.7
	netbsd-6-1-RC4:1.7
	netbsd-6-1-RC3:1.7
	agc-symver:1.7.0.54
	agc-symver-base:1.7
	netbsd-6-1-RC2:1.7
	netbsd-6-1-RC1:1.7
	yamt-pagecache-base8:1.7
	netbsd-5-2:1.7.0.50
	netbsd-6-0-1-RELEASE:1.7
	yamt-pagecache-base7:1.7
	netbsd-5-2-RELEASE:1.7
	netbsd-5-2-RC1:1.7
	matt-nb6-plus-nbase:1.7
	yamt-pagecache-base6:1.7
	netbsd-6-0:1.7.0.48
	netbsd-6-0-RELEASE:1.7
	netbsd-6-0-RC2:1.7
	tls-maxphys:1.7.0.46
	tls-maxphys-base:1.7
	matt-nb6-plus:1.7.0.44
	matt-nb6-plus-base:1.7
	netbsd-6-0-RC1:1.7
	yamt-pagecache-base5:1.7
	yamt-pagecache-base4:1.7
	netbsd-6:1.7.0.42
	netbsd-6-base:1.7
	netbsd-5-1-2-RELEASE:1.7
	netbsd-5-1-1-RELEASE:1.7
	yamt-pagecache-base3:1.7
	yamt-pagecache-base2:1.7
	yamt-pagecache:1.7.0.40
	yamt-pagecache-base:1.7
	cherry-xenmp:1.7.0.38
	cherry-xenmp-base:1.7
	bouyer-quota2-nbase:1.7
	bouyer-quota2:1.7.0.36
	bouyer-quota2-base:1.7
	matt-mips64-premerge-20101231:1.7
	matt-nb5-mips64-premerge-20101231:1.7
	matt-nb5-pq3:1.7.0.34
	matt-nb5-pq3-base:1.7
	netbsd-5-1:1.7.0.32
	netbsd-5-1-RELEASE:1.7
	netbsd-5-1-RC4:1.7
	matt-nb5-mips64-k15:1.7
	netbsd-5-1-RC3:1.7
	netbsd-5-1-RC2:1.7
	netbsd-5-1-RC1:1.7
	netbsd-5-0-2-RELEASE:1.7
	matt-nb5-mips64-premerge-20091211:1.7
	matt-premerge-20091211:1.7
	matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.7
	matt-nb4-mips64-k7-u2a-k9b:1.7
	matt-nb5-mips64-u1-k1-k5:1.7
	matt-nb5-mips64:1.7.0.30
	netbsd-5-0-1-RELEASE:1.7
	jym-xensuspend-nbase:1.7
	netbsd-5-0:1.7.0.28
	netbsd-5-0-RELEASE:1.7
	netbsd-5-0-RC4:1.7
	netbsd-5-0-RC3:1.7
	netbsd-5-0-RC2:1.7
	jym-xensuspend:1.7.0.26
	jym-xensuspend-base:1.7
	netbsd-5-0-RC1:1.7
	netbsd-5:1.7.0.24
	netbsd-5-base:1.7
	matt-mips64-base2:1.7
	matt-mips64:1.7.0.22
	mjf-devfs2:1.7.0.20
	mjf-devfs2-base:1.7
	netbsd-4-0-1-RELEASE:1.7
	wrstuden-revivesa-base-3:1.7
	wrstuden-revivesa-base-2:1.7
	wrstuden-fixsa-newbase:1.7
	wrstuden-revivesa-base-1:1.7
	yamt-pf42-base4:1.7
	yamt-pf42-base3:1.7
	hpcarm-cleanup-nbase:1.7
	yamt-pf42-baseX:1.7
	yamt-pf42-base2:1.7
	wrstuden-revivesa:1.7.0.18
	wrstuden-revivesa-base:1.7
	yamt-pf42:1.7.0.16
	yamt-pf42-base:1.7
	keiichi-mipv6:1.7.0.14
	keiichi-mipv6-base:1.7
	matt-armv6-nbase:1.7
	matt-armv6-prevmlocking:1.7
	wrstuden-fixsa-base-1:1.7
	netbsd-4-0:1.7.0.12
	netbsd-4-0-RELEASE:1.7
	cube-autoconf:1.7.0.10
	cube-autoconf-base:1.7
	netbsd-4-0-RC5:1.7
	netbsd-4-0-RC4:1.7
	netbsd-4-0-RC3:1.7
	netbsd-4-0-RC2:1.7
	netbsd-4-0-RC1:1.7
	matt-armv6:1.7.0.8
	matt-armv6-base:1.7
	matt-mips64-base:1.7
	hpcarm-cleanup:1.7.0.6
	hpcarm-cleanup-base:1.7
	wrstuden-fixsa:1.7.0.4
	wrstuden-fixsa-base:1.7
	abandoned-netbsd-4-base:1.6
	abandoned-netbsd-4:1.6.0.2
	netbsd-4:1.7.0.2
	netbsd-4-base:1.7;
locks; strict;
comment	@# @;


1.7
date	2006.11.11.14.47.27;	author jmmv;	state Exp;
branches;
next	1.6;

1.6
date	2006.07.21.00.29.23;	author perseant;	state Exp;
branches;
next	1.5;

1.5
date	2006.06.24.05.28.54;	author perseant;	state Exp;
branches;
next	1.4;

1.4
date	2006.05.05.19.38.30;	author perseant;	state Exp;
branches;
next	1.3;

1.3
date	2006.04.27.22.37.54;	author perseant;	state Exp;
branches;
next	1.2;

1.2
date	2006.04.22.00.10.55;	author perseant;	state Exp;
branches;
next	1.1;

1.1
date	2006.04.17.20.02.35;	author perseant;	state Exp;
branches;
next	;


desc
@@


1.7
log
@Move lfs_cleanerd from /usr/libexec to /libexec.  This is to allow putting
the root file system on a LFS volume.

Addresses PR bin/30407.  No objections in tech-userlevel@@.
@
text
@#	$NetBSD: Makefile,v 1.6 2006/07/21 00:29:23 perseant Exp $
#
# Note: this test must be run with LFSDEV defined, e.g. "LFSDEV=wd0g".
# It will destroy the existing contents of $LFSDEV to perform the test.
# The test also requires the availability of two files each the size
# of ${LFSDEV} to store temporary filesystem images in, during the course
# of the run.
#
# This test requires that Perl be installed to run.
#

NOMAN=	# defined
TMPMP= /tmp/lfsregresstest_mount
SRCDIR?= ${.CURDIR}
CLEAN= clean
LFSBDEV="/dev/${LFSDEV}"
LFSCDEV="/dev/r${LFSDEV}"
GFILE?= "good_fs.img"		# "Good" file - will be as large as the FS
WFILE?= "work_fs.img"		# Work file - will also be as large as the FS
COUNT?= 5
PLEX?=  2
FSIZE?= 16384

regress: test_ckckp

.ifndef REGRESS_LOG
REGRESS_LOG=/dev/null
.endif

test_ckckp: ckckp cleanalot_async run_ckckp
.ifndef LFSDEV
	@@echo "***  Checkpoint validity test skipped"
	@@echo ${.CURDIR} SKIPPED "LFSDEV not defined" >> ${REGRESS_LOG}
.else
	@@echo "***  Checkpoint validity test"
	@@echo "***  WARNING: will newfs_lfs ${LFSCDEV} in 10 seconds"
	@@sleep 10
	newfs_lfs ${LFSCDEV}
	-mkdir ${TMPMP}
	mount -o-n ${LFSBDEV} ${TMPMP}
	/libexec/lfs_cleanerd -b -n4 -t5 ${TMPMP}
	./run_ckckp ${TMPMP} ${LFSCDEV} ${GFILE} ${WFILE} ${PLEX} ${COUNT} ${FSIZE} || \
		echo ${.CURDIR} FAILED | tee -a ${REGRESS_LOG}
	umount ${TMPMP}
	rmdir ${TMPMP}
	echo ${.CURDIR} PASSED | tee -a ${REGRESS_LOG}
.endif

abort:
	-kill -9 `ps auxww | grep ckckp | grep -v grep | awk '{print $$2}'`
	umount ${TMPMP}

clean:
	rm -f *.o ckckp cleanalot_async *~ *.core check-all.log ${GFILE} ${WFILE}

.include <bsd.prog.mk>
@


1.6
log
@Include testing of the roll-forward agent, when recreating the filesystem
partial-segment by partial-segment.  Each checkpoint should pass fsck_lfs -n
without errors; the results of fsck_lfs -p on non-checkpoints should also
pass fsck_lfs -n without errors.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.5 2006/06/24 05:28:54 perseant Exp $
d41 1
a41 1
	/usr/libexec/lfs_cleanerd -b -n4 -t5 ${TMPMP}
@


1.5
log
@Change LFCNWRAP{STOP,GO} to make them more suitable for snapshotting; in
particular, the caller can now choose whether to wait for the condition
to be met, and if the caller of LFCNWRAPSTOP dies or otherwise closes
the descriptor, the filesystem is started again.  Updated the ckckp
regression test to use the new semantics.

dump_lfs(8) now uses the fcntls to implement LFS-style snapshotting through
the -X flag, addressing PR#33457 albeit not using fss(4).  Fixed a couple
other problems with dump_lfs that manifested themselves during testing.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.4 2006/05/05 19:38:30 perseant Exp $
d20 1
a20 1
COUNT?= 20
d40 2
a41 1
	mount ${LFSBDEV} ${TMPMP}
d54 1
a54 1
	rm -f ckckp cleanalot_async *~ *.core ${GFILE} ${WFILE}
@


1.4
log
@Allow the user to specify a file size in the ckckp regression test, including
the value zero (filling the filesystem with directories and empty file
inodes).
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.3 2006/04/27 22:37:54 perseant Exp $
d48 1
a48 1
abort: go
a49 1
	./go ${TMPMP}
d53 1
a53 1
	rm -f ckckp cleanalot_async go *~ *.core ${GFILE} ${WFILE}
@


1.3
log
@Be a little more careful about what we copy into the working file when;
this takes care of another class of false positives.  Add copyright
assignments.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.2 2006/04/22 00:10:55 perseant Exp $
d22 1
d41 1
a41 1
	./run_ckckp ${TMPMP} ${LFSCDEV} ${GFILE} ${WFILE} ${PLEX} ${COUNT} || \
@


1.2
log
@Regression test improvements:

Move the stop for LFCNWRAPSTOP to the point at which writing at segment 0
is really about to commence, since this is what the test expects (and
incidentally what a snapshotting utility wants as well).

More correctly reconstruct the on-disk state at every checkpoint, rather
than relying on the entire state at the point of wrapping to be accurate
(that is only true the first time we wrap).  Add a "make abort" target to
make rerunning the test more convenient when it has failed and we're done
analyzing the failure.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.4 2005/02/26 05:45:54 perseant Exp $
d53 1
a53 1
	rm -f ckckp cleanalot_async *~ *.core ${GFILE} ${WFILE}
@


1.1
log
@Introduce two fcntl calls that freeze the filesystem right at the point
where segment 0 is being considered for writing.  This allows for automated
checkpoint vailidity scanning, and could be used (in conjunction with the
existing LFCNREWIND) for e.g. snapshot dumps as well.

Include a regression test that does such scanning.

When writing the Ifile, loop through the dirty block list three times to
make sure that the checkpoint is always consistent (the first and second
times the Ifile blocks can cross a segment boundary; not so the third time
unless the segments are very small).  Discovered by using the aforementioned
regression test.
@
text
@d5 4
d18 2
d25 4
d30 4
d40 2
a41 1
	./run_ckckp ${TMPMP} ${LFSCDEV} ${PLEX} ${COUNT}
d44 7
d53 1
a53 1
	rm -f ckckp cleanalot_async *~ *.core
@

