]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
25 years agoThis commit was generated by cvs2svn to compensate for changes in r42994,
Garrett Wollman [Thu, 21 Jan 1999 17:33:32 +0000 (17:33 +0000)]
This commit was generated by cvs2svn to compensate for changes in r42994,
which included commits to RCS files with non-trunk default branches.

25 years agoFirst stage in giving zic/zdump its own version of private.h so that they
Garrett Wollman [Thu, 21 Jan 1999 17:33:32 +0000 (17:33 +0000)]
First stage in giving zic/zdump its own version of private.h so that they
are decoupled somewhat from libc/stdtime's version.

25 years agoRemove two files replaced with HTML by vendor.
Garrett Wollman [Thu, 21 Jan 1999 17:32:37 +0000 (17:32 +0000)]
Remove two files replaced with HTML by vendor.

25 years agoUpdated timezone compiler from Arthur Olson.
Garrett Wollman [Thu, 21 Jan 1999 17:31:43 +0000 (17:31 +0000)]
Updated timezone compiler from Arthur Olson.

Obtained from: ftp://elsie.nci.nih.gov/pub/tzcode1999a.tar.gz

25 years agoThis commit was generated by cvs2svn to compensate for changes in r42991,
Garrett Wollman [Thu, 21 Jan 1999 17:31:43 +0000 (17:31 +0000)]
This commit was generated by cvs2svn to compensate for changes in r42991,
which included commits to RCS files with non-trunk default branches.

25 years agoOops, I accidently had devfs enabled in the vn module..
Peter Wemm [Thu, 21 Jan 1999 17:23:30 +0000 (17:23 +0000)]
Oops, I accidently had devfs enabled in the vn module..

25 years agoMerge from vendor branch: timezone file structure changes and doco.
Garrett Wollman [Thu, 21 Jan 1999 17:22:59 +0000 (17:22 +0000)]
Merge from vendor branch: timezone file structure changes and doco.
Fix localtime.c to deal with new magic number field.

Obtained from: ftp://elsie.nci.nih.gov/pub/tzcode1999a.tar.gz

25 years agoAdd vn module to build list.
Peter Wemm [Thu, 21 Jan 1999 17:19:56 +0000 (17:19 +0000)]
Add vn module to build list.

25 years agoBuild a vn module. I've lost count of the number of times I could have
Peter Wemm [Thu, 21 Jan 1999 17:18:34 +0000 (17:18 +0000)]
Build a vn module.  I've lost count of the number of times I could have
used vn but didn't have it compiled in.

25 years agoUpdate timezone file description to match new zic (coming soon).
Garrett Wollman [Thu, 21 Jan 1999 17:18:06 +0000 (17:18 +0000)]
Update timezone file description to match new zic (coming soon).
Update man page to reflect reality.

25 years agoConvert vn.c into a module (loadable and static).
Peter Wemm [Thu, 21 Jan 1999 17:17:02 +0000 (17:17 +0000)]
Convert vn.c into a module (loadable and static).

25 years agoTypo: s/mdev/bdev/, added in rev 1.47 (must fix in RELENG_3 too)
Peter Wemm [Thu, 21 Jan 1999 16:15:53 +0000 (16:15 +0000)]
Typo:  s/mdev/bdev/, added in rev 1.47  (must fix in RELENG_3 too)

25 years agoRemoved from the secure/lib/libcrypt area, because of the rewrite to how
Brandon Gillespie [Thu, 21 Jan 1999 13:51:49 +0000 (13:51 +0000)]
Removed from the secure/lib/libcrypt area, because of the rewrite to how
the Makefile handles des support by just including the single .c file.

Reviewed by: Mark Murray

25 years agoMoved from the old secure/lib/libcrypt area, because of the rewrite to how
Brandon Gillespie [Thu, 21 Jan 1999 13:51:04 +0000 (13:51 +0000)]
Moved from the old secure/lib/libcrypt area, because of the rewrite to how
the Makefile handles des support by just including the single .c file.

Reviewed by: Mark Murray

25 years agoRewrite of crypt library to be more modular, and addition of the
Brandon Gillespie [Thu, 21 Jan 1999 13:50:09 +0000 (13:50 +0000)]
Rewrite of crypt library to be more modular, and addition of the
Secure Hashing Algorithm - 1 (SHA-1), along with the further
refinement of what $x$salt$hash means.  With this new crypt the
following are all acceptable:

    $1$
    $MD5$
    $SHA1$

Note: $2$ is used by OpenBSD's Blowfish, which I considered adding
as $BF$, but there is no actual need for it with SHA-1.  However,
somebody wishing to add OpenBSD password support could easilly add
it in now.

There is also a malloc_crypt() available in the library now, which
behaves exactly the same as crypt(), but it uses a malloced buffer
instead of a static buffer.  However, this is not standard so will
likely not be used much (at all).

Also, for those interested I did a brief speed test Pentium 166/MMX,
which shows the DES crypt to do approximately 2640 crypts a CPU second,
MD5 to do about 62 crypts a CPU second and SHA1 to do about 18 crypts
a CPU second.

Reviewed by: Mark Murray

