summaryrefslogtreecommitdiffstats
path: root/sbin/fsck_ffs
Commit message (Collapse)AuthorAgeFilesLines
* MFHgjb2016-04-161-1/+1
|\ | | | | | | Sponsored by: The FreeBSD Foundation
| * Cleanup unnecessary semicolons from utilities we all love.pfg2016-04-151-1/+1
| |
* | MFHgjb2016-04-139-16/+16
|\ \ | |/ | | | | Sponsored by: The FreeBSD Foundation
| * fsck_ffs for pointers replace 0 with NULL.pfg2016-04-129-16/+16
| | | | | | | | | | | | Found with devel/coccinelle. Reviewed by: mckusick
* | Explicitly add more files to the 'runtime' package.gjb2016-02-091-0/+1
|/ | | | Sponsored by: The FreeBSD Foundation
* Fix a ton of speelling errorseadler2015-10-212-2/+2
| | | | | | | arc lint is helpful Reviewed By: allanjude, wblock, #manpages, chris@bsdjunk.com Differential Revision: https://reviews.freebsd.org/D3337
* Add META_MODE support.sjg2015-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
| * dirdeps.mk now sets DEP_RELDIRsjg2015-06-081-2/+0
| |
| * Merge sync of headsjg2015-05-273-91/+4
| |\ | |/ |/|
| * Updated dependenciessjg2014-05-161-1/+0
| |
| * Updated dependenciessjg2014-05-101-0/+2
| |
| * Merge headsjg2014-04-2812-118/+362
| |\
| * \ Merge from headsjg2013-09-055-10/+81
| |\ \
| * \ \ sync from headsjg2013-04-1210-117/+385
| |\ \ \
| * | | | Updated dependenciessjg2013-03-111-0/+1
| | | | |
| * | | | Updated dependenciessjg2013-02-161-2/+0
| | | | |
| * | | | Sync with HEAD.obrien2013-02-081-10/+8
| |\ \ \ \
| | \ \ \ \
| | \ \ \ \
| | \ \ \ \
| | \ \ \ \
| *---. \ \ \ \ Sync from headsjg2012-11-049-123/+151
| |\ \ \ \ \ \ \
| * | | | | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.marcel2012-08-221-0/+20
| | |_|/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net>
* | | | | | | | Remove old ioctl use and support, once and for all.imp2015-01-061-89/+2
| | | | | | | |
* | | | | | | | Convert sbin/ to LIBADDbapt2014-11-252-2/+2
| |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | Reduce overlinking
* | | | | | | Avoid segment fault when attempting to clean up cylinder groupmckusick2014-03-121-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | buffer cache. PR: 187221 Submitted by: Petr Lampa <lampa@fit.vutbr.cz> Obtained from: Petr Lampa <lampa@fit.vutbr.cz> MFC after: 1 week
* | | | | | | Arguments for malloc and calloc should be size_t, not int.mckusick2014-02-252-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use proper bounds check when trying to free cached memory. Spotted by: Xin Li Tested by: Dmitry Sivachenko MFC after: 2 weeks
* | | | | | | Add globs.c, missed in r260068,260069scottl2013-12-301-0/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Submitted by: peter Obtained from: Netflix MFC after: 3 Days
* | | | | | | Add the -R option to allow fsck_ffs to restart itself when too many criticalscottl2013-12-3010-108/+183
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | errors have been detected in a particular run. Clean up the global state variables so that a restart can happen correctly. Separate the global variables in fsck_ffs and fsdb to their own file. This fixes header sharing with fscd. Correctly initialize, static-ize, and remove global variables as needed in dir.c. This fixes a problem with lost+found directories that was causing a segfault. Correctly initialize, static-ize, and remove global variables as needed in suj.c. Initialize the suj globals before allocating the disk object, not after. Also ensure that 'preen' mode doesn't conflict with 'restart' mode Submitted by: scottl, max Reviewed by: max, mckusick (earlier version) Obtained from: Netflix MFC after: 3 days
* | | | | | | UFS2: make di_extsize unsigned.pfg2013-10-241-1/+1
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | di_extsize is the EA size and as such it should be unsigned. Adjust related types for consistency. Reviewed by: mckusick (previous version) MFC after: 3 weeks
* | | | | | Fix the zeroing loop. I must have been drunk when I wrote this...des2013-08-201-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | MFC after: 3 days
* | | | | | Document the -S flag to fsck_ffsscottl2013-07-311-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | Obtained from: Netflix
* | | | | | Add a 'surrender' mode to fsck_ffs. With the -S flag, once hard read errorsscottl2013-07-303-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | are encountered, the fsck will stop instead of wasting time chewing through possibly other errors. Obtained from: Netflix MFC after: 3 days
* | | | | | Style nit.des2013-04-291-1/+2
| | | | | |
* | | | | | Add a -Z option which zeroes unused blocks. It can be combined with -E,des2013-04-295-7/+56
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | in which case unused blocks are first zeroed and then erased. Reviewed by: mckusick MFC after: 3 weeks
* | | | | Note that output is in seconds, not msec.mckusick2013-03-241-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | KNF indentation. No functional change. No change to printf strings. No change to casting of printf arguments. Reported by: Bruce Evans
* | | | | Resolve clang compile errors on amd64/i386 for certain by casting.sbruno2013-03-241-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | compile tested with clang on i386, amd64 compile tested with gcc on i386, amd64, sparc64 Submitted by: delphij
* | | | | Minor formatting fix for printf() to fix clang builds.sbruno2013-03-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Submitted by: db Reviewed by: gjb
* | | | | Revert 248634 and 248643 (e.g., restoring 248625 and 248639).mckusick2013-03-237-56/+154
| | | | | | | | | | | | | | | | | | | | Build verified by: Glen Barber (gjb@)
* | | | | Revert svn r248625sbruno2013-03-237-154/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clang errors around printf could be trivially fixed, but the breakage in sbin/fsdb were to significant for this type of change. Submitter of this changeset has been notified and hopefully this can be restored soon.
* | | | | Speed up fsck by caching the cylinder group maps in pass1 somckusick2013-03-227-56/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that they do not need to be read again in pass5. As this nearly doubles the memory requirement for fsck, the cache is thrown away if other memory needs in fsck would otherwise fail. Thus, the memory footprint of fsck remains unchanged in memory constrained environments. This work was inspired by a paper presented at Usenix's FAST '13: www.usenix.org/conference/fast13/ffsck-fast-file-system-checker Details of this implementation appears in the April 2013 of ;login: www.usenix.org/publications/login/april-2013-volume-38-number-2. A copy of the April 2013 ;login: paper can also be downloaded from: www.mckusick.com/publications/faster_fsck.pdf. Reviewed by: kib Tested by: Peter Holm MFC after: 4 weeks
* | | | | Fix ARM build by assigning the computed time here tokientzle2013-02-251-2/+2
| | | | | | | | | | | | | | | | | | | | a variable of the right type for printf.
* | | | | When running with the -d option, instrument fsck_ffs to track the number,mckusick2013-02-247-37/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | data type, and running time of its I/O operations. No functional changes.
* | | | | Update fsck_ffs buffer cache manager to use TAILQ macros.mckusick2013-02-152-31/+31
| |_|_|/ |/| | | | | | | | | | | No functional changes.
* | | | - blk_equals() is too strict. If the journal entry defines more fragsjeff2012-11-141-10/+8
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | than we're claiming it should still be considered an exact match. This would previously leak frags that had been extended. - If there is a sequence number problem in the journal print the sequence numbers we've seen so far for debugging. - Clean up the block mask related debuging printfs. Some are redundant. MFC after: 1 week
* | | Fix some nearby type and style errors.mdf2012-09-283-17/+14
| | | | | | | | | | | | Pointed out by: bde
* | | Fix sbin/ build with a 64-bit ino_t.mdf2012-09-271-1/+1
| | | | | | | | | | | | Original code by: Gleb Kurtsou
* | | Fix fsck_ffs build with a 64-bit ino_t.mdf2012-09-278-85/+103
| | | | | | | | | | | | Original code by: Gleb Kurtsou
* | | - Fix a typo in debug message.zont2012-09-131-1/+1
| | | | | | | | | | | | | | | Approved by: kib (mentor) MFC after: 3 days
* | | Remove needless (int) casts of write(2)'s 3rd argument.obrien2012-09-122-5/+5
| | | | | | | | | | | | | | | Also change blwrite() 'size' parameter to a ssize_t to better match write(2).
* | | Simply printf-like strings and outdent strings so that it is easy to seeobrien2012-09-121-20/+18
| | | | | | | | | | | | if they fit on a standard terminal.
* | | fsck_ffs shall accept the configured journal size, and not refuse tokib2012-08-021-1/+1
| |/ |/| | | | | | | | | | | | | | | | | operate on it if journal size is greater then SUJ_MAX. The later constant is only to select maximal journal size when user did not specified size explicitely. Submitted by: Andrey Zonov <andrey@zonov.org> Reviewed by: mckusick MFC after: 1 week
* | For incompleted block allocations or frees, the inode block count usagekib2012-06-121-0/+15
|/ | | | | | | | | | | | | | | must be recalculated. The blk_check pass of suj checker explicitely marks inodes which owned such blocks as needing block count adjustment. But ino_adjblks() is only called by cg_trunc pass, which is performed before blk_check. As result, the block use count for such inodes is left wrong. This causes full fsck run after journaled run to still find inconsistencies like 'INCORRECT BLOCK COUNT I=14557 (328 should be 0)' in phase 1. Fix this issue by running additional adj_blk pass after blk_check, which updates the field. Reviewed by: jeff, mckusick MFC after: 1 week
* Be more helpful about alternate superblocks.trasz2012-02-102-2/+7
|
OpenPOWER on IntegriCloud