Commit Graph

42 Commits

Author SHA1 Message Date
truckman
740b152e61 Reinstate 1.40 -- swap avgfilesize and avgfpdir column order.
MFC after:	3 days
2003-12-07 05:27:27 +00:00
truckman
273656faa6 I forgot about the code freeze, so back this out. 2003-12-01 00:33:57 +00:00
truckman
9fb5148c13 Swap avgfilesize and avgfpdir order to give better column alignment. 2003-12-01 00:32:34 +00:00
truckman
8f3b8e2d4e Print the dirpref avgfilesize and avgfpdir parameters.
MFC after:	2 weeks
2003-11-17 01:22:07 +00:00
johan
09222fa140 Make this WARNS=2 clean by
- using (intmax_t) and %j instead of %q

Tested by:	make universe
2003-11-14 13:13:23 +00:00
jmallett
8b207107b5 Marshal newfs -L (filesystem volume names), the names are not marshalled
with any quoting, but that should be OK for re-input, regardless.
2003-06-09 09:26:02 +00:00
mckusick
e2147eeb00 Correct lines incorrectly added to the copyright message. Add missing period.
Submitted by:	Bruce Evans <bde@zeta.org.au>
Sponsored by:   DARPA & NAI Labs.
2003-02-14 21:08:14 +00:00
gordon
d395af2fb2 Bring in support for volume labels to the filesystem utilities.
Reviewed by:	mckusick
2003-02-01 04:17:10 +00:00
njl
c804713000 Parse both old flags location and new one. Print out new flags including
acls, multilabel, and location updated.
2003-01-24 00:07:40 +00:00
jmallett
e3f329cf95 Kill initialisation and shadow warnings. Half-hearted cleanup (e.g. only the
more important ones) of format warnings.  XXX Lots of this assumes int32 can
be printed with %d.  Yuck.

Reviewed by:	bde
2003-01-19 12:13:47 +00:00
jmallett
eaa6ad0521 Add support to marshal a filesystem to a newfs(8) command that could be used
to create it.  A small number of options are not marshalled as they are things
it would be dumb to spit out, as they are used by internal computations, and
newfs may change them, or they may not be directly apparent.
2003-01-19 10:25:11 +00:00
jmallett
44d487430d Let libufs handle all the work with regard to going through a list of cgs, now. 2003-01-19 05:51:36 +00:00
jmallett
e6ae134def Use libufs to read one cylinder group from the disk at a time. 2003-01-19 01:31:49 +00:00
jmallett
a4c36c78c2 Simplify the main function now that libufs will hunt for the disk for us. 2003-01-19 01:02:25 +00:00
jmallett
9dfe4c44e6 Simplify conditional. 2003-01-18 04:20:20 +00:00
mckusick
559c7a3a76 Create a new 32-bit fs_flags word in the superblock. Add code to move
the old 8-bit fs_old_flags to the new location the first time that the
filesystem is mounted by a new kernel. One of the unused flags in
fs_old_flags is used to indicate that the flags have been moved.
Leave the fs_old_flags word intact so that it will work properly if
used on an old kernel.

Change the fs_sblockloc superblock location field to be in units
of bytes instead of in units of filesystem fragments. The old units
did not work properly when the fragment size exceeeded the superblock
size (8192). Update old fs_sblockloc values at the same time that
the flags are moved.

Suggested by:	BOUWSMA Barry <freebsd-misuser@netscum.dyndns.dk>
Sponsored by:   DARPA & NAI Labs.
2002-11-27 02:18:58 +00:00
peter
b02bde29bd Deal with the possibility that time_t != int32_t. Otherwise ia64 thought
the fs_old_size was the half part of fs_old_time etc.
2002-11-17 23:50:41 +00:00
jmallett
1277a024bb Use more non-b0rked error reporting. Print the disk we are trying to open
and (we have the disk error from libufs? the disk error: the errno).

Requested by:	bde, <many>
2002-11-05 14:30:41 +00:00
jmallett
8ac3ee3960 Forgot to include <errno.h> when using 'errno' here. 2002-10-22 19:55:44 +00:00
jmallett
5cc8ad1dc7 When errno is not set, do not use warn(3). 2002-10-22 19:31:05 +00:00
jmallett
a496f0f492 Use the libufs_printerror() function, which hopefully will deconfuse users
getting error cases in a libufsificated dumpfs(8).

