Lines Matching refs:tape

1 /*	$NetBSD: tape.c,v 1.49 2008/02/16 17:58:01 matt Exp $	*/
35 static char sccsid[] = "@(#)tape.c 8.4 (Berkeley) 5/1/95";
37 __RCSID("$NetBSD: tape.c,v 1.49 2008/02/16 17:58:01 matt Exp $");
63 int writesize; /* size of malloc()ed buffer for tape */
64 int64_t lastspclrec = -1; /* tape block number of last written header */
68 extern int ntrec; /* blocking factor on tape */
85 * Concurrent dump mods (Caltech) - disk block reading and tape writing
87 * tape, the others read disk blocks; they pass control of the tape in
118 int tenths; /* length of tape used per block written */
134 * variable, 0.30" to 0.45". The gap is maximal when the tape stops.
140 * Allocate tape buffer contiguous with the array of instruction
142 * Align tape buffer on page boundary to speed up tape write().
201 msg("write error on %s\n", tape);
307 /* Check for end of tape */
309 msg("End of tape detected\n");
366 * we think we've written the last blocks to the tape anyway,
379 msg("EOT detected in last 2 tape records!\n");
380 msg("Use a longer tape, decrease the size estimate\n");
392 msg("Closing %s\n", tape);
397 while (rmtopen(tape, 0, 0) < 0)
400 msg("Ejecting %s\n", tape);
408 while ((f = open(tape, 0)) < 0)
413 msg("Ejecting %s\n", tape);
437 if (rmtopen(tape, 0, 0) >= 0) {
442 if ((f = open(tape, 0)) >= 0) {
470 * be replayed on the next tape. Use the extra slave buffers
548 * worked ok, otherwise the tape is much too short!
559 quit("EOT detected at start of the tape!\n");
565 * We implement taking and restoring checkpoints on the tape level.
566 * When each tape is opened, a new process is created by forking; this
569 * If the child returns X_REWRITE, then it had problems writing that tape;
660 tapeno++; /* current tape sequence */
661 if (nexttape || strchr(tape, ',')) {
663 tape = nexttape;
664 if ((p = strchr(tape, ',')) != NULL) {
669 msg("Dumping volume %d on %s\n", tapeno, tape);
672 while ((tapefd = (host ? rmtopen(tape, 2, 1) :
673 pipeout ? 1 : open(tape, O_WRONLY|O_CREAT, 0666))) < 0)
676 open(tape, O_WRONLY|O_CREAT, 0666))) < 0)
679 msg("Cannot open output \"%s\".\n", tape);
684 enslave(); /* Share open tape file descriptor with slaves */
689 newtape++; /* new tape signal */
761 signal(SIGUSR1, tperror); /* Slave sends SIGUSR1 on tape errors */
838 * Get list of blocks to dump, read the blocks into tape buffer