History log of /freebsd-9.3-release/lib/libufs/
Revision Date Author Comments
267654 20-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


225736 23-Sep-2011 kensmith

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

Approved by: re (implicit)


225227 28-Aug-2011 kib

Bump shared libraries version numbers in preparation for 9.0.
This time, only libraries which ABI has been changed compared to
stable/8, are bumped.

ABI analysis done by: Gleb Kurtsou
Approved by: re (kensmith)


218601 12-Feb-2011 kib

Replace ERROR() macro with inline function. In-tree gcc cannot tolerate
the construct like printf("%\s", NULL) resulting from macroexpand of
ERROR(u, NULL), making it impossible to use LIBUFS_DEBUGGING.

With inline function, compiler cannot detect the NULL argument to
known function and does not try to convert it into puts().

In collaboration with: pho


207476 01-May-2010 emaste

Search beyond the first 1/8th of inodes.

Submitted by: jeff


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


203782 11-Feb-2010 imp

i doesn't need to be signed here, make it unsigned.


203772 11-Feb-2010 imp

Back to WARNS=3. The breakage wasn't what I thought it was :(


203768 11-Feb-2010 mckusick

Keep Tinderbox happy.


203767 11-Feb-2010 imp

Increased warnings weren't tested on ARM. Bump warnings back down to
0 until it can be properly tested by those raising the warnings.
Remember: make universe is required when changing the WARNS level.


201381 02-Jan-2010 ed

Build lib/ with WARNS=6 by default.

Similar to libexec/, do the same with lib/. Make WARNS=6 the norm and
lower it when needed.

I'm setting WARNS?=0 for secure/. It seems secure/ includes the
Makefile.inc provided by lib/. I'm not going to touch that directory.
Most of the code there is contributed anyway.


194030 11-Jun-2009 jmallett

Allow libufs(3) functions to operate on a regular file. This makes it possible to
use almost anything that uses libufs(3) against a file as an unprivileged user, e.g.
tunefs(8) and dumpfs(8) against a makefs(8)-created image.

Prodded by: kensmith


190646 02-Apr-2009 delphij

Bail out when memory allocation is failed, rather than referencing
a NULL pointer.

PR: kern/94480
Submitted by: Michiel Pelt <m.pelt xs4all nl>


174668 16-Dec-2007 phk

Add a berase() function which uses ioctl(DIOCGDELETE) to erase a slab
of the disk.


167625 16-Mar-2007 pjd

The ufs_disk_fillout(3) can take special device name (with or without /dev/
prefix) as an argument and mount point path. At the end it has to find
device name file system is stored on, which means when mount point path is
given, it tries to look into /etc/fstab and find special device
corresponding to the given mount point. This is not perfect, because it
doesn't handle the case when file system is mounted by hand and mount point
is given as an argument.

I found this problem while trying to use snapinfo(8), which passes mount
points to the ufs_disk_fillout(3) function, but I had file system mounted
manually, so snapinfo(8) was exiting with the error below:

ufs_disk_fillout: No such file or directory

I modified libufs(3) to handle those arguments (the order is important):

1. special device with /dev/ prefix
2. special device without /dev/ prefix
3. mount point listed in /etc/fstab, directory exists
4. mount point listed in /etc/fstab, directory doesn't exist
5. mount point of a file system mounted by hand


163835 31-Oct-2006 pjd

Implement cgwrite1(3) function which stored a given cylinder group on disk.

Sponsored by: home.pl


150558 26-Sep-2005 keramida

minor style.Makefile(5) fixes:
- WARNS before CFLAGS
- CFLAGS -DXXX before -IXXX

Approved by: ru


149660 31-Aug-2005 jmallett

Remove getino(3) manpage. It doesn't document what is here, what is here should
not get documented, and what it does document isn't going to come to CVS any
time in the immediate future.

Patience of a saint: trhodes


149658 31-Aug-2005 trhodes

Disconnect getino.3 and remove MLINK I added.

Discussed with: jmallett


149448 25-Aug-2005 trhodes

Hook getino.3 up to the build and link it to putino.3.

PR: 83820


140566 21-Jan-2005 ru

Fixed xrefs.


131609 05-Jul-2004 ru

Markup fixes.


131594 04-Jul-2004 ru

Sort SEE ALSO references (in dictionary order, ignoring case).


131472 02-Jul-2004 ru

Removed trailing whitespace.


131468 02-Jul-2004 ru

Fixed spelling of the document date.


120934 09-Oct-2003 hmp

Remove unneccessary include of sys/types.h in the SYNOPSIS
header.

Sys/param.h includes sys/types.h internally unless LOCORE is
defined.

Approved by: des (mentor)


120874 07-Oct-2003 phk

Add XXX'ed temporary bounce-buffering.


119071 18-Aug-2003 obrien

style.Makefile(5)


119017 17-Aug-2003 gordon

Stage 3 of dynamic root support. Make all the libraries needed to run
binaries in /bin and /sbin installed in /lib. Only the versioned files
reside in /lib, the .so symlink continues to live /usr/lib so the
toolchain doesn't need to be modified.


116591 19-Jun-2003 mdodd

Correct an apparent typo.

PR: bin/53515
Submitted by: Lukas Ertl <l.ertl@univie.ac.at>
Approved by: jmallett


116165 10-Jun-2003 jmallett

Various cleanups of careless mistakes/omissions.

PR: 53149
Submitted by: Lukas Ertl <l.ertl@univie.ac.at>


116163 10-Jun-2003 jmallett

Left out the critical part of my "public domain" template, a notice saying
that this file is (these files are) in the public domain.

PR: 53149


116087 09-Jun-2003 jmallett

