Lines Matching refs:tape

1 /*	$NetBSD: tape.c,v 1.57 2021/06/19 13:56:34 christos Exp $	*/
35 static char sccsid[] = "@(#)tape.c 8.4 (Berkeley) 5/1/95";
37 __RCSID("$NetBSD: tape.c,v 1.57 2021/06/19 13:56:34 christos Exp $");
60 int writesize; /* size of malloc()ed buffer for tape */
61 int64_t lastspclrec = -1; /* tape block number of last written header */
65 extern int ntrec; /* blocking factor on tape */
82 * Concurrent dump mods (Caltech) - disk block reading and tape writing
84 * tape, the others read disk blocks; they pass control of the tape in
115 int tenths; /* length of tape used per block written */
131 * variable, 0.30" to 0.45". The gap is maximal when the tape stops.
137 * Allocate tape buffer contiguous with the array of instruction
139 * Align tape buffer on page boundary to speed up tape write().
198 msg("write error on %s\n", tape);
304 /* Check for end of tape */
306 msg("End of tape detected\n");
364 * we think we've written the last blocks to the tape anyway,
377 msg("EOT detected in last 2 tape records!\n");
378 msg("Use a longer tape, decrease the size estimate\n");
390 msg("Closing %s\n", tape);
395 while (rmtopen(tape, 0, 0) < 0)
398 msg("Ejecting %s\n", tape);
406 while ((f = open(tape, 0)) < 0)
411 msg("Ejecting %s\n", tape);
435 if (rmtopen(tape, 0, 0) >= 0) {
440 if ((f = open(tape, 0)) >= 0) {
469 * be replayed on the next tape. Use the extra worker buffers
547 * worked ok, otherwise the tape is much too short!
558 quit("EOT detected at start of the tape");
564 * We implement taking and restoring checkpoints on the tape level.
565 * When each tape is opened, a new process is created by forking; this
568 * If the child returns X_REWRITE, then it had problems writing that tape;
659 tapeno++; /* current tape sequence */
660 if (nexttape || strchr(tape, ',')) {
662 tape = nexttape;
663 if ((p = strchr(tape, ',')) != NULL) {
668 msg("Dumping volume %d on %s\n", tapeno, tape);
671 while ((tapefd = (host ? rmtopen(tape, 2, 1) :
672 pipeout ? 1 : open(tape, O_WRONLY|O_CREAT, 0666))) < 0)
675 open(tape, O_WRONLY|O_CREAT, 0666))) < 0)
678 msg("Cannot open output \"%s\".\n", tape);
683 create_workers(); /* Share open tape file descriptor with workers */
688 newtape++; /* new tape signal */
760 signal(SIGUSR1, tperror); /* Slave sends SIGUSR1 on tape errors */
838 * Get list of blocks to dump, read the blocks into tape buffer