Home | History | Annotate | Download | only in dump
History log of /src/sbin/dump/dump.h
RevisionDateAuthorComments
 1.60  19-Jun-2021  christos Add external attribute dumping and restoring support from FreeBSD.
Does not fully work yet, attributes are being saved and restored correctly,
but don't appear in the restored files somehow.
 1.59  03-Dec-2020  kre PR bin/55834

count blocks written in unsigned 64 bit counter
rather than signed int which overflows after 2^31-1
blocks (2TiB) after which neither the 5 minute
status updates or SIGINFO (^T) reports are issued
until the negative numbers increase past 0 and
wildly inaccurate reports would be written.
 1.58  05-Apr-2020  joerg Fix depenency on common symbols in sbin.
 1.57  25-Mar-2019  manu branches: 1.57.2;
Add -U flag to dump(8) and dump_lfs(8) to specify dumpdates entry

This address situations where dump(8) cannot figure out the device being
dumped. It also allows tracking of subvolume dumps by using virtual
device as dumpdates entry.
 1.56  01-Mar-2019  christos Use getfsspecname() to fill the filesystem argument in dumpdates.
While here, make sure that the error strings terminate with newline
consistently, and add a function that adds the system error string.
 1.55  03-Feb-2019  mrg - mark Exit() __dead
- bump a buffer size to avoid possible truncation
- adding missing fallthru comment
 1.54  16-Nov-2015  christos branches: 1.54.8; 1.54.16;
- update NAME_MAX to match the kernel.
- add a comment about where the constant is used.
 1.53  12-Aug-2015  dholland Hack up dinode usage to be 64 vs. 32 as needed. Part 1.

(This part changes the native lfs code; the ufs-derived code already
has 64 vs. 32 logic, but as aspects of it are unsafe, and don't
entirely interoperate cleanly with the lfs 64/32 stuff, pass 2 will be
rehashing that.)
 1.52  28-Jul-2015  dholland Add a new lfs header file: lfs_accessors.h.

This contains all the accessor functions and macros out of lfs.h.
Add an include of lfs_accessors.h after all uses of lfs.h... except
for code that wants to define its own struct lfs-alike that the
accessors are supposed to play along with. For these, set STRUCT_LFS
and include lfs_accessors.h after the necessary structure has been
defined, so that lfs_accessors.h can emit functions in terms of it.
 1.51  15-Jun-2013  christos handle new lfs split
 1.50  22-Jan-2013  dholland Stuff UFS_ in front of a few of ufs's symbols to reduce namespace
pollution. Specifically:
ROOTINO -> UFS_ROOTINO
WINO -> UFS_WINO
NXADDR -> UFS_NXADDR
NDADDR -> UFS_NDADDR
NIADDR -> UFS_NIADDR
MAXSYMLINKLEN -> UFS_MAXSYMLINKLEN
MAXSYMLINKLEN_UFS[12] -> UFS[12]_MAXSYMLINKLEN (for consistency)

Sort out ext2fs's misuse of NDADDR and NIADDR; fortunately, these have
the same values in ext2fs and ffs.

No functional change intended.
 1.49  13-Jan-2013  dholland Use __printflike.
 1.48  13-Jan-2013  dholland Add some const.
 1.47  05-May-2012  christos branches: 1.47.2;
remove ancient crap
 1.46  26-Feb-2010  christos branches: 1.46.6;
PR/42883: Greywolf: Add -i flag which brings "true incremental" capability.
 1.45  16-Feb-2008  matt Fix some inconsisent/conflicting definitions and missing parameters
 1.44  26-Oct-2006  hannken branches: 1.44.8; 1.44.10;
When using a snapshot take the snapshot raw device on further open.

Fixes PR #34923 dump(8) only dumps a corefile with -X (snapshots)

Approved by: Manuel Bouyer <bouyer@netbsd.org>
 1.43  24-Jun-2006  perseant 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.
 1.42  21-Apr-2006  skrll Don't use cast expressions as lvalues as newer versions of gcc warn.
 1.41  24-Dec-2005  perry Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.40  27-Jun-2005  christos sprinkle const
 1.39  21-Apr-2004  christos branches: 1.39.2; 1.39.4; 1.39.6;
Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.
 1.38  15-Mar-2004  lukem Adjust tstart_volume (volume start time) by the time spent in query(),
similar to the adjustment for tstart_writing made in optr.c rev 1.4.
Should fix PR bin/19711 from matthew green.
 1.37  07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22308, verified by myself.
 1.36  02-Apr-2003  fvdl Add support for UFS2. UFS2 is an enhanced FFS, adding support for
