Home | History | Annotate | Download | only in dump
History log of /src/sbin/dump/traverse.c
RevisionDateAuthorComments
 1.56  07-Aug-2023  mrg fix always true conditional by removing the address-of operator.

found by GCC 12.
 1.55  26-Jan-2022  christos PR/56643: Paul Goyette: Disable the last block adjustment for now. It seems
to break restore.
 1.54  07-Jul-2021  christos PR/56270: Matthias Scheler: dump fails on ffsv1: Zero c_extsize since ffsv1
does not support extended attributes.
 1.53  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.52  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.51  03-Feb-2019  mrg - mark Exit() __dead
- bump a buffer size to avoid possible truncation
- adding missing fallthru comment
 1.50  15-Jun-2013  christos branches: 1.50.20; 1.50.28;
handle new lfs split
 1.49  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.48  12-Aug-2008  simonb branches: 1.48.18; 1.48.24;
We don't need to dump WAPBL log files - don't dump files with SF_LOG
flag set, and document this.
 1.47  24-Jun-2006  perseant branches: 1.47.20; 1.47.24;
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.46  21-Apr-2006  skrll Don't use cast expressions as lvalues as newer versions of gcc warn.
 1.45  19-Aug-2005  christos 64 bit inode changes
 1.44  25-May-2004  hannken Add ffs internal snapshots. Written by Marshall Kirk McKusick for FreeBSD.

- Not enabled by default. Needs kernel option FFS_SNAPSHOT.
- Change parameters of ffs_blkfree.
- Let the copy-on-write functions return an error so spec_strategy
may fail if the copy-on-write fails.
- Change genfs_*lock*() to use vp->v_vnlock instead of &vp->v_lock.
- Add flag B_METAONLY to VOP_BALLOC to return indirect block buffer.
- Add a function ffs_checkfreefile needed for snapshot creation.
- Add special handling of snapshot files:
Snapshots may not be opened for writing and the attributes are read-only.
Use the mtime as the time this snapshot was taken.
Deny mtime updates for snapshot files.
- Add function transferlockers to transfer any waiting processes from
one lock to another.
- Add vfsop VFS_SNAPSHOT to take a snapshot and make it accessible through
a vnode.
- Add snapshot support to ls, fsck_ffs and dump.

Welcome to 2.0F.

Approved by: Jason R. Thorpe <thorpej@netbsd.org>
 1.43  24-Mar-2004  hannken Make the computation of estimated blocks work for frag size != 1024.
 1.42  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.41  01-May-2003  fvdl Fix byteswapping issues in dirindir(); mostly from Enami Tsugutomo.
 1.40  01-May-2003  fvdl Swap the right disk block in mapdirs() for the UFS1 case. From Enami.
 1.39  08-Apr-2003  fvdl Since the size passed in may be different from the fs blocksize, just
allocate a buffer each time instead of using a static one.
 1.38  08-Apr-2003  fvdl dblk should be static. Fixes PR 21020, by Geoff Wing. Patch supplied
by him.
 1.37  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.36  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.35  30-Sep-2002  lukem Add fix from FreeBSD traverse.c 1.16:
Files in subdirectories of directories that have the nodump flag set
are sometimes incorrectly being dumped.

The problem arises because the subdirectory only gets its entry
cleared from usedinomap if it is also present in dumpinomap, and it is
the absence of a directory in usedinomap that internally indicates
that the directory is under the effects of UF_NODUMP (either directly
or inherited).

FreeBSD PR: 32414
Submitted by: David C Lawrence <tale@dd.org>
 1.34  23-Dec-2001  lukem unifdef sunos
 1.33  01-Nov-2001  lukem fix -Wshadow warnings
 1.32  14-Aug-2001  lukem s/filesystem/file system/dump.h
 1.31  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.30  28-May-2001  lukem unifdef !__STDC__ (missed in previous)
 1.29  27-May-2001  lukem knf to ansi
 1.28  01-Oct-1999  perseant branches: 1.28.6;
Working version of aborted dump{,_lfs} join.
 1.27  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.26  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.25  05-May-1999  sommerfe branches: 1.25.2;
Avoid byte overflow in block estimate for large files
 1.24  23-Mar-1999  bouyer branches: 1.24.2;
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.23  09-Mar-1999  bouyer Handle "nodump" flag on directories, by not dumping any files or directories
under it. Based on some parts of PR 6705 by Brian Grayson.
In the Makefile, add (commented out) debug options that can be turned on.
 1.22  28-Dec-1998  lukem fix estimate of blocks for subsets.
fix from Brian Grayson <bgrayson@ece.utexas.edu> in [bin/6607]
 1.21  25-Aug-1998  ross from Erik Bertelsen <erik@mediator.uni-c.dk>
{ put } { in } { lots } { of } { these } { to } { shut } { up } { egcs }
 1.20  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.19  16-Sep-1997  lukem resolve conflicts from lite-2 import
 1.18  15-Sep-1997  lukem * cleanup for WARNS=1
* fix use of .Nm
* comment out some unused(?) functions
 1.17  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.16  15-Apr-1997  lukem remove use of "register".
 1.15  30-Nov-1996  cgd patches from Tom I Helbekkmo <tih@nhh.no> to deal with type-size issues,
so this works (better, at least) on 64-bit machines (e.g. alpha).
 1.14  18-Jun-1995  cgd branches: 1.14.6;
update for posixified stat structure
 1.13  11-Jun-1995  mycroft Back out previous change.
 1.12  07-Jun-1995  cgd typeof(timeval.tv_sec) != time_t
 1.11  27-Mar-1995  mycroft Fix another bogus cast.
 1.10  27-Mar-1995  mycroft Remove incorrect cast on lseek() return value.
 1.9  18-Mar-1995  cgd convert to new RCS Id conventions; reduce my headache
 1.8  30-Jan-1995  mycroft Don't mix stat flags and inode flags.
 1.7  23-Sep-1994  mycroft Eliminate uses of some obsolete functions.
 1.6  17-Sep-1994  mycroft Correct typo; IFMT -> S_IFMT.
 1.5  14-Jun-1994  mycroft Fix compatibility with old fastlinks.
 1.4  08-Jun-1994  mycroft Update from 4.4-Lite, with local changes.
 1.3  25-Apr-1994  cgd change some #ifdef's.
 1.2  14-Jan-1994  cgd fix for() starting condition in mapfiles()
 1.1  22-Dec-1993  cgd branches: 1.1.1;
new version from CSRG, via BSDI, with fixes
 1.1.1.2  16-Sep-1997  lukem imported from lite-2
 1.1.1.1  13-Jun-1994  mycroft Import 4.4-Lite version.
 1.14.6.1  06-Dec-1996  rat Pullup request from Chris G Demetriou <Chris_G_Demetriou@ux2.sp.cs.cmu.edu>

>Make dump and restore usable on the alpha
 1.24.2.1  05-May-1999  perry pullup 1.24->1.25 (sommerfeld)
 1.25.2.1  27-Dec-1999  wrstuden Pull up to last week's -current.
 1.28.6.1  16-Jan-2002  he Pull up revision 1.34 (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.47.24.1  18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.47.20.1  28-Sep-2008  mjf Sync with HEAD.
 1.48.24.2  23-Jun-2013  tls resync from head
 1.48.24.1  25-Feb-2013  tls resync with head
 1.48.18.2  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.48.18.1  23-Jan-2013  yamt sync with head
 1.50.28.1  10-Jun-2019  christos Sync with HEAD
 1.50.20.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.

RSS XML Feed