Commit Graph

233 Commits

Author SHA1 Message Date
xtraeme
52781d1897 Kill __P(), ANSIfy and WARNS=2 2005-01-19 17:33:58 +00:00
wiz
442b6cb908 Add -P to usage. 2005-01-19 16:42:14 +00:00
wiz
b15d62ff8b Sort options. Bump date for -P. Remove superfluous -. 2005-01-19 16:41:04 +00:00
christos
d90f13b3bf Use -DPROGRESS to enable the progress bar, don't depend on SMALL. 2005-01-13 19:56:02 +00:00
christos
a73c2bd574 Add a progress meter to fsck_ffs based on the work by thorpej presented
to the mailing lists last January. This is optional.
2005-01-13 15:22:35 +00:00
dsl
09993d7a4e Rewrite getdisklabelpart() to avoid problems with isdigit(*ch_ptr) and
an incorrect check for a (probably impossible) empty string.
Add comments to avoid confusion...
2004-10-29 19:02:17 +00:00
dbj
0f5aab3826 always print warning and return non-zero exit when there are unresolved inconsistencies. 2004-10-11 15:24:09 +00:00
ragge
801400d3c7 Cast to (long long int) to make last change compile on amd64. 2004-10-09 20:08:44 +00:00
dbj
43cd78416c when allocating inodes, such as for the lost+found directory,
extend the inostat array if needed.  Otherwise, inoinfo() will
return the static "unallocated" inode template, which was
getting improperly modified.
Before this fix, any time the lost+found directory got created,
fsck would set all of the inode/directory counts wrong since
suddenly unallocated inodes would turn into directory inodes
2004-10-08 17:33:52 +00:00
dbj
6ca6b809d3 have allocdir fail cleanly when allocino fails 2004-10-08 17:29:29 +00:00
dbj
a10669f5c2 if debug, print found/expected block & inode counts when incorrect 2004-10-08 16:42:55 +00:00
mycroft
20f54b189f Reduce memory usage slightly. 2004-07-20 15:05:32 +00:00
wiz
0747ba10a5 Add -a to usage. Closes PR 25916 by Kouichirou Hiratsuka. 2004-06-25 14:50:15 +00:00
mycroft
b98bb8c608 Use pread()/pwrite(). 2004-06-12 01:35:46 +00:00
fair
0b112129b9 Correct a misnumbering of options, as noted in PR 25784. 2004-06-02 19:27:24 +00:00
hannken
8c21bc6224 Add ffs internal snapshots. Written by Marshall Kirk McKusick for FreeBSD.
- Not enabled by default. Needs kernel option FFS_SNAPSHOT.
- Change parameters of ffs_blkfree.
- Let the copy-on-write functions return an error so spec_strategy
    may fail if the copy-on-write fails.
- Change genfs_*lock*() to use vp->v_vnlock instead of &vp->v_lock.
- Add flag B_METAONLY to VOP_BALLOC to return indirect block buffer.
- Add a function ffs_checkfreefile needed for snapshot creation.
- Add special handling of snapshot files:
    Snapshots may not be opened for writing and the attributes are read-only.
    Use the mtime as the time this snapshot was taken.
    Deny mtime updates for snapshot files.
- Add function transferlockers to transfer any waiting processes from
  one lock to another.
- Add vfsop VFS_SNAPSHOT to take a snapshot and make it accessible through
  a vnode.
- Add snapshot support to ls, fsck_ffs and dump.

Welcome to 2.0F.