64 bit block pointers, extended attribute storage, and a few
other things.

This commit does not yet include the code to manipulate the extended
storage (for e.g. ACLs), this will be done later.

Originally written by Kirk McKusick and Network Associates Laboratories for
FreeBSD.
 1.35  27-Mar-2003  lukem Use "wall -g operator" (instead of private code) to broadcast() messages to
members of the operator group.
Don't install "setgid tty", and remove now unnecessary gid/egid swapping.
Remove utmp trawling code pulled in from usr.bin/who.
The Code is now simpler, and more portable (without the utmp cruft) too.

This is derived from similar work in OpenBSD.
 1.34  24-Jan-2003  fvdl Bump daddr_t to 64 bits. Replace it with int32_t in all places where
it was used on-disk, so that on-disk formats remain the same.
Remove ufs_daddr_t and ufs_lbn_t for the time being.
 1.33  30-Dec-2001  lukem Add -a to "auto-size" the tape, rather than relying upon other options
to define the tape size. Requires the tape driver to either return ENOSPC
at end of media, or 0 when a write is attempted (such as the "early warning"
support in st(4) enabled with "mt eew 1"). From FreeBSD.
 1.32  25-Dec-2001  lukem Fixes from FreeBSD:
- Fix error if first tape was write protected. Fix NetBSD PRs 4754 and 6098.
- Make dump exit codes confirm to manual page.
- Use \a instead of \7 to make noise.
- Fix estimated number of tapes for huge dumps to cartridges.
- Use <sys/queue.h> SLIST_* instead of home-rolled lists.
- Do not exit if unable to read or create /etc/dumpdates.
- Support output (tape) device returning ENOSPC for end-of-media on a write.

Fixes by me:
- Remove unused ddates_in.
- Don't dump core if SIGINFO is received before 1 second has elapsed.
- Only process SIGINFO in current "active" child.
- Don't dump core in -w if dumpdates wasn't readable and ddatev == NULL
- Minor KNF; wrap some lines
 1.31  22-Dec-2001  lukem - use correct type for minTime in findlru() (size_t instead of int)
- clean up whitespace
 1.30  14-Dec-2001  bouyer Add a -l (autoload) flag. For multivolume dumps, this makes dump eject the
tape when a volume is full, and try to reopen the tape drive for 2 mn.
To be used with tape changers which load the next tape when the current one is
ejected.
While I'm there fix eject handling for remote tape.
 1.29  15-Oct-2001  blymn Add the capability for dump to print timestamps on all informational
messages.
 1.28  14-Aug-2001  lukem s/filesystem/file system/
 1.27  28-May-2001  lukem * improve parsing of file-systems-to-dump when a path is given:
- if it's a path to an unmounted file-system listed in /etc/fstab, use
that instead of assuming the user wanted a subtree dump of the parent
directory. this restores the behaviour of dump before the subtree
dumping code went in.
- if it's a path to a mounted file-system which is not in /etc/fstab,
use the info from getmntinfo(3). previously, dump would choke.
* implement error checked malloc(), calloc(), strdup(), and use
appropriately (some of the calloc()s weren't being checked)
* use 'file-system' instead of 'filesystem' in the man page
 1.26  27-May-2001  lukem knf to ansi
 1.25  12-May-2001  tron Fix bug in new "e" option: only eject tape if it is full, not if the dump
was finished.
 1.24  07-May-2001  tron Add a new option "e" to "dump" which allows to eject tapes automatically
if a tape change is required.
 1.23  04-Feb-2001  christos restore needs the rcmd operations.
 1.22  04-Feb-2001  christos fix redundant decls
 1.21  13-Dec-2000  scw `dev_bsize' needs to be declared extern.
 1.20  10-Oct-2000  is Format string cleanups by Bill Sommerfeld.
 1.19  01-Oct-1999  perseant branches: 1.19.6;
Working version of aborted dump{,_lfs} join.
 1.18  30-Sep-1999  perseant Back out changes made on the 29th, not at all the changes I intended to commit.
(I don't know how I did it though ... I'll figure it out tonight.)
I'll reapply this, in a working form, this evening.
 1.17  29-Sep-1999  perseant Adapt dump(8) to use filestore-independent (but still ufs-specific)
replacements for NINDIR, fsbtodb, etc. Create dump_lfs by adding a few
LFS-filestore-specific routines. As described in PR#8317.
 1.16  23-Mar-1999  bouyer branches: 1.16.2; 1.16.4;
Implement a read cache, as announced on tech-userlevel. Default is 32k
read buffer size, 512 buffer or 15% of the user memory. Can be changed
with the -k and -s options.
 1.15  15-Jan-1999  bouyer #include machine/bswap.h and remove -lutil.
 1.14  18-Mar-1998  bouyer Add support for non-native byte order FFS. The dump is in filesystem byte
order, restore already knows how to byteswap dumps.
 1.13  16-Sep-1997  lukem resolve conflicts from lite-2 import
 1.12  15-Sep-1997  lukem remove __dead
 1.11  05-Jun-1997  lukem * Add the ability to dump specific files & directories of a single
filesystem. This uses fts(3) to access the directory structure (and
not the raw device), so the standard access permissions are adhered
to (unlike dumping an entire filesystem, which just requires read
access to the raw disk device).
* Support SIGINFO status reporting.
* Remove now unused variables that previously stored the (e)uid.
* Be more informative in a couple of error messages.
 1.10  10-Apr-1997  lukem Implement changes from [bin/1915]
* 'w' and 'W' display the year
* verbosity additions displaying total & per-volume transfer times and rates
 1.9  18-Mar-1995  cgd convert to new RCS Id conventions; reduce my headache
 1.8  23-Sep-1994  mycroft Eliminate uses of some obsolete functions.
 1.7  08-Jun-1994  mycroft Update from 4.4-Lite, with local changes.
 1.6  22-Dec-1993  cgd new version from CSRG, via BSDI, with fixes
 1.5  02-Dec-1993  mycroft Avoid core dumping if /etc/dumpdates is not present. Note that only file
systems listed in dumpdates are display by `dump w' and `dump W'; this is
probably a bug.
Original bug reported by John Brezak <brezak@ch.hp.com>.
 1.4  01-Aug-1993  mycroft Add RCS identifiers.
 1.3  23-Mar-1993  cgd changed "Id" to "Header" for rcsids
 1.2  22-Mar-1993  cgd added rcs ids to all files
 1.1  21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.3  16-Sep-1997  lukem imported from lite-2
 1.1.1.2  13-Jun-1994  mycroft Import 4.4-Lite version.
 1.1.1.1  21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.16.4.1  27-Dec-1999  wrstuden Pull up to last week's -current.
 1.16.2.1  10-Oct-2000  he Pull up revision 1.20 (requested by is):
Format string cleanup.
 1.19.6.8  28-Mar-2002  he Pull up revision 1.27 (via patch, requested by bouyer):
Improve behaviour when a path is given:
1) check if the path is an unmounted file system listed in fstab
2) check if it is a path to a mounted file system not listed in fstab
Fixes PR#15790.
 1.19.6.7  17-Jan-2002  he Pull up revision 1.23 (via patch, requested by bouyer):
Fix the ``Implement -l <timeout>'' pull-up;
restore needs the rcmd operation.
 1.19.6.6  16-Jan-2002  he Pull up revision 1.33 (via patch, requested by bouyer):
Add an ``-a'' option to ``auto-size'' the tape, rather than
relying upon other options to define the tape size.
 1.19.6.5  16-Jan-2002  he Pull up revisions 1.31-1.32 (via patch, requested by bouyer):
Various fixes:
o Fix error if first tape is write-protected; fixes PR#4754 and PR#6098
o Make error codes conform to manual page
o Use \a to make noise
o Fix estimated number of tapes for huge dumps to cartridges
o Use <sys/queue.h> SLIST_* macros instead of homegrown variants
o Do not exit if unable to read/create /etc/dumpdates
o Support output (tape) device returning ENOSPC for end-of-media on write
o Don't dump core if SIGINFO is received before 1 second has elapsed
o Only process SIGINFO in currently active child
o Ensure current (sub)block isn't past end of file system -- fixes
"spins forever but does nothing" bug.
o Some other minor fixes (types, whitespace, KNF, unifdef sunos, ...)
 1.19.6.4  16-Jan-2002  he Pull up revision 1.30 (via patch, requested by bouyer):
Implement ``-l <timeout>'' option for use with e.g. autochangers.
 1.19.6.3  15-May-2001  he Pull up revision 1.25 (requested by tron):
Fix bug in new ``e'' option: only eject tape if it is full, not
if the dump was finished.
 1.19.6.2  09-May-2001  he Pull up revision 1.24 (requested by tron):
Add a new option ``e'' to dump which directs it to eject tapes
automatically if a tape change is required.
 1.19.6.1  18-Oct-2000  tv Pullup sbin string format fixes [is].