25 years agoTypo: s/bpreassignbuf/pbreassignbuf/ so the prototype matches it's function
Peter Wemm [Thu, 21 Jan 1999 13:41:12 +0000 (13:41 +0000)]
Typo: s/bpreassignbuf/pbreassignbuf/ so the prototype matches it's function

25 years ago Mainly changes to support the new swapper. The big adjustment is that
Matthew Dillon [Thu, 21 Jan 1999 10:17:12 +0000 (10:17 +0000)]
Mainly changes to support the new swapper.  The big adjustment is that
    swap blocks are now in PAGE_SIZE'd increments instead of DEV_BSIZE'd
    increments.  We still convert to DEV_BSIZE'd increments for the
    backing store I/O, but everything else is in PAGE_SIZE increments.

25 years ago Move many of the vm_pager_*() functions from vm_pager.c to inlines in
Matthew Dillon [Thu, 21 Jan 1999 10:15:47 +0000 (10:15 +0000)]
  Move many of the vm_pager_*() functions from vm_pager.c to inlines in
      vm_pager.h

25 years ago Move many of the vm_pager_*() functions from vm_pager.c to inlines in
Matthew Dillon [Thu, 21 Jan 1999 10:15:24 +0000 (10:15 +0000)]
 Move many of the vm_pager_*() functions from vm_pager.c to inlines in
     vm_pager.h

     Added argument to getpbuf() and relpbuf() to allow each subsystem to
     specify a different hard limit on the number of simultanious physical
     bufferes that said subsystem may allocate.  Without this feature, one
     subsystem ( e.g. the vfs clustering code ) could hog *ALL* the pbufs,
     causing a deadlock in the pager in a low memory situation.

     Same for trypbuf().

25 years ago Reorganized some of the low memory testing code to make it more useful.
Matthew Dillon [Thu, 21 Jan 1999 10:12:54 +0000 (10:12 +0000)]
Reorganized some of the low memory testing code to make it more useful.

    Removed call to vm_object_collapse(), which can block.  This was being
    called without the pageout code holding any sort of reference on the
    vm_object or vm_page_t structures being manipulated.  Since this code
    can block, it was possible for other kernel code to shred the state
    the pageout code was assuming remained intact.

    Fixed potential blocking condition in vm_pageout_page_free() ( which
    could cause a deadlock in a low-memory situation ).

    Currently there is a hack in-place to deal with clean filesystem meta-data
    polluting the inactive page queue.  John doesn't like the hack, and neither
    do I.

    Revamped and commented a portion of the pageout loop.

    Added protection against potential memory deadlocks with OBJT_VNODE
    when using VOP_ISLOCKED().  The problem is that vp->v_data can be NULL
    which causes VOP_ISLOCKED() to return a less informed answer.

    remove vm_pager_sync() -- none of the pagers use it any more ( the old
    swapper used to.  The new one does not ).

25 years ago The TAILQ hashq has been turned into a singly-linked=list link,
Matthew Dillon [Thu, 21 Jan 1999 10:06:24 +0000 (10:06 +0000)]
The TAILQ hashq has been turned into a singly-linked=list link,
    reducing the size of vm_page_t.

    SWAPBLK_NONE and SWAPBLK_MASK are defined here.  These actually are
    more generalized then their names imply, but their placement is somewhat
    of a legacy issue from a prior test version of this code that put
    the swapblk in the vm_page_t structure.  That test code was eventually
    thrown away.  The legacy remains.

    Added vm_page_flash() inline.  Similar to vm_page_wakeup() except that
    it does not clear PG_BUSY ( one assumes that PG_BUSY is already clear ).
    Used by a number of routines to wakeup waiters.

    Collapsed some of the code in inline calls to make other inline calls.
    GCC will optimize this well and it reduces duplication.

    vm_page_free() and vm_page_free_zero() inlines added to convert to
    the proper vm_page_free_toq() call.

    vm_page_sleep_busy() inline added, replacing vm_page_sleep() ( which has
    been removed ).  This implements a much more optimizable page-waiting
    function.

