for the disklabel if the given device fails with EBUSY. Also make disklabel
errors non fatal (just fall back to ffs as per pre-autofilesystem behaviour)
Based on further discussion with Launey Thomas <ljt@alum.mit.edu>
you need KAME tree to compile this (point the top by ${KAMEROOT}
in Makefile.inc).
XXX maybe too big for /sbin...869K with certificate support, and 574K without
certificate support (i386, stripped, static-link)
Also, change the segment size report to include the total size of the disk,
similar to newfs, e.g.
newfs_lfs -N -F -B 65536 /dev/rsd0b
272.7MB in 4363 segments of size 65536
super-block backups (for fsck -b #) at:
16, 55824, 111632, 167440, 223248, 279056, 334864, 390672, 446480, 502288
Kernel:
* Add runtime quantity lfs_ravail, the number of disk-blocks reserved
for writing. Writes to the filesystem first reserve a maximum amount
of blocks before their write is allowed to proceed; after the blocks
are allocated the reserved total is reduced by a corresponding amount.
If the lfs_reserve function cannot immediately reserve the requested
number of blocks, the inode is unlocked, and the thread sleeps until
the cleaner has made enough space available for the blocks to be
reserved. In this way large files can be written to the filesystem
(or, smaller files can be written to a nearly-full but thoroughly
clean filesystem) and the cleaner can still function properly.
* Remove explicit switching on dlfs_minfreeseg from the kernel code; it
is now merely a fs-creation parameter used to compute dlfs_avail and
dlfs_bfree (and used by fsck_lfs(8) to check their accuracy). Its
former role is better assumed by a properly computed dlfs_avail.
* Bounds-check inode numbers submitted through lfs_bmapv and lfs_markv.
This prevents a panic, but, if the cleaner is feeding the filesystem
the wrong data, you are still in a world of hurt.
* Cleanup: remove explicit references of DEV_BSIZE in favor of
btodb()/dbtob().
lfs_cleanerd:
* Make -n mean "send N segments' blocks through a single call to
lfs_markv". Previously it had meant "clean N segments though N calls
to lfs_markv, before looking again to see if more need to be cleaned".
The new behavior gives better packing of direct data on disk with as
little metadata as possible, largely alleviating the problem that the
cleaner can consume more disk through inefficient use of metadata than
it frees by moving dirty data away from clean "holes" to produce
entirely clean segments.
* Make -b mean "read as many segments as necessary to write N segments
of dirty data back to disk", rather than its former meaning of "read
as many segments as necessary to free N segments worth of space". The
new meaning, combined with the new -n behavior described above,
further aids in cleaning storage efficiency as entire segments can be
written at once, using as few blocks as possible for segment summaries
and inode blocks.
* Make the cleaner take note of segments which could not be cleaned due
to error, and not attempt to clean them until they are entirely free
of dirty blocks. This prevents the case in which a cleanerd running
with -n 1 and without -b (formerly the default) would spin trying
repeatedly to clean a corrupt segment, while the remaining space
filled and deadlocked the filesystem.
* Update the lfs_cleanerd manual page to describe all the options,
including the changes mentioned here (in particular, the -b and -n
flags were previously undocumented).
fsck_lfs:
* Check, and optionally fix, lfs_avail (to an exact figure) and
lfs_bfree (within a margin of error) in pass 5.
newfs_lfs:
* Reduce the default dlfs_minfreeseg to 1/20 of the total segments.
* Add a warning if the sgs disklabel field is 16 (the default for FFS'
cpg, but not usually desirable for LFS' sgs: 5--8 is a better range).
* Change the calculation of lfs_avail and lfs_bfree, corresponding to
the kernel changes mentioned above.
mount_lfs:
* Add -N and -b options to pass corresponding -n and -b options to
lfs_cleanerd.
* Default to calling lfs_cleanerd with "-b -n 4".
[All of these changes were largely tested in the 1.5 branch, with the
idea that they (along with previous un-pulled-up work) could be applied
to the branch while it was still in ALPHA2; however my test system has
experienced corruption on another filesystem (/dev/console has gone
missing :^), and, while I believe this unrelated to the LFS changes, I
cannot with good conscience request that the changes be pulled up.]
searchs (amongst others) are case insensitive.
* in interactive mode (-i), when editing entries display supported disk types
and filesystem types when given `?' (when ``[?]'' appears in the prompt
this feature is supported for the question).
* support `m' as a suffix equivalent to `M'
* in interactive mode, be a bit more sensible about handling errors and EOF
* implement dumpnames(), which takes a char ** and size, and displays
as per ls -F (sorted, listed vertically) but indented by one tab
* don't assume d_typename and d_packname are NUL terminated
* fix up some comments and some warning messages (bad cut & pastos :)
* deprecate deffstypename() and getfstypename()
* be consistent when using sizeof()
indefinitely - by default, wait maximum of 300 seconds only
the timeout is settable via new -T flag
Adjust history to mention addition of shutdown hooks and -T option on manpage
This fixes bin/10637.
indefinitely - by default, wait maximum of 300 seconds only
the timeout is settable via new -T flag
Adjust history to mention addition of shutdown hooks and -T option on manpage,
also move description of -D further up and slighly adjust.
This fixes bin/10637.
and skip keywords from the output list:
-k keyword only files with `# KEYWORD: keyword' will be printed.
-s keyword files with `# KEYWORD: keyword' will not be printed.
(multiple keywords can exist on a single line, and multiple lines may exist,
as with other special rcorder lines).
requested by lukem.
add nrr as an alias for norrip, for compatibility with Solaris
retire -e, -g, -j, -r: they are still recognized and handled, but are
not listed in mount_cd9660's SYNOPSIS and are documented as
obsolete in mount_cd9660(8)
update history for joliet support and nomaplcase option
DIOCGDEFLABEL ioctl, then fall back onto the DIOCGDINFO ioctl
if that fails. This ensures that we will get the actual hardware
geometry info rather than any bogus info that might have been
previously written to the disk's label area.
u_int8_t array to struct ieee80211_nwid to prepend length field.
The length field is necessary because IEEE 802.11 spec doesn't prohibit
even '\0' for SSID.
Though the name and the value of SIOC... macro is unchanged, this change
breaks binary compatibility. The only affected userland program on the
tree is ifconfig(8).
As Jason suggested on tech-net, it is better than live with problems
since there are no releases for this ioctls yet.
kernel.
Don't make more superblock segments than we have a record of in
the superblock; and print these out as we go, like newfs.
Add am "-M" flag to specify the number of reserved segments, with a note
in the man page not to use it.
a meaningful option.
- Don't captialize the word address or interface when it refers an arugment.
- Use .Ar macro for dest_address since it is not a keyword.
newfs_lfs gives lfs_minfreeseg a value of 1/8 of the total segments on
the disk, based on rough empirical data, but this should be refined in
the future.
that gifconfig(8) would issue to configure tunnel endpoints. This
allows IP tunnel interfaces (`gif' right now, and `gre' later) to
be configured with ifconfig(8), and via /etc/ifconfig.<interface>.
Partially taken from similar changes in OpenBSD.
- Const poison the command functions a bit. We really need to clean
up the command function interface.
Set MINFREE to 80, since that's a more reasonable value according to the
literature than FFS' 90. Remove a bunch of other unused FFS cruft from
config.h.
Initialize lfs_bfree correctly vis-a-vis MIN_FREE_SEGS, so the
filesystem doesn't over-represent the amount of free space it has.
Initialize lfs_dmeta so the kernel can estimate starting from a
reasonable value.
names read from non-Rock Ridge cdroms won't be translated to lower case.
This is functionally similar to -g flag, but the version numbers on files
are still stripped.
(though still not all) errors in a damaged lfs. Segment byte accounting
is corrected in pass 5. "fsck_lfs -p" will do a partial roll-forward,
verifying the checkpoint from the newer superblock. fscknames[] is
updated so that fsck knows about fsck_lfs.
that it's possible to compile this with -Wstrict-prototypes -Wmissing-prototypes
Breakage reported by Jeff Rizzo <riz@boogers.sf.ca.us> on current-users.
it just as "odd byte sequence". Handle the dirty flag similar way
it's treated on e.g. FFS - e.g. clear it separately from rest of FAT.
Changing of FAT is now postponed until after all checks are done,
check.c:checkfilesys() was cleaned considerably and several messages
has been adjusted to be more accurate.
If file system was modified and no error has occured, just return 0
instead of 4 - there is no need for forcing a reboot in this case.
This addresses bin/5638 by Christos Zoulas.
but allows powering down the system from an exec(2) call, e.g. via
a user which has "poweroff" as login shell.
The command name is modeled after Solaris.
in_status() handles the whole inet address family. in_alias() handles
printout for single address (for both the primary address or an alias).
it is more consistent with, for example, the way at_status() is used.
ccd component partition. Note that the ccd driver still allows partitions
of any types as components since an on-disk BSD disklabel isn't available
on some port.
rather a bug in the code (which is violating the C standard by casting
an unaligned pointer to a pointer with more strict alignment constraints).
Fix the code to not do such things. Fixes port-alpha/9494.