summaryrefslogtreecommitdiffstats
path: root/sbin/dump/traverse.c
Commit message (Collapse)AuthorAgeFilesLines
* Make gcc4 happy by making consistent signedness.delphij2005-05-021-1/+1
|
* Avoid casts as lvalues.kan2004-07-281-2/+8
|
* Remove advertising clause from University of California Regent's license,markm2004-04-091-4/+0
| | | | | | per letter dated July 22, 1999. Approved by: core, imp
* In mapdirs(), do not use the `dp' inode pointer after searchdir()iedowse2003-11-041-3/+3
| | | | | | | | | | | | | | has been called, since it points to a shared inode buffer that may be overwritten. The two cases where `dp' was used incorrectly appear to have been overlooked when "nodump" inheritance was first added in revision 1.12. This is reported to correct propagation of the nodump flag on directories that are larger than one block in size. PR: bin/58912 Submitted by: Volker Paepcke <vpaepcke@incore.de> MFC after: 1 week
* Dump is hard-wired to believe that it can read disks onmckusick2003-05-071-4/+47
| | | | | | | | | | | | | | | | | | 1024-byte boundaries. For many years this was a reasonable assumption. However, in recent years we have begun seeing devices with 2048-byte sectors. These devices return errors when dump tries to read starting in the middle of a sector or when it tries to read only the first half of a sector. Rather than change the native block size used by dump (and thus create an incompatible dump format), this fix checks for transfer requests that start and/or end on a non-sector boundary. When such a read is detected, the new code reads the entire sector and copies out just the part that dump needs. Reviewed by: Poul-Henning Kamp <phk@critter.freebsd.dk> Approved by: re (John Baldwin <jhb@FreeBSD.org>) Sponsored by: DARPA & NAI Labs.
* Add a caching option to dump. Use -C. Note that NetBSD has a caching optiondillon2003-01-131-3/+4
| | | | | | | | | | | | | | | | | | | called -r but it takes 512 byte blocks instead of megabytes, and I felt a megabytes specification would be far more useful so I did not use the same option character. This will *greatly* improve dump performance at the cost of possibly missing filesystem changes that occur between passes, and does a fairly good job making up for the loss of buffered block devices. Caching is disabled by default to retain historical behavior. In tests, dump performance improved by about 40% when dumping / or /usr. Beware that dump forks and the cache may wind up being larger then you specify, but a more complex shared memory implementation would not produce results that are all that much better so I kept it simple for now. MFC after: 3 days
* Correct the estimated block count calculated by dump to accountmckusick2002-12-031-1/+4
| | | | | | for the minimal amount of space used by a snapshot. Sponsored by: DARPA & NAI Labs.
* Properly handle UFS2 sparsely allocated inodes. The UFS2 filesystemmckusick2002-12-031-25/+66
| | | | | | | | | | only preallocates a small number of inodes. The dump program tries to scan through all the allocated inodes on a filesystem which causes bad behavior if they have never been allocated. Thus dump must calculate the set of inodes that have actually been allocated and scan only those inodes. Sponsored by: DARPA & NAI Labs.
* Mark snapshots so that dump will dump them as zero lengthmckusick2002-11-301-2/+8
| | | | | | regular files rather than trying to interpret the snapshot. Sponsored by: DARPA & NAI Labs.
* Use the standardized CHAR_BIT constant instead of NBBY in userland.mike2002-09-251-1/+2
|
* Replace various spelling with FALLTHROUGH which is lint()ablecharnier2002-08-251-2/+2
|
* s/filesystem/file system/g as discussed on -developerstrhodes2002-08-211-3/+3
|
* Change utimes to set the file creation time (for filesystems thatmckusick2002-07-171-4/+4
| | | | | | | | support creation times such as UFS2) to the value of the modification time if the value of the modification time is older than the current creation time. See utimes(2) for further details. Sponsored by: DARPA & NAI Labs.
* Oops, the previous revision (1.22) introduced a potential alignmentiedowse2002-07-081-15/+20
| | | | | | | | | issue, since the MAXBSIZE-sized buffers are accessed as arrays of block pointers, but were declared as char[] arrays. Use a union to avoid this, which also makes a number of casts unnecessary. Pointed out by: bde Reviewed by: bde
* Use a fixed MAXBSIZE-size auto array instead of a static pointeriedowse2002-07-081-6/+2
| | | | | | | | | to a malloc'd buffer in dmpindir() and dirindir(). These functions recursively call themselves to handle deeper levels of indirect blocks, so a single static buffer was not suitable. Bug tracked down by: Don Lewis <dl-freebsd@catspoiler.org> Approach suggested by: bde
* Replace the use of %qd with intmax_t/%jd and fix a number of -Walliedowse2002-07-081-12/+12
| | | | | | | 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.
* Fix some printf format errors.iedowse2002-07-071-5/+5
| | | | Submitted by: Don Lewis <dl-freebsd@catspoiler.org>
* This commit adds basic support for the UFS2 filesystem. The UFS2mckusick2002-06-211-73/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* s/daddr_t/ufs_daddr_t/gphk2002-06-061-12/+12
| | | | | | This should fix the issues which cropped up after daddr_t grew up. Sponsored by: DARPA & NAI Labs.
* o remove __Pimp2002-03-201-53/+19
| | | | | o Use ANSI function definitions o unifdef -D__STDC__
* Files in subdirectories of directories that have the nodump flag setobrien2001-12-051-2/+5
| | | | | | | | | | | | | 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). PR: 32414 Submitted by: David C Lawrence <tale@dd.org>
* Zap a number of #ifdef sunos blocks, and all of the `register'iedowse2001-11-171-24/+17
| | | | keywords.
* Convert two instances of a lseek()+read() combination to a pread().mikeh2001-07-011-8/+4
| | | | | PR: bin/17640 MFC after: 2 weeks
* Fix bogon with the nodump flag.jkh2001-04-191-5/+10
| | | | Submitted by: Dima Dorfman <dima@unixfreak.org>
* Support inheritance of the "nodump" flag down a hierarchy.obrien2001-03-031-26/+66
| | | | | Submitted by: Dima Dorfman <dima@unixfreak.org> Obtained from: NetBSD
* Add include of errno.h where needed, remove extern int errno where not.imp2000-04-141-1/+1
| | | | These commits were inspired by a similar commit to netbsd.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Fix nested if/else within an ifbillf1999-07-081-2/+3
|
* 64bit fixes.dima1998-10-271-4/+4
| | | | | | | (Note: ``dump'' doesn't work on alpha yet. Apparently there's a problem somewhere is the physio() area) Submitted by: myself && Matt Dillon.
* Correct use of .Nm. Add rcsid. Remove unused #includes.charnier1998-06-151-1/+4
|
* Merge Lite2 changes (rather bigish, the dump/restore folks should check)peter1997-03-111-6/+5
|
* Update CHANGEDSINCE macro to conform to -current dinode.hjkh1997-02-161-5/+0
|
* ts_sec -> tv_secnate1996-09-201-1/+1
| | | | ts_nsec -> tv_nsec
* When using dump/rdump on large filesytems (my case 3 GB), the lseekjoerg1995-06-241-2/+4
| | | | | | | | | | claims multiple times to have failed. The problem is a off_t is converted into a int and checked for a negative. A true lseek check should be checking if the off_t is equal to -1 for failure. (Suggested fix from PR #bin/461) Submitted by: mark tinguely <tinguely@opus.cs.ndsu.NoDak.edu>
* Remove trailing whitespace.rgrimes1995-05-301-2/+2
|
* BSD 4.4 Lite sbin Sourcesrgrimes1994-05-261-0/+613
Note: XNSrouted and routed NOT imported here, they shall be imported with usr.sbin.
OpenPOWER on IntegriCloud