See "cvs log" for explicit revision numbers per file, from sommerfeld.
 1.39.6.1  11-Nov-2006  bouyer Pull up following revision(s) (requested by hannken in ticket #1573):
sbin/dump/snapshot.h: revision 1.3 via patch
sbin/dump/snapshot.c: revision 1.3 via patch
sbin/dump/main.c: revision 1.63 via patch
sbin/dump/tape.c: revision 1.47 via patch
sbin/dump/dump.h: revision 1.44 via patch
When using a snapshot take the snapshot raw device on further open.
Fixes PR #34923 dump(8) only dumps a corefile with -X (snapshots)
Approved by: Manuel Bouyer <bouyer@netbsd.org>
 1.39.4.1  11-Nov-2006  bouyer Pull up following revision(s) (requested by hannken in ticket #1573):
sbin/dump/snapshot.h: revision 1.3 via patch
sbin/dump/snapshot.c: revision 1.3 via patch
sbin/dump/main.c: revision 1.63 via patch
sbin/dump/tape.c: revision 1.47 via patch
sbin/dump/dump.h: revision 1.44 via patch
When using a snapshot take the snapshot raw device on further open.
Fixes PR #34923 dump(8) only dumps a corefile with -X (snapshots)
Approved by: Manuel Bouyer <bouyer@netbsd.org>
 1.39.2.1  11-Nov-2006  bouyer Pull up following revision(s) (requested by hannken in ticket #1573):
sbin/dump/snapshot.h: revision 1.3 via patch
sbin/dump/snapshot.c: revision 1.3 via patch
sbin/dump/main.c: revision 1.63 via patch
sbin/dump/tape.c: revision 1.47 via patch
sbin/dump/dump.h: revision 1.44 via patch
When using a snapshot take the snapshot raw device on further open.
Fixes PR #34923 dump(8) only dumps a corefile with -X (snapshots)
Approved by: Manuel Bouyer <bouyer@netbsd.org>
 1.44.10.1  18-Feb-2008  mjf Sync with HEAD.
 1.44.8.1  23-Mar-2008  matt sync with HEAD
 1.46.6.3  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.46.6.2  23-Jan-2013  yamt sync with head
 1.46.6.1  23-May-2012  yamt sync with head.
 1.47.2.2  23-Jun-2013  tls resync from head
 1.47.2.1  25-Feb-2013  tls resync with head
 1.54.16.2  08-Apr-2020  martin Merge changes from current as of 20200406
 1.54.16.1  10-Jun-2019  christos Sync with HEAD
 1.54.8.2  07-Dec-2020  martin Pull up following revision(s) (requested by kre in ticket #1630):

sbin/dump/dump.h: revision 1.59
sbin/dump/main.c: revision 1.78

PR bin/55834

count blocks written in unsigned 64 bit counter
rather than signed int which overflows after 2^31-1
blocks (2TiB) after which neither the 5 minute
status updates or SIGINFO (^T) reports are issued
until the negative numbers increase past 0 and
wildly inaccurate reports would be written.
 1.54.8.1  29-Mar-2019  martin Pull up following revision(s) (requested by manu in ticket #1221):

sbin/dump/tape.c: revision 1.55
sbin/dump_lfs/dump_lfs.8: revision 1.18
sbin/dump/dump.h: revision 1.56
sbin/dump/dump.8: revision 1.69
sbin/dump/dump.h: revision 1.57
sbin/dump/ffs_inode.c: revision 1.23
sbin/dump/optr.c: revision 1.43
sbin/dump/itime.c: revision 1.21
sbin/dump/main.c: revision 1.74
sbin/dump/itime.c: revision 1.22
sbin/dump/main.c: revision 1.75
sbin/dump/dump.8: revision 1.70
sbin/dump/traverse.c: revision 1.52
sbin/dump/dump.8: revision 1.71

Document what rdump is (was once) for. PR 53442.

Use getfsspecname() to fill the filesystem argument in dumpdates.
While here, make sure that the error strings terminate with newline
consistently, and add a function that adds the system error string.

Add -U flag to dump(8) and dump_lfs(8) to specify dumpdates entry
This address situations where dump(8) cannot figure out the device being
dumped. It also allows tracking of subvolume dumps by using virtual
device as dumpdates entry.

Bump date for previous.
 1.57.2.1  06-Dec-2020  martin Pull up following revision(s) (requested by kre in ticket #1139):

sbin/dump/dump.h: revision 1.59
sbin/dump/main.c: revision 1.78

PR bin/55834

count blocks written in unsigned 64 bit counter
rather than signed int which overflows after 2^31-1
blocks (2TiB) after which neither the 5 minute
status updates or SIGINFO (^T) reports are issued
until the negative numbers increase past 0 and
wildly inaccurate reports would be written.

RSS XML Feed