summaryrefslogtreecommitdiffstats
path: root/sbin/fsck_ffs
Commit message (Collapse)AuthorAgeFilesLines
* Clear the pending counts in the superblock after a successful runmckusick2002-10-191-1/+4
| | | | | | | of fsck so that the kernel does not complain about them being non-zero when the filesystem is mounted. Sponsored by: DARPA & NAI Labs.
* When verifying a superblock, the lower bound on block size is MINBSIZEmckusick2002-10-101-1/+1
| | | | | | | (4096), not SBLOCKSIZE (8192). Submitted by: Tor.Egge@cvsup.no.freebsd.org Sponsored by: DARPA & NAI Labs.
* Use the standardized CHAR_BIT constant instead of NBBY in userland.mike2002-09-253-10/+13
|
* Add support to fsck_ffs to account for storage for extendedmckusick2002-09-241-1/+19
| | | | | | attributes. Sponsored by: DARPA & NAI Labs.
* Add a source file where EXTATTR checks will happen and hook it in evenphk2002-09-164-2/+93
| | | | | | if it doesn't do anything yet. Sponsored by: DARPA & NAI Labs.
* Fix some 'SYNOPSIS' and 'usage' messages.trhodes2002-08-271-1/+1
|
* Replace various spelling with FALLTHROUGH which is lint()ablecharnier2002-08-252-11/+13
|
* s/filesystem/file system/g as discussed on -developerstrhodes2002-08-2112-241/+241
|
* Fix more breakage due to FSTYPENAMES/DKTYPENAMES split.bmilekic2002-08-161-0/+1
| | | | Also submitted by: David Wolfskill <david@catwhisker.org>
* Don't '#define DKTYPENAMES', we don't use the variable it exposes fromalfred2002-08-161-1/+0
| | | | the header file.
* preen.c was a stragler after the fsck/fsck_ffs divorce.phk2002-08-091-282/+0
| | | | | | | | | | | | | | | fsck_ffs did not need it, but quotacheck did include it from fsck_ffs. A repocopy has now moved the fsck_ffs/preen.c file to quotacheck/preen.c quotacheck and fsck should probably use the same checkfstab() function and it should possibly live in libufs. Trouble is: they have diverged in the meantime. At least now fsck_ffs is not in the equation anymore. Sponsored by: DARPA & NAI Labs.
* Fix a bunch of format string warnings which brokemux2002-07-316-35/+43
| | | | | | the sparc64 build. Tested on: sparc64, i386
* Remove some additional paranoia which Kirk forgot to remove from hisphk2002-07-302-4/+2
| | | | | | | | | | | | | UFS2 commit. These bits in essence made any instance of "softupdates expected corrution", (ie blocks marked allocated but not referenced by an inode etc) result in a exit value for fsck_ffs of 2. 2 is part of the magic and appearantly undocumented protocol between fsck_FOO and fsck and means "dump into single user mode ASAP. Sponsored by: DARPA & NAI Labs.
* Warning cleanup.phk2002-07-3010-71/+71
| | | | Format changes by peter
* Remove the kernel file-size limit for UFS2, so that only the limitiedowse2002-06-261-1/+4
| | | | | | | | | | imposed by the filesystem structure itself remains. With 16k blocks, the maximum file size is now just over 128TB. For now, the UFS1 file size limit is left unchanged so as to remain consistent with RELENG_4, but it too could be removed in the future. Reviewed by: mckusick
* Fix an integer overflow that causes fsck_ffs to crash when itiedowse2002-06-261-1/+1
| | | | | | encounters very large file sizes in the filesystem. Reviewed by: mckusick
* This commit adds basic support for the UFS2 filesystem. The UFS2mckusick2002-06-2111-374/+477
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* more file system > filesystemtrhodes2002-05-168-187/+187
|
* UFS2 preparation commit:phk2002-05-128-221/+27
| | | | | | | Remove support for converting old FFS formats to newer. Submitted by: mckusick Sponspored by: DARPA & NAI Labs.
* Retire the bogus uses of the disklabel field d_sbsize and begin tophk2002-05-122-3/+1
| | | | | | | initialize it to zero so we don't have to have everbody and their aunt including FFS specific header files. Sponsored by: DARPA & NAI Labs.
* Minor bug fixes uncovered while working on UFS2.mckusick2002-05-022-2/+2
| | | | They should have no effect on existing systems.
* Usage style sweep: spell "usage" with a small 'u'.des2002-04-221-1/+1
| | | | | Also change one case of blatant __progname abuse (several more remain) This commit does not touch anything in src/{contrib,crypto,gnu}/.
* When checking the alternate superblock, we used to copy any fieldsmckusick2002-04-071-61/+25
| | | | | | | | | | | | | | that might have changed, then did a byte-by-byte comparison with the alternate. If any unused fields got used, they had to be added to the exception list. Such changes caused too many false alarms. So, I have changed the comparison algorithm to compare a selected set of fields that are not expected to change. This new algorithm causes far fewer false hits and still does a good job of detecting problems when they have really occurred. In particular, this change should ease the transition to kernels supporting UFS2 which make some significant changes to the superblock. Sponsored by: DARPA, NAI Labs
* Replace __progname with the documented, more acceptable and functionally ↵markm2002-03-241-5/+4
| | | | identical getprogname(3).
* o __P removedimp2002-03-2014-336/+181
| | | | | | | o ansi function prototypes o unifdef -D__STDC__ o __dead2 on usage prototype o remove now-bogus main prototype
* Remove 'register' keyword.obrien2002-03-2010-71/+71
| | | | | | It does not help modern compilers, and some may take some hit from it. (I also found several functions that listed *every* of its 10 local vars with "register" -- just how many free registers do people think machines have?)
* declare locally used globals as static.alfred2001-12-221-3/+3
|
* Ignore the value of fs_active when comparing superblocks.iedowse2001-12-171-0/+1
| | | | Noticed by: "Niels Chr. Bank-Pedersen" <ncbp@bank-pedersen.dk>
* Spellingcharnier2001-12-111-1/+1
|
* mdoc(7) police: section 1 and 8 manpages document their exitru2001-12-041-4/+2
| | | | | codes under the DIAGNOSTICS section, not RETURN VALUES, which is for section 2, 3, and 9 manpages.
* Actually I haven't enumerated the return values yet (thats why I hadn'tobrien2001-12-041-1/+1
| | | | | committed it yet). So vague'ize the wording a little bit to make up for it.
* Default to WARNS=2.obrien2001-12-042-1/+6
| | | | | | Binary builds that cannot handle this must explicitly set WARNS=0. Reviewed by: mike
* Fix a large number of -Wall, -Wformat and -W compiler warnings.iedowse2001-11-1711-59/+50
| | | | | | | | | These were mainly missing casts or wrong format strings in printf statements, but there were also missing includes, unused variables, functions and arguments. The choice of `long' vs `int' still seems almost random in a lot of places though.
* Give a more useful diagnostic when an extraneous hard link to aiedowse2001-11-171-1/+3
| | | | | | | | | | directory is encountered. This includes the full path of the directory that will be removed if the user answers "y" to the "REMOVE?" question. PR: bin/226851 Submitted by: KOIE Hide <hide@koie.org> MFC after: 1 week
* Silence non-constant format string warnings by marking functionskris2001-08-193-5/+5
| | | | | | | as __printflike()/__printf0like(), adding const, or adding missing "%s" format strings, as appropriate. MFC after: 2 weeks
* Remove whitespace at EOL.dd2001-07-151-11/+11
|
* Ignore the new superblock fields fs_pendingblocks and fs_pendinginodesiedowse2001-05-291-0/+2
| | | | | | | when comparing with the alternate superblock. These fields are used for temporary in-core information only. This should fix the "VALUES IN SUPER BLOCK DISAGREE WITH THOSE IN FIRST ALTERNATE" error from fsck_ffs that has been seen a lot recently.
* Just notify us once when encountering a partially allocated inode.mckusick2001-05-081-1/+1
|
* Update usage message with new options.mckusick2001-04-301-1/+1
| | | | Submitted by: Ruslan Ermilov <ru@FreeBSD.org>
* mdoc(7) police:ru2001-04-271-3/+3
| | | | document date updated, removed history info from the .Os call, cosmetics.
* Add support for the -F flag which determines whether a specifiedmckusick2001-04-245-83/+117
| | | | | | | | | | | | filesystem needs foreground checking (usually at boot time) or can defer to background checking (after the system is up and running). See the manual page, fsck_ffs(8), for details on the -F and -B options. These options are primarily intended for use by the fsck front end. All output is directed to stdout so that the output is coherent when redirected to a file or a pipe. Unify the code with the fsck front end that allows either a device or a mount point to be specified as the argument to be checked.
* In fsdb, call sblock_init() which is now necessary to initialiseiedowse2001-04-232-0/+2
| | | | | the global variable dev_bsize. Add a prototype for sblock_init() to fsck.h, and set the return type correctly.
* Minor background cleanups:mckusick2001-04-165-30/+87
| | | | | | | | | | | 1) Set the FS_NEEDSFSCK flag when unexpected problems are encountered. 2) Clear the FS_NEEDSFSCK flag after a successful foreground cleanup. 3) Refuse to run in background when the FS_NEEDSFSCK flag is set. 4) Avoid taking and removing a snapshot when the filesystem is already clean. 5) Properly implement the force cleaning (-f) flag when in preen mode. Note that you need to have revision 1.21 (date: 2001/04/14 05:26:28) of fs.h installed in <ufs/ffs/fs.h> defining FS_NEEDSFSCK for this to compile.
* mdoc(7) police: prepare for mdocNG.ru2001-04-161-1/+1
|
* Catch up to the dirpref changes by copying new fields in the alternatejhb2001-04-101-0/+3
| | | | | superblock from the original superblock so that differences in those new fields are ignored.
* Use fs->fs_ipg rather than cg->cg_niblk as the latter is onlymckusick2001-03-311-1/+1
| | | | | | 16-bits and may overflow. Obtained from: Bruce Evans <bde@zeta.org.au>
* - Backout botched attempt to introduce MANSECT feature.ru2001-03-261-0/+1
| | | | - MAN[1-9] -> MAN.
* Additions to run checks on live filesystems. This change will notmckusick2001-03-2111-168/+398
| | | | | | | | | affect current systems until fsck is modified to use these new facilities. To try out this change, set the fsck passno to zero in /etc/fstab to cause the filesystem to be mounted without running fsck, then run `fsck_ffs -p -B <filesystem>' after the system has been brought up multiuser to run a background cleanup on <filesystem>. Note that the <filesystem> in question must have soft updates enabled.
* Set the default manual section for sbin/ to 8.ru2001-03-201-1/+0
|
* Preceed/preceeding are not english words. Use precede or preceding.asmodai2001-02-181-1/+1
|
OpenPOWER on IntegriCloud