NetBSD/libexec
perseant 9c7f8050f4 Various bug-fixes to LFS, to wit:
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.]
2000-09-09 04:49:54 +00:00
..
atrun remove extra period in SEE ALL section 2000-07-05 15:45:28 +00:00
comsat Use sockaddr_storage. 2000-08-22 16:42:37 +00:00
cron
fingerd do not touch __ss_len directly, they are not supposed to be touched. 1999-12-16 06:00:24 +00:00
ftpd Fixed s/key compile bug. 2000-07-29 08:20:02 +00:00
getNAME Don't pass so many args to .Nd macro. It just overflows. 1999-11-19 01:12:39 +00:00
getty Change "Apart form" to "Apart from". 2000-09-04 06:39:03 +00:00
hpropd link against the not-installed libvers 2000-08-03 22:47:37 +00:00
identd Make things builds with GCC 2.96 2000-07-03 03:34:25 +00:00
kadmind link against the not-installed libvers 2000-08-03 22:47:37 +00:00
kfd link against the not-installed libvers 2000-08-03 22:47:37 +00:00
kpasswdd link against the not-installed libvers 2000-08-03 22:47:37 +00:00
ld.aout_so Remove RELOC_SYMBOLICS_THROUGH_JMPSLOT as it's always the case 2000-05-28 01:53:05 +00:00
ld.elf_so copy the real object filename to the rtld object path so that the 2000-08-28 04:15:54 +00:00
lfs_cleanerd Various bug-fixes to LFS, to wit: 2000-09-09 04:49:54 +00:00
mail.local
makekey The key is expected to be eight bytes (not ten bytes). 1998-11-15 20:31:37 +00:00
makewhatis Invoke "nroff" with "-S" (safer mode) option because "makewhatis" is 2000-07-13 06:45:22 +00:00
rexecd More and more .Os cleanups. .Os is defined in the tmac.doc-common file, 1999-03-22 18:25:43 +00:00
rlogind document IPv4 mapped address twists. 2000-05-30 05:21:46 +00:00
rmail More and more .Os cleanups. .Os is defined in the tmac.doc-common file, 1999-03-22 18:25:43 +00:00
rpc.rquotad Missed a pmap_unset -> rpcb_unset change. 2000-06-03 20:57:40 +00:00
rpc.rstatd remove include of <vm/vm.h> 2000-06-29 06:26:33 +00:00
rpc.rusersd Use sockaddr_storage. 2000-06-03 20:37:37 +00:00
rpc.rwalld sweep of my licenses (userland files w/o only my copyright) for 2000-06-14 17:24:02 +00:00
rpc.sprayd Subject to TI-RPC, followed by complete and utter ANSIfication. 2000-06-03 21:06:02 +00:00
rshd document IPv4 mapped address twists. 2000-05-30 05:21:46 +00:00
talkd More and more .Os cleanups. .Os is defined in the tmac.doc-common file, 1999-03-22 18:25:43 +00:00
telnetd make error case handling in -daemon case meet with other portion of the code. 2000-08-18 03:25:52 +00:00
tftpd add line break. 1999-07-12 20:25:35 +00:00
uucpd Fix PR8428: no longer truncate login name to 8 characters, since 1999-09-24 17:59:27 +00:00
Makefile hprop(8) belongs in /usr/sbin, not /usr/libexec. 2000-08-06 20:42:22 +00:00
Makefile.inc