History log of /freebsd-current/sbin/dump/tape.c
Revision Date Author Comments
# 32e86a82 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

sbin: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by: Netflix


# 51e16cb8 23-Nov-2023 Warner Losh <imp@FreeBSD.org>

sbin: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by: Netflix


# eba230af 25-Sep-2023 John Baldwin <jhb@FreeBSD.org>

Purge more stray embedded $FreeBSD$ strings

These do not use __FBSDID but instead use bare char arrays.

Reviewed by: imp, emaste
Differential Revision: https://reviews.freebsd.org/D41957


# e5d0d1c5 22-Mar-2023 Kirk McKusick <mckusick@FreeBSD.org>

Rewrite function definitions with identifier lists.

A few functions snuck in with K&R style definitions.

Also add some missing memory frees.

MFC after: 1 week


# 0c577f4f 23-Jun-2020 Colin Percival <cperciva@FreeBSD.org>

Clean up some function and variable names.

The change from "slave" processes to "minion" processes to "worker"
processes left some less-than-coherent names:
1. "enslave" turned into the ungrammatical "enworker".
2. "slp" (SLave Pointer) turned into "mlp" (Minion [L] Pointer?).

Convert "enworker" to "create_workers" (the function in question forks
off 3 worker processes), and replace "mlp" with "wp" (Worker Pointer)
and "tmlp" with "twp" (Temporary Worker Pointer).

Reviewed by: imp, cem, danfe
Differential Revision: https://reviews.freebsd.org/D25403


# a74534b1 20-Jun-2020 Conrad Meyer <cem@FreeBSD.org>

dump(8): Reapply slightly modified r362422

Go ahead and replace the distasteful slave language for worker processes
with the straightforward description, "worker(s)."


# b1779ca0 20-Jun-2020 Warner Losh <imp@FreeBSD.org>

Revert -r362422.

While whimsical, there's too much negative energy around minion as well as the
positive.


# 0447cda0 19-Jun-2020 Warner Losh <imp@FreeBSD.org>

Increase the whimsy in this file by famring dump's work out to minions. Adjust
variables accordingly. Thankfully, we are able to do this without additional
banana expenditures.


# 33ceb489 03-Apr-2020 Kirk McKusick <mckusick@FreeBSD.org>

Clean up global variable declarations in the dump and restore
utilities so that they will compile with -fno-common.

Started by: Kyle Evans (kevans)
Reviewed by: Kyle Evans (kevans)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D24210


# b9c7cba5 11-Jun-2018 Warner Losh <imp@FreeBSD.org>

Fix a bug in the counting of blks.

We shouldn't count the bytes set in c_addr for TS_CLRI and TS_BITS
nodes. Those block overload c_count to communicate how many blocks
follow, not now many c_addr spaces are used. Dump would dump core
(now) because memory layout moved around and we'd access elements past
the end to make a count.

Reviewed by: kib@


# 2d518c65 11-Jun-2018 Warner Losh <imp@FreeBSD.org>

Add asserts to prevent overflows of c_addr.

Add some asserts that prevents the overflows of c_addr. This can't
happen, absent bugs. However, certain large filesystems can cause
problems. These have been prevented by r334968, but a solution
is needed. These asserts will help assure that solution is correct.

PR: 228807
Reviewed by: db


# a770ae06 27-Dec-2017 Kirk McKusick <mckusick@FreeBSD.org>

In preparation for converting to libufs to read the superblock,
change conflicting function names:

getino => getinode
bread => blkread

No functional change.


# 8a16b7a1 20-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

General further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.


# fbbd9655 28-Feb-2017 Warner Losh <imp@FreeBSD.org>

Renumber copyright clause 4

Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by: Jan Schaumann <jschauma@stevens.edu>
Pull Request: https://github.com/freebsd/freebsd/pull/96


# 7649cb00 23-Jan-2011 Kirk McKusick <mckusick@FreeBSD.org>

The dump, fsck_ffs, fsdb, fsirand, newfs, makefs, and quot utilities
include sys/time.h instead of time.h. This include is incorrect as
per the manpages for the APIs and the POSIX definitions. This commit
replaces sys/time.h where necessary with time.h.

The commit also includes some minor style(9) header fixup in newfs.

