summaryrefslogtreecommitdiffstats
path: root/sbin/fsck_ffs
Commit message (Collapse)AuthorAgeFilesLines
* MFC r314655:ngie2017-05-301-2/+2
| | | | | | bin: normalize paths using SRCTOP-relative paths or :H when possible This simplifies make logic/output
* MFC r317283:pfg2017-05-064-11/+10
| | | | | | | | | | | fsck_ffs: Unsign some variables and make use of reallocarray(3). Instead of casting listmax and numdirs to unsigned values just define them as unsigned and avoid the casts. Use reallocarray(3). While here, fs_ncg is already unsigned so the cast is unnecessary. Reviewed by: mckusick
* MFC r316852:kib2017-04-211-4/+7
| | | | | | In fsck_ffs pass1, prevent the inosused variable from wrapping. PR: 218592
* MFC r313745:garga2017-02-212-42/+44
| | | | | | | | | | | | | * Add missing parameters to usage() * Add missing parameters to manpage synopsis * Add missing description of -d flag * Sort flags descriptions Reviewed by: allanjude, kib Approved by: allanjude MFC after: 1 week Sponsored by: Rubicon Communications (Netgate) Differential Revision: https://reviews.freebsd.org/D9152
* MFC r311522:kib2017-01-131-22/+32
| | | | Use type-independent formats for printing nlink_t and ino_t.
* MFC 304438:mckusick2016-10-174-13/+15
| | | | | Fsck_ufs was using an int rather than a ufs2_daddr_t to store the alternate superblock location when given in the -b option.
* MFC r306734:sevan2016-10-161-4/+15
| | | | | | | | | Add history section to fsck_ffs(8) Move sentence to a new line as advised by igor. PR: 212474 Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D8104
* fsck_ffs: Don't overrun mount device buffercem2016-05-111-0/+3
| | | | | | | | | | | | Maybe this case is impossible. Either way, when attempting to "/dev/"-prefix a non-global device name, check that we do not overrun the f_mntfromname buffer. In this case, truncating (with strlcpy or similar) would not be useful, since the f_mntfromname result of getmntpt() is passed directly to open(2) later. Reported by: Coverity CID: 1006789 Sponsored by: EMC / Isilon Storage Division
* Use MIN/MAX macros from sys/param.h.araujo2016-05-024-11/+6
| | | | MFC after: 2 weeks.
* sbin: ake use of our rounddown() macro when sys/param.h is available.pfg2016-05-012-2/+2
| | | | No functional change.
* fsck_ffs: Revert partially the unsigned changes.pfg2016-04-271-1/+1
| | | | | | | | | Any value of uint16_t will be internally promoted to int so changing them to an unsigned value doesn't help. Missing revert value in suj_read(). X-MFC with: r298551
* fsck_ffs: Revert partially the unsigned changes.pfg2016-04-271-3/+3
| | | | | | | | | Any value of uint16_t will be internally promoted to int so changing them to an unsigned value doesn't help. Make clear we want to use uint32_t for closedisk() X-MFC with: r298551
* fsck_ffs: Adopt some type safety for the journalling checks.pfg2016-04-241-4/+4
| | | | | | | | | fs_ncg is of type uint32, and we were indexing it with an int. Fixed this using an unsigned type and adopt some other unsigned indexes to remind us when we are dealing with unsigned numbers. Reviewed by: mckusick MFC after: 5 days
* 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
OpenPOWER on IntegriCloud