History log of /freebsd-10.1-release/sbin/fsirand/fsirand.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 272461 02-Oct-2014 gjb

Copy stable/10@r272459 to releng/10.1 as part of
the 10.1-RELEASE process.

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

# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

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


# 241013 27-Sep-2012 mdf

Fix sbin/ build with a 64-bit ino_t.

Original code by: Gleb Kurtsou


# 229917 10-Jan-2012 eadler

Fix warning when compiling with gcc46:
error: variable 'inumber' set but not used

Approved by: dim
MFC after: 3 days


# 227081 04-Nov-2011 ed

Add missing static keywords for global variables to tools in sbin/.

These tools declare global variables without using the static keyword,
even though their use is limited to a single C-file, or without placing
an extern declaration of them in the proper header file.


# 217769 24-Jan-2011 mckusick

The dump, fsck_ffs, fsdb, fsirand, newfs, makefs, and quot utilities
include sys/time.h instead of time.h. This include is incorrect as
per the manpages for the APIs and the POSIX definitions. This commit
replaces sys/time.h where necessary with time.h.

The commit also includes some minor style(9) header fixup in newfs.

This commit is part of a larger effort by Garrett Cooper started in
//depot/user/gcooper/posix-conformance-work/ -- to make FreeBSD more
POSIX compliant.

Submitted by: Garrett Cooper yanegomi at gmail dot com


# 208074 14-May-2010 uqs

fsirand(8): make WARNS=3 clean

- Drop bogus quad_t cast for di_gen, it is a 32bit type
- Print di_gen with leading zeros, to get consistent output
Before this change, amd64 would print:

ino 18 gen 616ca2bd
ino 19 gen ffffffff95c2a3ff
ino 20 gen 25c3a3d5
ino 21 gen 8dc1472
ino 22 gen 3797056b
ino 23 gen 1d47853a
ino 24 gen ffffffff82d26995

After the change

ino 18 gen 616ca2bd
ino 19 gen 95c2a3ff
ino 20 gen 25c3a3d5
ino 21 gen 08dc1472
ino 22 gen 3797056b
ino 23 gen 1d47853a
ino 24 gen 82d26995

PR: bin/139994 (sort of)
Reviewed by: mckusick


# 132762 28-Jul-2004 kan

Avoid casts as lvalues.


# 107294 27-Nov-2002 mckusick

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.


# 102231 21-Aug-2002 trhodes

s/filesystem/file system/g as discussed on -developers


# 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__


# 59871 01-May-2000 asmodai

Remove unused include.


# 50476 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 37275 30-Jun-1998 charnier

Do not dot terminate SEE ALSO list. Add rcsid, remove unused #includes. Err(3)
messages should start with a lowercase letter.


# 26625 13-Jun-1997 ache

Remove srandomdev fallback


# 26558 11-Jun-1997 charnier

Add Id. Staticize usage function. Typo in usage string.


# 24303 26-Mar-1997 guido

Get rid of __progname. I thought I already did that...


# 24216 24-Mar-1997 ache

Include missing <time.h>
Add missing RNG initialization
Use srandomdev() for RNG initialization


# 24149 23-Mar-1997 guido

Add generation number randomization. Newly created filesystems wil now
automatically have random generation numbers. The kenel way of handling those
also changed. Further it is advised to run fsirand on all your nfs exported
filesystems. the code is mostly copied from OpenBSD, with the randomization
chanegd to use /dev/urandom
Reviewed by: Garrett
Obtained from: OpenBSD