Poked by:	kkenn
2002-10-22 19:27:09 +00:00
jmallett
c3be815711 Simplify some things to use libufs-provided functionality here, such as the
version of UFS on a disk, and bread() instead of other types of idiocy.

Obtained from:	jmallett_libufs Perforce branch.
2002-08-11 15:38:51 +00:00
jmallett
bb01ecf420 Remove unused variables due to libufs(3) commit. Clean up extraneous use of
semicolon at closing paren of a function body.
2002-07-11 21:46:12 +00:00
jmallett
7701bcd88c Convert dumpfs(8) to libufs(3), rather than rolling local functions for a
number of things.
2002-07-11 21:44:03 +00:00
mckusick
0694ff55c2 This commit adds basic support for the UFS2 filesystem. The UFS2
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>
2002-06-21 06:18:05 +00:00
phk
24c605afb7 Sigh, more BBSIZE related breakage.
Sponsored by:	DARPA & NAI Labs.
2002-05-12 21:37:08 +00:00
imp
2f1cbc3377 o __P removed
o ansi function prototypes
o unifdef -D__STDC__
o __dead2 on usage prototype
o remove now-bogus main prototype
2002-03-20 22:57:10 +00:00
obrien
f0428c61e5 Remove 'register' keyword.
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?)
2002-03-20 17:55:10 +00:00
iedowse
5c5ba0de81 The ffs superblock includes a 128-byte region for use by temporary
in-core pointers to summary information. An array in this region
(fs_csp) could overflow on filesystems with a very large number of
cylinder groups (~16000 on i386 with 8k blocks). When this happens,
other fields in the superblock get corrupted, and fsck refuses to
check the filesystem.

Solve this problem by replacing the fs_csp array in 'struct fs'
with a single pointer, and add padding to keep the length of the
128-byte region fixed. Update the kernel and userland utilities
to use just this single pointer.

With this change, the kernel no longer makes use of the superblock
fields 'fs_csshift' and 'fs_csmask'. Add a comment to newfs/mkfs.c
to indicate that these fields must be calculated for compatibility
with older kernels.

Reviewed by:	mckusick
2001-01-15 18:30:40 +00:00
peter
e226894fa0 $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
mpp
3d48e8793a Print out the fields that are set in fs_flags. 1999-07-18 02:33:05 +00:00
phk
10144294e6 Print out the fs_id field. 1999-06-27 10:05:14 +00:00
charnier
2fb11b3fa0 Add rcsid. Remove unused #includes. 1998-06-15 07:00:01 +00:00
rnordier
1b35fcc21b Check bytes read to prevent random error message. 1998-04-20 14:09:40 +00:00
bde
a247e37185 Print fs_maxfilesize. 1997-06-29 20:59:03 +00:00
peter
1fb9ca0332 Make this compile after the fsirand changes that deleted two fields.
I was not sure whether the fs_id fields should be printed in the clear
in case of sniffing over a network login etc.  It might be an idea
to have somebody with spare time go through and find any other missing
fields that should be reported.

Definate 2.2.x/2.1.x candidate since it breaks the build.
1997-03-28 13:06:59 +00:00
peter
c60b103185 Merge from Lite2 1997-03-11 12:12:26 +00:00
phk
66aea38654 dumpfs blindly trusts that it has been handed a filesystem.
If the magic is bad, don't waste our time.

Submitted by: Giles Lean Giles Lean <giles@nemeton.com.au>
Obtained from: NetBSD PR bin/249
1996-10-21 19:40:01 +00:00
peter
2d3b4c2842 Fix a couple of bogus casts to off_t that caused dumpfs to lseek negative
on filesystems > 2GB (which causes the disk slice code to call Debugger!!)
1996-06-23 00:05:04 +00:00
dg
58fa6b3529 Corrected message when no rotational position table is found. 1994-10-01 16:53:53 +00:00
dg
d886814497 Added a "clean" field to the output - to show the state of the clean flag. 1994-08-20 16:57:45 +00:00
rgrimes
d038e02fd6 BSD 4.4 Lite sbin Sources
Note:  XNSrouted and routed NOT imported here, they shall be imported with
usr.sbin.
1994-05-26 06:35:07 +00:00