This commit is part of a larger effort by Garrett Cooper started in
//depot/user/gcooper/posix-conformance-work/ -- to make FreeBSD more
POSIX compliant.

Submitted by: Garrett Cooper yanegomi at gmail dot com


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 890005bf 01-Mar-2005 Ian Dowse <iedowse@FreeBSD.org>

Use a signal-safe type for two variables that are used to synchronise
with a signal handler. This fixes a race condition introduced by
compiler reordering that caused dump to sometimes get stuck,
especially while dumping large filesystems.


# c51d70c6 12-Apr-2004 Brian Feldman <green@FreeBSD.org>

Add -P arguments for dump(8) and restore(8) which allow the user to
use backup methods other than files and tapes. The -P argument is
a normal sh(1) pipeline with either $DUMP_VOLUME or $RESTORE_VOLUME
defined in the environment, respectively.

For example, I can back up my home to three DVD+R[W]s as so:
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/ad0s2e 40028550 10093140 26733126 27% /home
green# dump -0 -L -C16 -B4589840 -P 'growisofs -Z /dev/cd0=/dev/fd/0' /home


# 4c723140 09-Apr-2004 Mark Murray <markm@FreeBSD.org>

Remove advertising clause from University of California Regent's license,
per letter dated July 22, 1999.

Approved by: core, imp


# 89fdc4e1 24-Sep-2002 Mike Barcroft <mike@FreeBSD.org>

Use the standardized CHAR_BIT constant instead of NBBY in userland.


# ce66ddb7 21-Aug-2002 Tom Rhodes <trhodes@FreeBSD.org>

s/filesystem/file system/g as discussed on -developers


# 617dbd3c 07-Jul-2002 Ian Dowse <iedowse@FreeBSD.org>

Replace the use of %qd with intmax_t/%jd and fix a number of -Wall
and -Wformat warnings:
o Include timeconv.h for the time conversion functions.
o Remove unused variables.
o Correct a few cases where %d was used when printing longs.


# 325167c3 06-Jul-2002 Ian Dowse <iedowse@FreeBSD.org>

Fix some printf format errors.

Submitted by: Don Lewis <dl-freebsd@catspoiler.org>


# 1c85e6a3 21-Jun-2002 Kirk McKusick <mckusick@FreeBSD.org>

This commit adds basic support for the UFS2 filesystem. The UFS2
filesystem expands the inode to 256 bytes to make space for 64-bit
block pointers. It also adds a file-creation time field, an ability
to use jumbo blocks per inode to allow extent like pointer density,
and space for extended attributes (up to twice the filesystem block
size worth of attributes, e.g., on a 16K filesystem, there is space
for 32K of attributes). UFS2 fully supports and runs existing UFS1
filesystems. New filesystems built using newfs can be built in either
UFS1 or UFS2 format using the -O option. In this commit UFS1 is
the default format, so if you want to build UFS2 format filesystems,
you must specify -O 2. This default will be changed to UFS2 when
UFS2 proves itself to be stable. In this commit the boot code for
reading UFS2 filesystems is not compiled (see /sys/boot/common/ufsread.c)
as there is insufficient space in the boot block. Once the size of the
boot block is increased, this code can be defined.

Things to note: the definition of SBSIZE has changed to SBLOCKSIZE.
The header file <ufs/ufs/dinode.h> must be included before
<ufs/ffs/fs.h> so as to get the definitions of ufs2_daddr_t and
ufs_lbn_t.

Still TODO:
Verify that the first level bootstraps work for all the architectures.
Convert the utility ffsinfo to understand UFS2 and test growfs.
Add support for the extended attribute storage. Update soft updates
to ensure integrity of extended attribute storage. Switch the
current extended attribute interfaces to use the extended attribute
storage. Add the extent like functionality (framework is there,
but is currently never used).

Sponsored by: DARPA & NAI Labs.
Reviewed by: Poul-Henning Kamp <phk@freebsd.org>


# d266a286 06-Jun-2002 Poul-Henning Kamp <phk@FreeBSD.org>

s/daddr_t/ufs_daddr_t/g

This should fix the issues which cropped up after daddr_t grew up.

Sponsored by: DARPA & NAI Labs.


