summaryrefslogtreecommitdiffstats
path: root/sbin/fsck_ffs/fsck.h
Commit message (Collapse)AuthorAgeFilesLines
* Add a source file where EXTATTR checks will happen and hook it in evenphk2002-09-161-0/+1
| | | | | | if it doesn't do anything yet. Sponsored by: DARPA & NAI Labs.
* s/filesystem/file system/g as discussed on -developerstrhodes2002-08-211-10/+10
|
* Warning cleanup.phk2002-07-301-11/+12
| | | | Format changes by peter
* This commit adds basic support for the UFS2 filesystem. The UFS2mckusick2002-06-211-32/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-161-8/+8
|
* UFS2 preparation commit:phk2002-05-121-3/+0
| | | | | | | Remove support for converting old FFS formats to newer. Submitted by: mckusick Sponspored by: DARPA & NAI Labs.
* o __P removedimp2002-03-201-64/+64
| | | | | | | o ansi function prototypes o unifdef -D__STDC__ o __dead2 on usage prototype o remove now-bogus main prototype
* Fix a large number of -Wall, -Wformat and -W compiler warnings.iedowse2001-11-171-5/+6
| | | | | | | | | 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.
* Silence non-constant format string warnings by marking functionskris2001-08-191-3/+3
| | | | | | | as __printflike()/__printf0like(), adding const, or adding missing "%s" format strings, as appropriate. MFC after: 2 weeks
* Add support for the -F flag which determines whether a specifiedmckusick2001-04-241-0/+1
| | | | | | | | | | | | 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-231-0/+1
| | | | | 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-161-1/+1
| | | | | | | | | | | 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.
* Additions to run checks on live filesystems. This change will notmckusick2001-03-211-4/+17
| | | | | | | | | 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.
* Add a simple SIGINFO handler to fsck_ffs. Shortly after receipt ofiedowse2000-12-151-0/+3
| | | | | | | | a SIGINFO (normally via Ctrl-T), a line will be output indicating the current phase number and progress information relevant to the current phase. Approved by: mckusick
* Reviewed by: rwatson, bpadrian2000-10-091-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Approved by: rwatson Obtained from: NetBSD-current source tree The beginnings of the fsck wrappers stuff from NetBSD. This particular commit brings a newly repo-copied sbin/fsck_ffs/ (from sbin/fsck/) into fsck wrappers mode. A quick overview (the code reflects this): * Documentation changed to reflect fsck_ffs instead of fsck * Simply acts on a single filesystem, doesn't try to do any multiple filesystem magic - this is done by the fsck wrappers now And then specific to fsck_ffs: * link to /sbin/fsck_4.2bsd and /sbin/fsck_ufs. This is because right now the filesystem is of type ufs not ffs, and that during autodetection the labeltype rather than the VFS type is used - this is because when doing an autodetection of filesystem type in the fsck wrapper program, it does not have any link between label type (4.2bsd, vinum, etc) and VFS string. Note that this shouldn't break a build since the required buildworld Makefile magic and import of the fsck wrapper code into src/sbin/fsck/ will happen in a seperate commit.
* Teach fsck about snapshot files. These changes should have nomckusick2000-07-061-2/+5
| | | | | | | effect on operation of fsck on filesystems without snapshots. If you get compilation errors, be sure that you have copies of /usr/include/sys/mount.h (1.94), /usr/include/sys/stat.h (1.21), and /usr/include/ufs/ffs/fs.h (1.16) as of July 4, 2000 or later.
* Yesterday I had to fix a badly broken disk, and found that fsck kept dying:mckusick2000-02-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DIR I=64512 CONNECTED. PARENT WAS I=4032 fsck: cannot find inode 995904 fsdb found the inodes with no problem: fsdb (inum: 64512)> inode 995904 current inode: directory I=995904 MODE=40777 SIZE=512 MTIME=Feb 14 15:27:07 2000 [0 nsec] CTIME=Feb 14 15:27:07 2000 [0 nsec] ATIME=Feb 24 10:31:58 2000 [0 nsec] OWNER=nobody GRP=nobody LINKCNT=4 FLAGS=0 BLKCNT=2 GEN=38a41386 Direct blocks: 8094568 0 0 0 0 0 0 0 0 0 0 0 Indirect blocks: 0 0 0 The problem turns out to be a program logic error in fsck. It stores directory inodes internally in hash lists, using the number of directories to form the hash key: inpp = &inphead[inumber % numdirs]; Elsewhere, however, it increments numdirs when it finds unattached directories. I've made the following fix, which solved the problem in the case in hand. Submitted by: Greg Lehey <grog@lemis.com> Reviewed by: Matthew Dillon <dillon@apollo.backplane.com> Approved by: Kirk McKusick <mckusick@mckusick.com>
* - Forgot to nuke hotroot completely.peter2000-01-101-1/+1
| | | | Submitted by: Paul Saab <ps@yahoo-inc.com>
* Reviewed by: Don Lewis <Don.Lewis@tsc.tdk.com>julian1998-12-031-14/+33
| | | | | | | | | | | | Submitted by: Kirk McKusick <mckusick@McKusick.COM> Obtained from: Mckusick, BSDI and a host of others This exactly matches Kirks sources imported under the Tag MCKUSICK2. These are as supplied by kirk with one small change needed to compile under freeBSD. Some FreeBSD patches will be added back, though many have been added to Kirk's sources already.
* Reviewed by: dyson@freebsd.org (john Dyson), dg@root.com (david greenman)julian1998-03-081-0/+2
| | | | | Submitted by: Kirk McKusick (mcKusick@mckusick.com) Obtained from: WHistle development tree
* Merge from Lite2. Note that Lite2 has it's own filesystem clean checkpeter1997-03-111-103/+91
| | | | | skipping code that overrides ours sooner. One should be eliminated, but for now it works.
* Fix the case where fsck would not see sparse directories and the kernel wouldguido1996-10-081-0/+1
| | | | | | | panic. If such a thing is fixed fsck needs a rerun (and bugs the user to do so). Reviewed by: Kirk McKusick
* Don't use __dead or __pure in user code. They were obfuscationsbde1996-09-141-2/+2
| | | | | | for gcc >= 2.5 and no-ops for gcc >= 2.6. Converted to use __dead2 or __pure2 where it wasn't already done, except in math.h where use of __pure was mostly wrong.
* Remove trailing whitespace.rgrimes1995-05-301-3/+3
|
* Update declaration to match the change made to dir.c a few hours ago.bde1995-04-021-1/+1
|
* Submitted by: phk, added to by bdebde1995-04-021-7/+83
| | | | Fix all the warnings from `gcc -Wall'.
* Added filesystem clean bit support. This only affects fsck during adg1994-08-201-0/+1
| | | | | | | preen (-p), and in that case the filesystem is skipped if it is clean. A new flag "-f" for 'force' has been added which basically gives back the old behavior of checking all the filesystems all the time. This very closely models the behavior of SunOS and Ultrix.
* BSD 4.4 Lite sbin Sourcesrgrimes1994-05-261-0/+215
Note: XNSrouted and routed NOT imported here, they shall be imported with usr.sbin.
OpenPOWER on IntegriCloud