Approved by: Jason R. Thorpe <thorpej@netbsd.org>
2004-05-25 14:54:55 +00:00
wiz
65a50720b0 Various improvements; mostly mention arguments of flags by name to
simplify the description and improve lists.
2004-05-05 14:30:59 +00:00
dbj
78877ce800 fix 64bit bug in chkrange()
problem noticed by nathanw
fix from freebsd
2004-04-26 23:46:22 +00:00
christos
6bd1d6d4db Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.
2004-04-21 01:05:31 +00:00
dbj
f1e11b338f add support for downgrading a filesystem fslevel from 4 to 3 2004-04-14 17:37:11 +00:00
dbj
0270c91526 set fs_old_nrpos to 1 when doing -c4 upgrade.
This isn't used by kernel, but does affect cg layout slightly
2004-04-14 17:35:19 +00:00
dbj
069e170f1c fix range error when swapping postbl for compatibility 2004-04-13 22:36:36 +00:00
dbj
ea34a908d3 fix whitespace in debug printf 2004-04-12 06:28:05 +00:00
dsl
2dc6ea479c Don't use an ffsv1 superblock from 64k (SBLOCK_UFS2) when looking
for the main filesystem superblock.
64k is the offset of the first alternate if the blocksize if 64k.
Fixes part of PR kern/24809
2004-03-21 20:01:41 +00:00
dbj
ab48f19cba don't calculate fake superblock used for finding alternate superblocks
if the disklabel is missing the cpg parameter.  Also print a warning
if this is skipped because of a missing fsize, frag or cpg disklabel parameter
this fixes a divide by zero error reported by martin@
2004-01-20 15:29:35 +00:00
dbj
67b7740914 print warning if the user specifies a conversion level greater than implemented 2004-01-17 22:17:07 +00:00
dbj
d3ee830d65 terminate preen message from previous with \n 2004-01-15 14:52:04 +00:00
dbj
e23f416c6b if the user specifies both -b and -p, then just go ahead and update
the primary superblock.
2004-01-15 14:49:28 +00:00
dbj
6300af6ca7 change the message "COVERTING TO FFSv2 SUPERBLOCK" to
"CONVERT TO NEW SUPERBLOCK LAYOUT" to help avoid confusion
2004-01-12 19:40:24 +00:00
mrg
2a3954efe6 - some KNF (80 cols)
- fix a printf format issue
2004-01-10 14:28:37 +00:00
wiz
cf9b70c6d4 Update Dd for previous and fix a case. 2004-01-09 23:42:11 +00:00
dbj
8f3b1a3c98 use %#llx instead of %llx when printing incorrect qfmask or qbmask 2004-01-09 22:23:18 +00:00
dbj
753116e06f do not upgrade superblock or set FS_FLAGS_UPDATED unless -c 4 option
is provided.
add compatibility for filesystems before FFSv2 integration
these patches are from pr port-macppc/23925 and should also
fix problems discussed in pr kern/21404 and pr kern/21283
2004-01-09 19:12:31 +00:00
jmmv
b635f565e7 Homogenize usage messages: make the 'usage' word all lowercase, as this seems
to be the most common practice in our tree.
2004-01-05 23:23:32 +00:00
dbj
1c65fb7cac fix logic for handling symlinks in inodes when isappleufs 2004-01-03 17:56:21 +00:00
dbj
1f5f1d50af when doing both -c 2 and -B, swap the blocks listed in the inode
of symlinks, since the swapping happens before the symlinks
are moved into the inode.
2004-01-03 17:27:35 +00:00
dbj
f491995334 fix paste-o in previous commit 2004-01-03 10:25:06 +00:00
dbj
f3786e90b7 fix bugs with unsigned comparison ofs fs_maxsymlinklen 2004-01-03 10:11:41 +00:00
dbj
9aad8f72b5 increase size of buffer used for updating symlinks with -c 1
otherwise, the block read will blow the stack
2004-01-03 10:07:02 +00:00
dbj
23d4eb34b2 add uuid field to apple ufs volume label 2004-01-02 05:08:57 +00:00
dbj
16c34ed5bc fix minor bug in buf cache statistic collecting 2003-12-29 11:42:09 +00:00
dsl
e69ce3e4bf Add a -q (quiet) option to print nothing for clean filesystems.
Support in fsck_ffs and stub in fsck_xxx.
Push a few more messages through pwarn() instead of printf() to ensure
disk name is shown.
2003-10-20 12:04:38 +00:00
itojun
731ae88ecd realloc pedant 2003-09-19 08:35:15 +00:00
agc
276d62f603 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22308, verified by myself.
2003-08-07 10:04:22 +00:00
agc
bf07c8719a Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22308, verified by myself.
2003-08-07 10:04:11 +00:00
itojun
0e4dc5229d use bounded string op 2003-07-13 08:16:15 +00:00
fvdl
fe36fefa1a Oops. The clearinode macro had the UFS2 case reversed, causing it to
zero out two inodes in the plain FFS case, since UFS2 dinodes are
twice as big.
2003-04-24 20:08:25 +00:00
fvdl
7b402ff9df If an alternate superblock is used, update the standard one correctly. 2003-04-14 18:50:52 +00:00
yamt
f5f20840e2 save and restore errno in signal handlers. 2003-04-13 10:22:40 +00:00
enami
e89481b248 Correctly detect a UFS1 file system of non-native endian. 2003-04-11 10:21:40 +00:00