25 years ago The hash table used to be a table of doubly-link list headers ( two
Matthew Dillon [Thu, 21 Jan 1999 10:01:49 +0000 (10:01 +0000)]
The hash table used to be a table of doubly-link list headers ( two
    pointers per entry ).  The table has been changed to a singly linked
    list of vm_page_t pointers.  The table has been doubled in size, but
    the entries only take half the space so a net-zero change in memory use.

    The hash function has been changed, hopefully for the better.  The
    combination of the larger hash table size of changed function should
    keep the chain length down to a reasonable number (0-3, average 1).

    vm_object->page_hint has been removed.  This 'optimization' was not
    only never needed, but costs as much as a hash chain link to implement.
    While having page_hint in vm_object might result in better locality
    of reference, the cost is not worth the space in vm_object or the
    extra instructions in my view.

    vm_page_alloc*() functions have been inlined and call a generalized
    non-inlined vm_page_alloc_toq() which combines the standard alloc
    and zero-page alloc functions together, reducing code size and the L1
    cache footprint.  Some reordering has been done... not much.  The
    delinking code should be faster ( because unlinking a doubly-linked list
    requires four memory ops and unlinking a singly linked list only requires
    two ), and we get a hash consistancy check for free.

    vm_page_rename() now automatically sets the page's dirty bits.

    vm_page_alloc() does not try to manually inline freeing a cache page.
    Instead, it now properly calls vm_page_free(m) ... vm_page_free() is
    really too complex to manually inline.

    vm_await(), supporting asleep(), has been added.

25 years ago The vm_object structure is now somewhat smaller due to the removal
Matthew Dillon [Thu, 21 Jan 1999 09:51:21 +0000 (09:51 +0000)]
The vm_object structure is now somewhat smaller due to the removal
    of most of the swap-pager-specific fields, the removal of the id,
    and the removal of paging_offset.

    A new inline, vm_object_pip_wakeupn() has been added to subtract an
    arbitrary number n from the paging_in_progress count and then wakeup
    waiters as necessary.  n may be 0, resulting in a 'flash'.

25 years ago object->id was badly implemented. It has simply been removed.
Matthew Dillon [Thu, 21 Jan 1999 09:46:55 +0000 (09:46 +0000)]
object->id was badly implemented.  It has simply been removed.

    object->paging_offset has been removed - it was used to optimize a
    single OBJT_SWAP collapse case yet introduced massive confusion throughout
    vm_object.c.  The optimization was inconsequential except for the
    claim that it didn't have to allocate any memory.  The optimization
    has been removed.

    madvise() has been fixed.  The old madvise() could be made to operate
    on shared objects which is a big no-no.  The new one is much more careful
    in what it modifies.  MADV_FREE was totally broken and has now been fixed.

    vm_page_rename() now automatically dirties a page, so explicit dirtying
    of the page prior to calling vm_page_rename() has been removed.

25 years ago Objects associated with raw devices are no longer counted in the VM stats
Matthew Dillon [Thu, 21 Jan 1999 09:41:52 +0000 (09:41 +0000)]
Objects associated with raw devices are no longer counted in the VM stats
    total because they may contain absurd numbers ( like the size of all
    of physical memory if you mmap() /dev/mem ).

25 years ago General cleanup related to the new pager. We no longer have to worry
Matthew Dillon [Thu, 21 Jan 1999 09:40:48 +0000 (09:40 +0000)]
General cleanup related to the new pager.  We no longer have to worry
    about conversions of objects to OBJT_SWAP, it is done automatically
    now.

    Replaced manually inserted code with inline calls for busy waiting on
    pages, which also incidently fixes a potential PG_BUSY race due to
    the code not running at splvm().

    vm_objects no longer have a paging_offset field ( see vm/vm_object.c )

25 years ago Potential bug fix, do not just clear PG_BUSY... call vm_page_wakeup()
Matthew Dillon [Thu, 21 Jan 1999 09:38:20 +0000 (09:38 +0000)]
Potential bug fix, do not just clear PG_BUSY... call vm_page_wakeup()
    instead to properly handle any waiters.

    Added comments, added support for M_ASLEEP.  Generally treat M_ flags
    as flags instead of constants to compare against.

25 years ago Removed low-memory blockages at fork. This is the wrong place to put
Matthew Dillon [Thu, 21 Jan 1999 09:36:23 +0000 (09:36 +0000)]
Removed low-memory blockages at fork.  This is the wrong place to put
    this sort of test.  We need to fix the low-memory handling in general.

25 years ago Mainly cleanup. Removed some inappropriate low-memory handling code
Matthew Dillon [Thu, 21 Jan 1999 09:35:38 +0000 (09:35 +0000)]
Mainly cleanup.  Removed some inappropriate low-memory handling code
    and added lots of comments.  Add tie-in to vm_pager ( and thus the
    new swapper ) to deallocate backing swap for dirtied pages on the fly.

25 years ago The default_pager's interaction with the swap_pager has been reorganized,
Matthew Dillon [Thu, 21 Jan 1999 09:33:07 +0000 (09:33 +0000)]
The default_pager's interaction with the swap_pager has been reorganized,
    and the swap_pager has been completely replaced.

    The new swap pager uses the new blist radix-tree based bitmap allocator
    for low level swap allocation and deallocation.   The new allocator
    is effectively O(5) while the old one was O(N), and the new allocator
    allocates all required memory at init time rather then at allocate
    memory on the fly at run time.

    Swap metadata is allocated in clusters and stored in a hash table,
    eliminating linearly allocated structures.

    Many, many features have been rewritten or added.  Swap space is now
    reallocated on the fly providing a poor-mans auto defragmentation of
    swap space.  Swap space that is no longer needed is freed on a timely
    basis so no garbage collection is necessary.

    Swap I/O is marked B_ASYNC and NFS has been fixed to do the right
    thing with it, so NFS-based paging now has around 10x the performance
    as it did before ( previously NFS enforced synchronous I/O for paging ).

25 years ago Added support for VOP_FREEBLKS(), reducing MFS's impact on swap and
Matthew Dillon [Thu, 21 Jan 1999 09:27:03 +0000 (09:27 +0000)]
Added support for VOP_FREEBLKS(), reducing MFS's impact on swap and
    increasing performance by deallocating at least some of the backing
    store when files are removed.

    Protect mfsp->buf_queue access at splbio().

25 years ago Access to mfsp->buf_queue must be protected at splbio(). Other minor
Matthew Dillon [Thu, 21 Jan 1999 09:24:46 +0000 (09:24 +0000)]
Access to mfsp->buf_queue must be protected at splbio().  Other minor
    adjustments also made, such as passing mfsp to mfs_doio() directly.

25 years agoMove EXT2FS to be more visible, and give it a description. Also make
Eivind Eklund [Thu, 21 Jan 1999 09:24:28 +0000 (09:24 +0000)]
Move EXT2FS to be more visible, and give it a description.  Also make
the text from my last commit somewhat better.

25 years ago Renamed M_KERNEL to a more appropriate M_USE_RESERVE.
Matthew Dillon [Thu, 21 Jan 1999 09:23:21 +0000 (09:23 +0000)]
Renamed M_KERNEL to a more appropriate M_USE_RESERVE.

25 years ago The main operational changes are in getblk()'s handling of the
Matthew Dillon [Thu, 21 Jan 1999 09:19:33 +0000 (09:19 +0000)]
The main operational changes are in getblk()'s handling of the
    B_DELWRI and B_CACHE flags, fixing a bug that showed up with NFS.
    Also, a number of cases where manually inserted code has been removed
    and replaced with an inline function call giving us better functional
    isolation in the source.

25 years ago The code that reclaims descriptors from in-transit unix domain
Matthew Dillon [Thu, 21 Jan 1999 09:02:18 +0000 (09:02 +0000)]
The code that reclaims descriptors from in-transit unix domain
    descriptor-passing messages was calling sorflush() without checking
    to see if the descriptor was actually a socket.  This can cause a
    crash by exiting programs that use the mechanism under certain
    circumstances.

25 years ago Fixed a potential bug ( but maybe not ), where sendfile() clears PG_BUSY
Matthew Dillon [Thu, 21 Jan 1999 09:00:26 +0000 (09:00 +0000)]
Fixed a potential bug ( but maybe not ), where sendfile() clears PG_BUSY
    on a page without testing for waiters.  Also collapsed busy wait into
    new vm_page_sleep_busy() inline ( see vm/vm_page.h )

25 years ago This module was used only by the old swapper and has been #if'd out,
Matthew Dillon [Thu, 21 Jan 1999 08:58:41 +0000 (08:58 +0000)]
This module was used only by the old swapper and has been #if'd out,
    and will be eventually removed if no other use is found for it.

25 years ago This is a rather large commit that encompasses the new swapper,
Matthew Dillon [Thu, 21 Jan 1999 08:29:12 +0000 (08:29 +0000)]
This is a rather large commit that encompasses the new swapper,
    changes to the VM system to support the new swapper, VM bug
    fixes, several VM optimizations, and some additional revamping of the
    VM code.  The specific bug fixes will be documented with additional
    forced commits.  This commit is somewhat rough in regards to code
    cleanup issues.

Reviewed by: "John S. Dyson" <root@dyson.iquest.net>, "David Greenman" <dg@root.com>

25 years ago Add new blist module - radix tree based bitmap allocator with
Matthew Dillon [Thu, 21 Jan 1999 08:11:06 +0000 (08:11 +0000)]
Add new blist module - radix tree based bitmap allocator with
    size hinting.  Will be used by the new swapper.

25 years ago Update pstat -s to handle both old and new swapper.
Matthew Dillon [Thu, 21 Jan 1999 08:08:55 +0000 (08:08 +0000)]
Update pstat -s to handle both old and new swapper.
    Add pstat -ss to dump new swapper's radix tree.

25 years agoThis is now 4.0-current
Jordan K. Hubbard [Thu, 21 Jan 1999 03:07:33 +0000 (03:07 +0000)]
This is now 4.0-current

25 years agoUpdate to reflect changes in kernel module
Greg Lehey [Thu, 21 Jan 1999 00:55:28 +0000 (00:55 +0000)]
Update to reflect changes in kernel module
Remove references to LKMs
Change descriptions on read command (HEADS UP: this command has changed
  in an incompatible manner)

25 years agoUpdate to reflect major changes in vinum kernel module
Greg Lehey [Thu, 21 Jan 1999 00:45:11 +0000 (00:45 +0000)]
Update to reflect major changes in vinum kernel module

25 years agoUpdate to reflect changes in kernel lkm
Greg Lehey [Thu, 21 Jan 1999 00:44:11 +0000 (00:44 +0000)]
Update to reflect changes in kernel lkm

25 years agoRemove -DRAID5 from CFLAGS
Greg Lehey [Thu, 21 Jan 1999 00:43:00 +0000 (00:43 +0000)]
Remove -DRAID5 from CFLAGS

25 years agoInclude Peter Wemm's renaming and restructuring
Greg Lehey [Thu, 21 Jan 1999 00:41:58 +0000 (00:41 +0000)]
Include Peter Wemm's renaming and restructuring

Change from lkm to kld

Add field plexsdno to sd struct

Add flag VF_NEWBORN to drive, sd, plex and volume structs, indicating
that the object has just been created.

Add object types for raw (unattached) plexes and subdisks

Remove definitions of VOLNO, PLEXNO and SDNO (now functions Volno,
Plexno and Sdno)

Move revive parameters from struct plex to struct sd.

struct plex:
  maintain a count of the number of inaccessible subdisks.
  remove defective and unmapped regions.

Debug flags: make an enum (previously #define)

Set default revive block size to 64kB (was 32 kB)

25 years ago Retain some of the RAID5 texts even in the non-RAID5 versions.
Greg Lehey [Thu, 21 Jan 1999 00:41:31 +0000 (00:41 +0000)]
  Retain some of the RAID5 texts even in the non-RAID5 versions.
  Previously, accidentally starting the wrong version could corrupt
  the RAID5 configuration.

  Add functions Volno, Plexno and Sdno to replace the old defines
  VOLNO, PLEXNO and SDNO.

25 years agoRemove states:
Greg Lehey [Thu, 21 Jan 1999 00:40:50 +0000 (00:40 +0000)]
Remove states:
  plex_reviving (now we revive subdisks)
  drive_coming_up (never happened)

Add state sd_reviving.

25 years agoInclude Peter Wemm's renaming and restructuring
Greg Lehey [Thu, 21 Jan 1999 00:40:32 +0000 (00:40 +0000)]
Include Peter Wemm's renaming and restructuring

Change from lkm to kld

Serious rewrite.  No longer call set_<foo>_state to set the state
based only on other objects; instead, add functions
update_<foo>_state, which determine what the state should be by
themselves.  This allows the set_<foo>_state functions to shrink
enough to be almost intelligible.

Remove flags setstate_recurse and setstate_recursing.

Remove plex defective regions and unmapped regions, which were
maintained but not used.

Change code to allow daemon to perform operations formerly kludged
into an interrupt context.  Remove the DIRTYCONFIG kludge.

25 years agoChange the style of revive: revive subdisks instead of plexes. This
Greg Lehey [Thu, 21 Jan 1999 00:40:03 +0000 (00:40 +0000)]
Change the style of revive: revive subdisks instead of plexes.  This
makes it easier to keep track of which parts of a plex need reviving.

Use sdio, not vinumstrategy, to write to the subdisk.

25 years agoInclude Peter Wemm's renaming and restructuring
Greg Lehey [Thu, 21 Jan 1999 00:39:36 +0000 (00:39 +0000)]
Include Peter Wemm's renaming and restructuring

Change from lkm to kld

Remove #ifdefs for FreeBSD 2.c

vinumstrategy:
  Support anonymous (`raw') subdisks and plexes.
  Change code to allow daemon to perform operations formerly kludged
  into an interrupt context.  Remove the DIRTYCONFIG kludge.

No longer set B_ORDERED for reviving subdisks.  I suspect this
wouldn't work correctly, and it should be done in a different manner
in vinumrevive.c

sdio: set subdisk state correctly on error
      start to remove code that doesn't make any sense any more.

25 years agoAdd keywords help, makedev, quit and setdaemon
Greg Lehey [Thu, 21 Jan 1999 00:39:01 +0000 (00:39 +0000)]
Add keywords help, makedev, quit and setdaemon

25 years agoMMalloc: remove directory part of name correctly
Greg Lehey [Thu, 21 Jan 1999 00:37:56 +0000 (00:37 +0000)]
MMalloc: remove directory part of name correctly

25 years agoCreate functions lockdrive and unlockdrive to handle drive locking
Greg Lehey [Thu, 21 Jan 1999 00:37:38 +0000 (00:37 +0000)]
Create functions lockdrive and unlockdrive to handle drive locking

25 years agoAdd keywords makedev, setdaemon and help.
Greg Lehey [Thu, 21 Jan 1999 00:37:18 +0000 (00:37 +0000)]
Add keywords makedev, setdaemon and help.

25 years agoRemove ioctls VINUM_GETUNMAPPED and VINUM_GETDEFECTIVE (we no longer
Greg Lehey [Thu, 21 Jan 1999 00:36:21 +0000 (00:36 +0000)]
Remove ioctls VINUM_GETUNMAPPED and VINUM_GETDEFECTIVE (we no longer
have regions).

Add definitions for VINUM_DAEMON, VINUM_FINDDAEMON and VINUM_DAEMON

25 years agoInclude Peter Wemm's renaming and restructuring
Greg Lehey [Thu, 21 Jan 1999 00:35:35 +0000 (00:35 +0000)]
Include Peter Wemm's renaming and restructuring

Remove #ifdefs for FreeBSD 2.c

Change from lkm to kld

correct type of `flags' in calls to set_drive_state.

set_drive_parms: handle anonymous drives correctly (remove them)

drive VOP functions: use the PID of the original opener to fool the
lock manager.

open_drive: be quiet about failures (they're normal when scanning the
partitions).

close_drive: lock drive before closing.

remove_drive: lock drive before deallocating.

read_drive_label: set drive up when all is OK

check_drive:
  Complete rewrite.  Offload most of the code to the new
  vinum_scandisk

format_config:
  use snprintf and %qd options to make much less emetic.
  Remove old supporting functions.

vinum_scandisk:
  Moved here from vinum.c
  Almost complete rewrite, incorporating much of what was check_drive.
  We still don't have a general way to find the drives on a system, so
  get the user to supply the names via the `read' command.  For each
  device, try each possible compatibility slice name (there's a danger
  of finding both /dev/da1h and /dev/da0s1h otherwise).  Sort the
  partitions found in reverse order of last update time and read them
  in, setting the `update' parameter to parse_config and descendents.

save_config: rename to daemon_save_config, since the function is now
called by the daemon.  Create a new function save_config which queues
the request with the daemon.

daemon_save_config:  some mods to allow for the unfamiliar
environment.

25 years agoInclude Peter Wemm's renaming and restructuring
Greg Lehey [Thu, 21 Jan 1999 00:34:14 +0000 (00:34 +0000)]
Include Peter Wemm's renaming and restructuring

Change from lkm to kld

Recover from I/O errors by passing the request to the daemon, except
for plex I/O, which is not fault tolerant.

25 years agoRemove old cruft
Greg Lehey [Thu, 21 Jan 1999 00:33:47 +0000 (00:33 +0000)]
Remove old cruft

25 years agoInclude Peter Wemm's renaming and restructuring
Greg Lehey [Thu, 21 Jan 1999 00:32:54 +0000 (00:32 +0000)]
Include Peter Wemm's renaming and restructuring

Change from lkm to kld

Remove BROKEN_GDB kludge (it's not needed with klds)

Add code for interfacing with daemon

Modify device minor number encoding, use selector functions which also
permit anonymous plexes and subdisks.

Remove code for 2.x support.

Change messages to omit obvious words like 'plex' and 'subdisk.

give_plex_to_volume: invalidate subdisks being given to a plex which
is part of a volume with other plexes.

give_sd_to_plex: keep track of plex size in all cases

lock drives before closing them, to keep the daemon from getting
confused.

config_drive: handle partition type errors more gracefully

config_subdisk: set subdisk state correctly

find_drive, find_drive_by_dev, find_subdisk, find_plex, find_volume:
  set VF_NEWBORN flag when a new object is created

config_drive:
  Handle partition_status returns more cleverly.
  Replace the device name in some cases where it got overwritten.

config_subdisk:
  add parameter `update'.  If the object already exists, exit without
  any changes.
  Set state correctly.

config_plex, config_volume:
  add parameter `update'.  If the object already exists, exit without
  any changes.

parse_config:
  move read function to vinum_scandisk.
  add parameter `update' to pass to config_<object>.

remove_<object>_entry:
  print a message when the object is removed.

update_plex_config:
  Start defusing this function, which will go away some time.
  Remove calls to update_volume_config.
  Make size 64 bits

25 years agoInclude Peter Wemm's renaming and restructuring
Greg Lehey [Thu, 21 Jan 1999 00:31:59 +0000 (00:31 +0000)]
Include Peter Wemm's renaming and restructuring

Change from lkm to kld

25 years agoCode for vinum daemon.
Greg Lehey [Thu, 21 Jan 1999 00:31:31 +0000 (00:31 +0000)]
Code for vinum daemon.

25 years agoInclude Peter Wemm's renaming and restructuring
Greg Lehey [Thu, 21 Jan 1999 00:30:52 +0000 (00:30 +0000)]
Include Peter Wemm's renaming and restructuring

Change from lkm to kld

Remove BROKEN_GDB kludge (it's not needed with klds)

Add code for interfacing with daemon

Modify manner of determining when module is idle

Modify device minor number encoding, use selector functions which also
permit anonymous plexes and subdisks.

Remove code for 2.x support.

Move vinum_scandisk to vinumio.c

Remove myproc kludge

Keep track of open volumes by flag, not by pid (the pids caused some
problems with the lock manager).

free_vinum:
  Remove unmapped and defective regions from plexes.
  Wait for daemon to stop before returning

vinumopen:
  Don't refuse an open if the volume is already open.

25 years agoReflect changes in vinumstate.h
Greg Lehey [Thu, 21 Jan 1999 00:30:24 +0000 (00:30 +0000)]
Reflect changes in vinumstate.h

25 years agoInclude Peter Wemm's renaming and restructuring
Greg Lehey [Thu, 21 Jan 1999 00:29:44 +0000 (00:29 +0000)]
Include Peter Wemm's renaming and restructuring

Change from lkm to kld

Add structures for daemon

Remove old cruft

Increase RQINFO_SIZE to 128

25 years agoInclude the copyright notice in the script, making the file COPYRIGHT
Greg Lehey [Thu, 21 Jan 1999 00:29:20 +0000 (00:29 +0000)]
Include the copyright notice in the script, making the file COPYRIGHT
unnecessary.

25 years agoMinor rearranging of code to allow simple protocol domains to be
Julian Elischer [Thu, 21 Jan 1999 00:26:41 +0000 (00:26 +0000)]
Minor rearranging of code to allow simple protocol domains to be
added as KLDs.

25 years agoAdd source file vinumdaemon.c
Greg Lehey [Thu, 21 Jan 1999 00:25:47 +0000 (00:25 +0000)]
Add source file vinumdaemon.c

25 years agoSet JADETEX=no on ports build line.
Jordan K. Hubbard [Wed, 20 Jan 1999 23:24:06 +0000 (23:24 +0000)]
Set JADETEX=no on ports build line.

Prompted by: nik

25 years agoput it back the way it was
Matt Jacob [Wed, 20 Jan 1999 23:00:31 +0000 (23:00 +0000)]
put it back the way it was

25 years agoRename some globals to reduce namespace pollution.
John Polstra [Wed, 20 Jan 1999 22:50:37 +0000 (22:50 +0000)]
Rename some globals to reduce namespace pollution.

25 years agoAllow login to be linked statically even when PAM is used, since
John Polstra [Wed, 20 Jan 1999 21:58:46 +0000 (21:58 +0000)]
Allow login to be linked statically even when PAM is used, since
there is now a static version of libpam.

25 years agoMake it possible to use PAM in statically-linked applications.
John Polstra [Wed, 20 Jan 1999 21:55:30 +0000 (21:55 +0000)]
Make it possible to use PAM in statically-linked applications.

25 years agoChange the definition of LIBPAM to support the static PAM library.
John Polstra [Wed, 20 Jan 1999 21:48:56 +0000 (21:48 +0000)]
Change the definition of LIBPAM to support the static PAM library.
When linking statically, LIBPAM is augmented with the extra libraries
that the PAM modules require.  The idea is to centralize this
information rather than scattering it about in the Makefiles of
all the applications that use (OK, will use) PAM.

There is a new variable MINUSLPAM that should be used instead of
"-lpam".  In the static case, it gets -l flags for the extra required
libraries.

This approach was suggested by <bde>, but he didn't actually review
my changes.

25 years agoAdd some capabilities to <bsd.lib.mk> so that it can be used for
John Polstra [Wed, 20 Jan 1999 21:42:40 +0000 (21:42 +0000)]
Add some capabilities to <bsd.lib.mk> so that it can be used for
building dlopen-able modules, and add features needed to build a
static PAM library.  I think I cleaned it up some, too, but beauty
is in the eye of the beholder.

You can now build a shared library without version numbers, by
defining SHLIB_NAME to something like "pam_unix.so".  If SHLIB_MAJOR
and/or SHLIB_MINOR are set, SHLIB_NAME gets the usual default value,
but it can be overridden if desired.  If none of these symbols are
set, no shared library is built.

SHLIB_LINK controls the name of the symbolic link that points to
the library.  If it is unset, no link is made.  In the usual case,
it gets the right default: e.g., "libc.so" for ELF, nothing for
a.out.  This can be overridden.

STATICOBJS can be set to a list of extra object files that should
be added to the static library but not to the shared library.
These objects are added to the profiled library too.

These changes should make it easy to use <bsd.lib.mk> for building
things such as PAM modules and dynamic linkers, for which <bsd.prog.mk>
has been abused until now.

25 years agoThe strtok_r() function is in libc now, so use it.
John Polstra [Wed, 20 Jan 1999 21:24:28 +0000 (21:24 +0000)]
The strtok_r() function is in libc now, so use it.

25 years agoAdd a prototype for strtok_r().
John Polstra [Wed, 20 Jan 1999 21:21:26 +0000 (21:21 +0000)]
Add a prototype for strtok_r().

25 years agoFix some mildly annoying compiler warnings about unused variables
Andrew Gallatin [Wed, 20 Jan 1999 20:51:39 +0000 (20:51 +0000)]
Fix some mildly annoying compiler warnings about unused variables
and incorrect types in printf() format strings.

25 years agoiso639 is the ISO two letter codes for the representation of the names of
Nik Clayton [Wed, 20 Jan 1999 19:46:42 +0000 (19:46 +0000)]
iso639 is the ISO two letter codes for the representation of the names of
languages (en = English, de = German, zn = Chinese, and so on). This
complements the existing iso3166 file, which maps codes to countries.

Country code != language code.

I ran this past -core. No one voiced any objections, jkh said "fine".

25 years ago*blush*. As a quick fix, move configure()'s SYSINIT back a little to allow
Peter Wemm [Wed, 20 Jan 1999 19:22:24 +0000 (19:22 +0000)]
*blush*.  As a quick fix, move configure()'s SYSINIT back a little to allow
CAM's xpt_init() to get in first.  I hope this will fix the build again,
sorry guys. :-(
XXX configure_start() and configure_end() seem to be a bit excessive.. both
here and in the i386 code.

25 years agotemporary fix so alpha stays working while configure code is fixed
Matt Jacob [Wed, 20 Jan 1999 19:08:45 +0000 (19:08 +0000)]
temporary fix so alpha stays working while configure code is fixed

25 years agoClarify the number of network interfaces per physical interface available with
Mike Spengler [Wed, 20 Jan 1999 18:36:58 +0000 (18:36 +0000)]
Clarify the number of network interfaces per physical interface available with
each type of signalling manager and bring the atm command into agreement with
the man page.

25 years agoFix raw timestamps (zero-pad usecs)
Bill Fenner [Wed, 20 Jan 1999 18:33:13 +0000 (18:33 +0000)]
Fix raw timestamps (zero-pad usecs)
Print 4-digit years in TIMESTAMP_PARSEABLE mode after '99.

PR: bin/9507

25 years agoI guess this is now a legacy driver (for alpha only right now).
Matt Jacob [Wed, 20 Jan 1999 18:27:31 +0000 (18:27 +0000)]
I guess this is now a legacy driver (for alpha only right now).
At any rate, some changes had to be made so that alpha would compile.

25 years agoRecurse when we've switched state via LoginDone(). If we've
Brian Somers [Wed, 20 Jan 1999 18:06:52 +0000 (18:06 +0000)]
Recurse when we've switched state via LoginDone().  If we've
got an open link, we want it to be select()d on - otherwise
we get a freeze when ``openmode'' is passive.

25 years agoAdd support for accessing ports. This was done to access parallel
Warner Losh [Wed, 20 Jan 1999 17:55:22 +0000 (17:55 +0000)]
Add support for accessing ports.  This was done to access parallel
ports, but should work for others as well.

Submitted by:  Parag Patel <parag@cgt.com>

25 years agoAlso consider the space left in the socket buffer when deciding whether
Bill Fenner [Wed, 20 Jan 1999 17:45:22 +0000 (17:45 +0000)]
Also consider the space left in the socket buffer when deciding whether
to set PRUS_MORETOCOME.

25 years agoAdd a flag, passed to pru_send routines, PRUS_MORETOCOME. This
Bill Fenner [Wed, 20 Jan 1999 17:32:01 +0000 (17:32 +0000)]
Add a flag, passed to pru_send routines, PRUS_MORETOCOME.  This
flag means that there is more data to be put into the socket buffer.
Use it in TCP to reduce the interaction between mbuf sizes and the
Nagle algorithm.

Based on: "Justin C. Walker" <justin@apple.com>'s description of Apple's
fix for this problem.

25 years agoremove - before __entry, it is not make conmmand but shell continuation line
Andrey A. Chernov [Wed, 20 Jan 1999 17:22:11 +0000 (17:22 +0000)]
remove - before __entry, it is not make conmmand but shell continuation line

25 years agoAdd 'options DEBUG_LOCKS', which stores extra information in struct
Eivind Eklund [Wed, 20 Jan 1999 14:49:12 +0000 (14:49 +0000)]
Add 'options DEBUG_LOCKS', which stores extra information in struct
lock, and add some macros and function parameters to make sure that
the information get to the point where it can be put in the lock
structure.

While I'm here, add DEBUG_VFS_LOCKS to LINT.

25 years agoPut back this wholly innocent victim of Mike's drive-by shooting on alog;
Jordan K. Hubbard [Wed, 20 Jan 1999 13:09:28 +0000 (13:09 +0000)]
Put back this wholly innocent victim of Mike's drive-by shooting on alog;
it belongs to the labpc driver.  Mike will be in the corner wearing
the pointed hat, should anyone be looking for him.

25 years agoReplace old SAVE_USERCONFIG code with a customized version of Andrzej's
Jordan K. Hubbard [Wed, 20 Jan 1999 12:31:43 +0000 (12:31 +0000)]
Replace old SAVE_USERCONFIG code with a customized version of Andrzej's
kget code.  Also collapse a redundant case in cdrom code.

25 years agonuke dset from here.
Jordan K. Hubbard [Wed, 20 Jan 1999 12:30:13 +0000 (12:30 +0000)]
nuke dset from here.

Reminded by: peter

25 years agoRemove obsolete dset code. It's an ELF/3-stage boot world now and there
Jordan K. Hubbard [Wed, 20 Jan 1999 11:56:42 +0000 (11:56 +0000)]
Remove obsolete dset code.  It's an ELF/3-stage boot world now and there
are cleaner ways of doing this that don't involve stomping on kernel
binaries directly.

25 years agonuke dset - it doesn't work in a post-ELF world and abial has something
Jordan K. Hubbard [Wed, 20 Jan 1999 11:53:20 +0000 (11:53 +0000)]
nuke dset - it doesn't work in a post-ELF world and abial has something
better as a replacement (kget).

25 years agoRemove man page links too, making the world work again.
Jordan K. Hubbard [Wed, 20 Jan 1999 11:36:26 +0000 (11:36 +0000)]
Remove man page links too, making the world work again.

Forgotten by: msmith

25 years agoRemove 'alog'.
KATO Takenori [Wed, 20 Jan 1999 08:31:56 +0000 (08:31 +0000)]
Remove 'alog'.

25 years agoSync with sys/i386/conf/Makefile.i386 revision 1.136.
KATO Takenori [Wed, 20 Jan 1999 08:29:48 +0000 (08:29 +0000)]
Sync with sys/i386/conf/Makefile.i386 revision 1.136.

25 years agoMerge conflicts from 3.9-beta3+IOS12. The conflicts were huge; cvs's
Bill Fenner [Wed, 20 Jan 1999 07:55:57 +0000 (07:55 +0000)]
Merge conflicts from 3.9-beta3+IOS12.  The conflicts were huge; cvs's
merge algorithm failed on several files, and the translation of the
mrouted man page to mdoc didn't help...