# 2db673ab 20-Mar-2002 Warner Losh <imp@FreeBSD.org>

o remove __P
o Use ANSI function definitions
o unifdef -D__STDC__


# 2bb823d2 16-Feb-2002 Ian Dowse <iedowse@FreeBSD.org>

Supply progress information in dump's process title, which is useful
for monitoring automated backups. This is based on a patch by Mikhail
Teterin, with some changes to make its operation clearer and to
update the proctitle more frequently.

PR: bin/32138


# 19f8080e 16-Feb-2002 Ian Dowse <iedowse@FreeBSD.org>

On receipt of a SIGINFO, schedule an immediate printout of the
percentage complete and remaining time estimate.

PR: bin/32138
Submitted by: mi


# ff5e109e 10-Feb-2002 Ian Dowse <iedowse@FreeBSD.org>

Make dump's behaviour more sensible when the output file is a fifo.
Normally trewind() performs a close-open-close cycle to rewind the
tape when closing the device, but this is not ideal for fifos. We
now skip the final open-close if the output descriptor is a fifo.

PR: bin/25474
Submitted by: Alex Bakhtin <bakhtin@amt.ru>
MFC after: 1 week


# d2334e27 16-Nov-2001 Ian Dowse <iedowse@FreeBSD.org>

Zap a number of #ifdef sunos blocks, and all of the `register'
keywords.


# bfa0b298 28-Jan-2001 Poul-Henning Kamp <phk@FreeBSD.org>

Use \a instead of \007 for making noise.

Submitted by: "Jason Smethers" <jsmethers@pdq.net>


# 7f3dea24 27-Aug-1999 Peter Wemm <peter@FreeBSD.org>

$Id$ -> $FreeBSD$


# 9b979919 03-May-1999 Matt Jacob <mjacob@FreeBSD.org>

temporary workaround for bin/11464


# 49fccf2a 15-Sep-1998 Justin T. Gibbs <gibbs@FreeBSD.org>

Add support for dealing with ENOSPC as the error code returned by a tape
device hitting EOM on a write.


# 7580ffbb 15-Jun-1998 Philippe Charnier <charnier@FreeBSD.org>

Correct use of .Nm. Add rcsid. Remove unused #includes.


# e3f5655f 25-Jan-1998 John Birrell <jb@FreeBSD.org>

read() and write() return ssize_t not int, so the first arg to atomic()
should be ssize_t too.


# d6038ed6 12-Oct-1997 Joerg Wunsch <joerg@FreeBSD.org>

Do not account the tape change time for ETA estimations.

PR: bin/4369
Submitted by: blank@fox.uni-trier.de (Sascha Blank)


# ee359f48 06-May-1997 Joerg Wunsch <joerg@FreeBSD.org>

Fix a long-standing bug with dump not treating errors correctly. They
were mishandled as an EOF, which became fatal if your first tape was
accidentally write-protected.

PR: bin/850 dump treats write-protect as an EOT...


# a37c38b8 10-Mar-1997 Peter Wemm <peter@FreeBSD.org>

Merge Lite2 changes (rather bigish, the dump/restore folks should check)


# 1811bdf3 11-Mar-1997 Peter Wemm <peter@FreeBSD.org>

Import some CSRG 4.4BSD-Lite2 components for sbin onto vendor branch.
(note that some of these have already been imported, this is a no-op)


# af00957e 01-Feb-1997 Joerg Wunsch <joerg@FreeBSD.org>

Add the `a' option (``auto-size'') to bypass all tape length
considerations, and dump right to the end of medium.


# eaa86f9d 13-Sep-1996 Bruce Evans <bde@FreeBSD.org>

Don't use __dead or __pure in user code. They were obfuscations
for gcc >= 2.5 and no-ops for gcc >= 2.6. Converted to use __dead2
or __pure2 where it wasn't already done, except in math.h where use
of __pure was mostly wrong.


# 5ebc7e62 30-May-1995 Rodney W. Grimes <rgrimes@FreeBSD.org>

Remove trailing whitespace.


# 8fae3551 26-May-1994 Rodney W. Grimes <rgrimes@FreeBSD.org>

BSD 4.4 Lite sbin Sources

Note: XNSrouted and routed NOT imported here, they shall be imported with
usr.sbin.