History log of /freebsd-9.3-release/sbin/fsdb/fsdbutil.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 267654 19-Jun-2014 gjb

Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 249788 23-Apr-2013 mckusick

Merge checked by: Glen Barber (gjb@)

MFC of 247212:
When running with the -d option, instrument fsck_ffs to track the number,
data type, and running time of its I/O operations.

No functional changes.

MFC of 247234:
Catch up with internal API changes for initbarea() and getdatablk()
of fsck_ffs introduced with r247212.

Submitted by: David Wolfskill <david@catwhisker.org>

MFC of 248625:
Speed up fsck by caching the cylinder group maps in pass1 so
that they do not need to be read again in pass5. As this nearly
doubles the memory requirement for fsck, the cache is thrown away
if other memory needs in fsck would otherwise fail. Thus, the
memory footprint of fsck remains unchanged in memory constrained
environments.

This work was inspired by a paper presented at Usenix's FAST '13:
www.usenix.org/conference/fast13/ffsck-fast-file-system-checker

Details of this implementation appears in the April 2013 of ;login:
www.usenix.org/publications/login/april-2013-volume-38-number-2.
A copy of the April 2013 ;login: paper can also be downloaded
from: www.mckusick.com/publications/faster_fsck.pdf.

Reviewed by: kib
Tested by: Peter Holm

MFC of 248639:
Fix the build after addition of cylinder group cacheing (r248625)

Reported by: Glen Barber (gjb@)
Pointy hat to: Kirk McKusick (mckusick@)

MFC of 248673:
Minor formatting fix for printf() to fix clang builds.

Submitted by: db
Reviewed by: gjb

MFC of 248680:
Resolve clang compile errors on amd64/i386 for certain by casting.

compile tested with clang on i386, amd64
compile tested with gcc on i386, amd64, sparc64

Submitted by: delphij

MFC of 248691:
Note that output is in seconds, not msec.
KNF indentation.
No functional change.
No change to printf strings.
No change to casting of printf arguments.

Reported by: Bruce Evans


# 248633 23-Mar-2013 pluknet

MFC r246823:

Remove write only assignments and thus fix the build after struct bufarea
TAILQ conversion (r246812).


# 233351 23-Mar-2012 dim

MFC r232749:

Partially undo r228693, by removing NO_WFORMAT.clang in fsdb's Makefile,
and fixing the format string in sbin/fsdb/fsdbutil.c instead.

Note the remark "Work around a problem with format string warnings and
ntohs macros" was actually incorrect. The DIP(dp, di_nlink) macro
invocation actually returned an int, due to its ternary expression, even
though the di_nlink members of struct ufs1_dinode and struct ufs2_dinode
are both defined as int16_t.


# 231574 13-Feb-2012 truckman

MFC r231102:

Improve sparse file handling when printing the block list for an inode by
not bailing out early when a hole is encountered in the direct block list.
Print NULL block pointers in the direct block list. Simplify the
code that prints the fragment count.

Match the style of the existing code.

Reviewed by: mckusick


# 225736 22-Sep-2011 kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by: re (implicit)


# 207141 24-Apr-2010 jeff

- Merge soft-updates journaling from projects/suj/head into head. This
brings in support for an optional intent log which eliminates the need
for background fsck on unclean shutdown.

Sponsored by: iXsystems, Yahoo!, and Juniper.
With help from: McKusick and Peter Holm


# 161558 23-Aug-2006 ceri

Allow fsdb to manipulate the birthtime entries on UFS2.

Approved by: jhb
MFC after: 1 month


# 157950 21-Apr-2006 maxim

o Do recrack(arguments) for commands which actually take NAME as
arguments so we do not coredump at "help foo", "back bar" and such.

o Be consistent and print argc - 1 as a command arguments number in
all cases.

PR: bin/37096
Submitted by: Joshua Goodall
MFC after: 1 month


# 122621 13-Nov-2003 johan

Make this WARNS=2 clean by
- #include <timeconv.h> for _time_to_time32 et al
- use (uintmax_t) and %j
- remove unused variable 'j' (from PR 39866)

PR: 39866
Submitted by: Dan Lukes <dan@obluda.cz>
Tested by: make universe


# 98542 21-Jun-2002 mckusick

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>


# 92881 21-Mar-2002 imp

o __P removal.
o ansi function definitions.
o main prototype removal
o unifdef __STDC__


# 89827 26-Jan-2002 joerg

Something i always wanted to see: add a function to print the list of
blocks allocated by some inode. Indirect blocks are printed
recursively, so beware :), the list could become lengthy...
(We should probably add some output pager to fsdb.)

MFC after: 1 month


# 89792 25-Jan-2002 green

Remove a not-very-useful printf(3).


# 89791 25-Jan-2002 green

Allow fsdb the ability to work with entries named with whitespace embedded.

This works by retokenizing a line with a split limit so that if the
argument count for a command is greater than the number of arguments
formed by splitting apart the line of user input, the last argument
is instead all of the remainder of the input line.

Yes, I needed this capability at one point to fix a filesystem manually,
which happened to break with a problematic space-containing directory
entry.


# 74652 22-Mar-2001 roberto

Respect style(9), one must not include both <sys/types.h> and
<sys/param.h> (the latter includes the former).

Submitted by: bde


# 74594 21-Mar-2001 alfred

Include headers to unbreak world.

Submitted by: Ollivier Robert <roberto@eurocontrol.fr>


# 59869 01-May-2000 asmodai

Remove unused includes.


# 50476 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 37237 28-Jun-1998 bde

Fixed printf format errors.


# 37001 15-Jun-1998 charnier

Correct use of .Nm. Use .Bl/.El for enumerating options. Use .An. Correct
formatting of rcsid. Remove unused #includes. Do not use memory after
freeing it.


# 23854 13-Mar-1997 bde

Fixed bogus casts from (int32_t *) to (time_t *).


# 23839 13-Mar-1997 peter

Missing $Id$


# 23838 13-Mar-1997 peter

Make this compile. Mostly use the new names for the ctime/atime/mtime
stamps in the inodes and call one of fsck's utility funcs with a new arg.


# 18406 20-Sep-1996 nate

ts_sec -> tv_sec
ts_nsec -> tv_nsec


# 12051 03-Nov-1995 peter

Commit FreeBSD-specific changes. Mainly to do with structure layout
differences that we dont have.


# 12049 03-Nov-1995 peter

This commit was generated by cvs2svn to compensate for changes in r12048,
which included commits to RCS files with non-trunk default branches.


# 12048 03-Nov-1995 peter

Whoops. RE-Import NetBSD's fsdb - I believe this was written by John Kohl.

Obtained from: NetBSD