Commit Graph

222 Commits

Author SHA1 Message Date
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
fvdl
774a28f33f Correctly deal with directories that need indirect blocks by adding
some code I missed in the UFS2 commit. Should fix false positives
seen by fsck_ffs on clean filesystems.

Thanks to Takahiro Kambe for debugging help.
2003-04-09 12:49:28 +00:00
fvdl
e06c710852 Swap the right blocks in an inode in the byteswapping case. 2003-04-08 14:59:52 +00:00
fvdl
750ed85d47 Write update some old fields when writing the superblock, similar to
ffs_oldfscompat_write() in the kernel. Use the old totals when
time < old_time (i.e. an old kernel or fsck wrote the filesystem last).
When setting the date back on a new kernel, that works out ok, since
new kernels always update both fields.
2003-04-06 17:23:25 +00:00
fvdl
8e4c90f49a Skip checks for old 4.2BSD filesystem; as it stands, we can't deal with
writing them. Could be fixed, but doesn't have a high priority.
2003-04-05 13:45:21 +00:00
fvdl
5f7172ed40 When fixing the cstotal structure, use the right size to copy it back.
Also, remove some accidentally committed debug code from the previous
commit.
2003-04-04 15:02:40 +00:00
fvdl
373feac024 Initialize cg_irotor correctly in newcg, to avoid false positives
for bad cylinder groups.
2003-04-04 13:45:21 +00:00
he
e75cb67772 On LP64 hosts, iswap64() result is "long int", so cast result to (long long)
before printing with %lld.
2003-04-02 22:27:09 +00:00
he
bfd92e95d2 The new UFS2 code uses memset(), so include <string.h> for prototype. 2003-04-02 22:25:56 +00:00
fvdl
42614ed3f3 Add support for UFS2. UFS2 is an enhanced FFS, adding support for
64 bit block pointers, extended attribute storage, and a few
other things.

This commit does not yet include the code to manipulate the extended
storage (for e.g. ACLs), this will be done later.

Originally written by Kirk McKusick and Network Associates Laboratories for
FreeBSD.
2003-04-02 10:39:19 +00:00
wiz
0acfa3bb9e Consistently spell occurrence with two rs. 2003-03-29 22:48:37 +00:00
wiz
990562bfef .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
2003-02-25 10:34:36 +00:00