Commit rudimentary libufs manual pages, except for that for
getino(3)/putino(3), inode.c has been reworked in Perforce to the point
where a manual page may not be accurate. Certainly putino(3) has not
even been merged back yet.

These will need a lot of improvement for most applications, but they
document the API enough to get someone on their feet, most likely. The
best documentation still exists in the form of libufs(3) consumers in the
base system.


116086 09-Jun-2003 jmallett

Remove ufs_disk_ctor and ufs_disk_dtor, they never came to fruition. I do
not know of any software using them, and there is no "published API" for
libufs, as it were.


116084 09-Jun-2003 jmallett

Reduce diffs with code in Perforce:
Parenthesise return values.


112850 30-Mar-2003 jmallett

MFp4: Fix copy&paste English error.


112730 28-Mar-2003 jmallett

Close the disk file descriptor that is RO before trying to open the
new one, and do not fall back to the RO fd. There was a bug here
in that the RO fd was never closed, if the RDRW open succeeded, but
this code is bogus anyway, and it breaks newfs of floppies, at least
for me, due to "Device busy." Anything that wants to fall back is
doing something significantly odd that it should have some more complex
code on its end.


111111 19-Feb-2003 jmallett

Clean up error reporting in block.c, so that it gives honest error strings
for the sorts of errors we run into[1]. This also gives us room to put in a
vaguely appropriate casts to silence warnings since our compiler doesn't like
when we compare ssize_t to size_t[2]. Add a cast in sblock.c[3] to silence
a warning because of signed vs. size_t hell (again). Clean up nearby
excessive parenthemutilation[4].

Reviewed by: bde [2] [3]
Suggested by: bde, many [1]
Submitted by: bde [4]

An aside about [4], bde notes that we do not check for a negative value for
the fs bsize. I'm nto going to do that in every situation we use it, one must
expect a reasonable program to pass down reasonable values. Some foot shooting
protection I will tolerate, some I will not. Also he suggests some possible
conditional improvements there, which I may take to heart.

PS: For me at least, this is now WARNS=5 clean...


110068 30-Jan-2003 jmallett

WARNS ?= 2, so idiocy like 1.12 of type.c doesn't have to happen again.


110067 30-Jan-2003 jmallett

Missing "return 0"

Big pointy hat to: jmallett
Spotted by: peter


110066 29-Jan-2003 jmallett

API for opening (and tracking) writable file descriptors per disk.


109913 27-Jan-2003 jmallett

If we don't know where the sblock is (e.g. filling out a blank disk), then
get it from the fs structure. Really libufs should have interfaces to generate
both what we export, and what we import, based on eachother, and this should
be full of redundant code to make sure everything is right... But really, we
don't even deal with checksums, so plenty of room to improve.


109766 23-Jan-2003 jmallett

bwrite, not sbwrite, needs to open for writing and write.


109755 23-Jan-2003 jmallett

API to fillout a blank disk. For e.g. newfs.


109518 19-Jan-2003 jmallett

Store not only the current cylinder group in the series (i.e. next that needs
to be read in) but also the last cylinder group in the series (i.e. what is
stored in the structure).


109511 19-Jan-2003 jmallett

Don't crash when utilities are dumb and try to read less than the disk block
size (dumpfs may try to read the cylinder size (or is is sector size?) by way
of bread). Prevents a bounds error.


109509 19-Jan-2003 jmallett

Add facility to read one, or a string of, cylinger groups.


109506 19-Jan-2003 jmallett

Hunt for a disk to operate on, if we're passed a partition mountpoint, etc.

Concept reviewed by: phk


109464 18-Jan-2003 jmallett

Fix typo.


109462 18-Jan-2003 jmallett

Nuke dumb error reporting code, people can just use disk::d_error. Unify the
DEBUG and d_error initialisation into an ERROR macro, which can both trace and
set the d_error field. Much a more meaningful thing, I should say.


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.


105740 22-Oct-2002 jmallett

Use an error message closer to old dumpfs(8) in the case of truncated/no
superblock.

Submitted by: kkenn

Can't use it verbatim, at least I hate to, as the ", skipped" bit doesn't
make much sense in a library, to me.


105737 22-Oct-2002 jmallett

Add the concept of a per-disk error string, and a function which prints it
along with the errno, if one is set.


102296 22-Aug-2002 jmallett

Wrap the header to prevent multiple inclusion, and mark the DECLS section.

Reminded by: Rachel Hestilow <hestilow@ximian.com>


101687 11-Aug-2002 jmallett

Initialise disk->d_ufs so that in sblock.c it's always initialised
(unless someone tries to use libufs support functions without using
_fillout or _ctor to construct a uufsd.)

Obtained from: jmallett_libufs Perforce branch.


99823 11-Jul-2002 jmallett

Fill out (zero) and fill in (when doing getino()) the minimum and maximum
inodes in our inoblock (disk->d_ino{min,max}) appropriately.


99330 03-Jul-2002 ru

No need to explicitly set NOMAN here.

Reviewed by: jmallett


99223 01-Jul-2002 jmallett

DEBUG is a knob that means something else in FreeBSD, use LIBUFS_DEBUG to
turn on tracing.


99222 01-Jul-2002 jmallett

In getino, have our DEBUG message in the unhandled case mention that it
does not know what sort of UFS filesystem this is.

Add some DEBUG(NULL)'s to function entry points.


99193 01-Jul-2002 jmallett

Add libufs, a library for dealing with UFS filesystems from userland to
the build. It is here to compartmentalise functionality currently duplicated
in many notable programs in the base system. It currently handles block
reads and writes, as well as reading and writing of the filesystem superblock,
and the reading/lookup of inode data. It supports both UFS and UFS2. I
will be maintaining it, and porting programs to use it, however for now, it
is simply being built as part of world.