aboutsummaryrefslogtreecommitdiff
path: root/sbin/dump
Commit message (Collapse)AuthorAgeFilesLines
* Clean up some function and variable names.Colin Percival2020-06-231-61/+61
| | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=362557
* dump(8): Reapply slightly modified r362422Conrad Meyer2020-06-201-126/+126
| | | | | | | | Go ahead and replace the distasteful slave language for worker processes with the straightforward description, "worker(s)." Notes: svn path=/head/; revision=362447
* Revert -r362422.Warner Losh2020-06-201-126/+126
| | | | | | | | While whimsical, there's too much negative energy around minion as well as the positive. Notes: svn path=/head/; revision=362444
* Increase the whimsy in this file by famring dump's work out to minions. AdjustWarner Losh2020-06-201-126/+126
| | | | | | | | variables accordingly. Thankfully, we are able to do this without additional banana expenditures. Notes: svn path=/head/; revision=362422
* Clean up global variable declarations in the dump and restoreKirk McKusick2020-04-046-66/+90
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=359627
* Clarify that the -r and -R options can be used only to create level 0 dumps.Kirk McKusick2019-06-141-1/+13
| | | | | | | | Suggested by: phk MFC after: 3 days Notes: svn path=/head/; revision=349032
* Normally when an attempt is made to mount a UFS/FFS filesystem whoseKirk McKusick2018-12-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | superblock has a check-hash error, an error message noting the superblock check-hash failure is printed and the mount fails. The administrator then runs fsck to repair the filesystem and when successful, the filesystem can once again be mounted. This approach fails if the filesystem in question is a root filesystem from which you are trying to boot. Here, the loader fails when trying to access the filesystem to get the kernel to boot. So it is necessary to allow the loader to ignore the superblock check-hash error and make a best effort to read the kernel. The filesystem may be suffiently corrupted that the read attempt fails, but there is no harm in trying since the loader makes no attempt to write to the filesystem. Once the kernel is loaded and starts to run, it attempts to mount its root filesystem. Once again, failure means that it breaks to its prompt to ask where to get its root filesystem. Unless you have an alternate root filesystem, you are stuck. Since the root filesystem is initially mounted read-only, it is safe to make an attempt to mount the root filesystem with the failed superblock check-hash. Thus, when asked to mount a root filesystem with a failed superblock check-hash, the kernel prints a warning message that the root filesystem superblock check-hash needs repair, but notes that it is ignoring the error and proceeding. It does mark the filesystem as needing an fsck which prevents it from being enabled for writing until fsck has been run on it. The net effect is that the reboot fails to single user, but at least at that point the administrator has the tools at hand to fix the problem. Reported by: Rick Macklem (rmacklem@) Discussed with: Warner Losh (imp@) Sponsored by: Netflix Notes: svn path=/head/; revision=341608
* Fix build break from dump incompatibility I introduced in -r340411Kirk McKusick2018-11-143-7/+7
| | | | | | | Pointy-hat to: mckusick Notes: svn path=/head/; revision=340422
* Plug build break after r340411.Gleb Smirnoff2018-11-133-7/+7
| | | | Notes: svn path=/head/; revision=340416
* Move dumpdates creation to CONFS=Brad Davis2018-07-261-0/+4
| | | | | | | | Approved by: bapt (mentor) Differential Revision: https://reviews.freebsd.org/D16435 Notes: svn path=/head/; revision=336742
* Revert size limits.Warner Losh2018-06-112-9/+1
| | | | | | | | | The size limits came from a flawed understanding of dump records. The real issue was that dump was bogusly interpreting c_count sometimes. r334978 fixes that. Notes: svn path=/head/; revision=334980
* Fix a bug in the counting of blks.Warner Losh2018-06-111-1/+2
| | | | | | | | | | | | | 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@ Notes: svn path=/head/; revision=334979
* Don't initialize c_count. We don't need to.Warner Losh2018-06-111-2/+2
| | | | Notes: svn path=/head/; revision=334974
* Minor style polishing.Warner Losh2018-06-111-2/+1
| | | | | | | | | Declare c_count and initialize it with other ints. Reported by: mjg@ Notes: svn path=/head/; revision=334972
* Document the newly enforced 524288 inode restriction.Warner Losh2018-06-111-1/+6
| | | | Notes: svn path=/head/; revision=334971
* Add asserts to prevent overflows of c_addr.Warner Losh2018-06-112-0/+6
| | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=334969
* Large file systems with inodes > 512K have been silently overflowingDiane Bruce2018-06-111-1/+4
| | | | | | | | | | | | | c_addr in spcl. So check before we start dumping otherwise we can end up with a corrupted dump. PR: 228807 Submitted by: db Reviewed by: imp Approved by: imp Notes: svn path=/head/; revision=334968
* Ensure proper initialization of superblock.Kirk McKusick2018-06-071-0/+1
| | | | | | | Submitted by: Diane Bruce Notes: svn path=/head/; revision=334814
* Revert r313780 (UFS_ prefix)Ed Maste2018-03-172-12/+12
| | | | Notes: svn path=/head/; revision=331095
* Prefix UFS symbols with UFS_ to reduce namespace pollutionEd Maste2018-03-172-12/+12
| | | | | | | | | | | | | Followup to r313780. Also prefix ext2's and nandfs's versions with EXT2_ and NANDFS_. Reported by: kib Reviewed by: kib, mckusick Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D9623 Notes: svn path=/head/; revision=331083
* Refactoring of reading and writing of the UFS/FFS superblock.Kirk McKusick2018-01-263-19/+12
| | | | | | | | | | | | | | | Specifically reading is done if ffs_sbget() and writing is done in ffs_sbput(). These functions are exported to libufs via the sbget() and sbput() functions which then used in the various filesystem utilities. This work is in preparation for adding subperblock check hashes. No functional change intended. Reviewed by: kib Notes: svn path=/head/; revision=328426
* In preparation for converting to libufs to read the superblock,Kirk McKusick2017-12-274-17/+17
| | | | | | | | | | | | change conflicting function names: getino => getinode bread => blkread No functional change. Notes: svn path=/head/; revision=327253
* General further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-209-1/+19
| | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=326025
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Renumber copyright clause 4Warner Losh2017-02-2810-10/+10
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=314436
* prefix UFS symbols with UFS_ to reduce namespace pollutionEd Maste2017-02-151-19/+18
| | | | | | | | | | | | | | | | | | | | | Specifically: ROOTINO -> UFS_ROOTINO WINO -> UFS_WINO NXADDR -> UFS_NXADDR NDADDR -> UFS_NDADDR NIADDR -> UFS_NIADDR MAXSYMLINKLEN_UFS[12] -> UFS[12]_MAXSYMLINKLEN (for consistency) Also prefix ext2's and nandfs's NDADDR and NIADDR with EXT2_ and NANDFS_ Reviewed by: kib, mckusick Obtained from: NetBSD MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D9536 Notes: svn path=/head/; revision=313780
* dump(8) first appeared in V4 UNIXSevan Janiyan2016-10-021-2/+2
| | | | | | | | | | | | | http://minnie.tuhs.org/cgi-bin/utree.pl?file=V4/man/man8 PR: 212444 Approved by: bcr (mentor) Obtained from: TUHS MFC after: 4 days Differential Revision: https://reviews.freebsd.org/D8105 Notes: svn path=/head/; revision=306600
* sbin: ake use of our rounddown() macro when sys/param.h is available.Pedro F. Giffuni2016-05-011-1/+1
| | | | | | | No functional change. Notes: svn path=/head/; revision=298872
* dump: use NULL instead of zero for pointers.Pedro F. Giffuni2016-04-192-6/+5
| | | | | | | Clean out the casts from calloc(3) while here. Notes: svn path=/head/; revision=298288
* Use NULL instead of 0.Marcelo Araujo2016-04-191-1/+1
| | | | | | | | | malloc will return NULL in case it cannot allocate memory. MFC after: 2 weeks. Notes: svn path=/head/; revision=298235
* MFHGlen Barber2016-04-161-1/+1
|\ | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=298092
| * Cleanup unnecessary semicolons from utilities we all love.Pedro F. Giffuni2016-04-151-1/+1
| | | | | | | | Notes: svn path=/head/; revision=298089
* | Explicitly add more files to the 'runtime' package.Glen Barber2016-02-091-0/+1
|/ | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295450
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+19
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge from head@274682Simon J. Gerraty2014-11-191-1/+6
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=274683
| * Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * Sync with HEAD.David E. O'Brien2013-02-081-1/+1
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246555
| * \ Sync from headSimon J. Gerraty2012-11-041-5/+6
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=242545
| * | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | | Fix a bug which could break extended attributes in a dump output.Hiroki Sato2014-09-101-1/+6
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This occurred when a file was >892kB long and had a large data (>1kB) in the extended attributes. Reported by: Masashi Toriumi Reviewed by: mckusick Notes: svn path=/head/; revision=271411
* | | Mark non-returning function as suchEitan Adler2012-11-291-1/+1
| |/ |/| | | | | | | | | | | | | | | PR: bin/172978 Approved by: cperciva MFC after: 3 days Notes: svn path=/head/; revision=243665
* | Fix sbin/ build with a 64-bit ino_t.Matthew D Fleming2012-09-271-5/+6
|/ | | | | | | Original code by: Gleb Kurtsou Notes: svn path=/head/; revision=241013
* mdoc: move two sentences from synopsis to description (where they reallyJoel Dahl2012-05-231-10/+8
| | | | | | | belong). With this change, mandoc now formats these manpages properly. Notes: svn path=/head/; revision=235837
* Replace index() and rindex() calls with strchr() and strrchr().Ed Schouten2012-01-031-1/+1
| | | | | | | | | | | | | The index() and rindex() functions were marked LEGACY in the 2001 revision of POSIX and were subsequently removed from the 2008 revision. The strchr() and strrchr() functions are part of the C standard. This makes the source code a lot more consistent, as most of these C files also call into other str*() routines. In fact, about a dozen already perform strchr() calls. Notes: svn path=/head/; revision=229403
* The current /etc/dumpdates file restricts device names to 32 characters.Kirk McKusick2011-10-182-3/+7
| | | | | | | | | | | | | | | | | | | | With the addition of various GEOM layers some device names now exceed this length, for example /dev/mirror/encrypted.elig.journal. This change expands the field to 53 bytes which brings the /etc/dumpdates lines to 80 characters. Exceeding 80 characters makes the /etc/dumpdates file much less human readable. A test is added to dump so that it verifies that the device name will fit in the 53 character field failing the dump if it is too long. This change has been checked to verify that its /etc/dumpdates file is compatible with older versions of dump. Reported by: Martin Sugioarto <martin@sugioarto.com> PR: kern/160678 MFC after: 3 weeks Notes: svn path=/head/; revision=226520
* The dump, fsck_ffs, fsdb, fsirand, newfs, makefs, and quot utilitiesKirk McKusick2011-01-244-4/+4
| | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=217769