games.git
15 years agoMake c89 work by using 'cc' as execv()'s argv[0] to satisfy objformat.
Sascha Wildner [Sun, 25 May 2008 08:18:26 +0000 (08:18 +0000)]
Make c89 work by using 'cc' as execv()'s argv[0] to satisfy objformat.

15 years agoFix a very old bug where the root mount was not getting a filesystem syncer
Matthew Dillon [Sat, 24 May 2008 19:08:28 +0000 (19:08 +0000)]
Fix a very old bug where the root mount was not getting a filesystem syncer
assigned to it.  This caused the more recent vnode recycling code to fail
to recycle vnodes on the root mount, leading to resource starvation.

Reported-by: Peter Avalos <pavalos@theshell.com>,
     Michael Neumann <mneumann@ntecs.de>

15 years agoBump version to 1.11.
Matthew Dillon [Sat, 24 May 2008 17:22:39 +0000 (17:22 +0000)]
Bump version to 1.11.

15 years agoUse a per-bucket mutex to reduce contention and fix a seg-fault from a
Matthew Dillon [Sat, 24 May 2008 17:21:36 +0000 (17:21 +0000)]
Use a per-bucket mutex to reduce contention and fix a seg-fault from a
race in the transaction hash table.

15 years agoUse "pause" in spin loop.
Sepherosa Ziehau [Sat, 24 May 2008 12:52:49 +0000 (12:52 +0000)]
Use "pause" in spin loop.

Suggested-by: dillon@
15 years agoProperly work with path names which contain a dot.
Simon Schubert [Sat, 24 May 2008 09:15:43 +0000 (09:15 +0000)]
Properly work with path names which contain a dot.

Noticed-by: swildner@
15 years agoFix two cases where device_printf() was used with an empty format.
Sascha Wildner [Sat, 24 May 2008 09:11:09 +0000 (09:11 +0000)]
Fix two cases where device_printf() was used with an empty format.

15 years agoAvoid possible memory leakage.
Sepherosa Ziehau [Sat, 24 May 2008 08:04:42 +0000 (08:04 +0000)]
Avoid possible memory leakage.

15 years ago- Put inaddr hash table alterations in crit section
Sepherosa Ziehau [Sat, 24 May 2008 07:41:25 +0000 (07:41 +0000)]
- Put inaddr hash table alterations in crit section
- Hold ifnet.if_serializer only around ifnet.if_ioctl

15 years ago- Add blank lines between code segments
Sepherosa Ziehau [Sat, 24 May 2008 06:54:54 +0000 (06:54 +0000)]
- Add blank lines between code segments
- Add comment
- Minor style changes

15 years agoNo need to cast
Sepherosa Ziehau [Sat, 24 May 2008 06:03:23 +0000 (06:03 +0000)]
No need to cast

15 years agoHold ifnet.if_serializer around ifnet.if_ioctl; rtinit() does not need
Sepherosa Ziehau [Sat, 24 May 2008 05:22:44 +0000 (05:22 +0000)]
Hold ifnet.if_serializer around ifnet.if_ioctl; rtinit() does not need
ifnet.if_serializer's protection.

15 years agoMinor style change. Add blank line between two 'switch' code blocks.
Sepherosa Ziehau [Sat, 24 May 2008 04:59:14 +0000 (04:59 +0000)]
Minor style change.  Add blank line between two 'switch' code blocks.

15 years agoMinor white space and style changes
Sepherosa Ziehau [Sat, 24 May 2008 04:19:31 +0000 (04:19 +0000)]
Minor white space and style changes

15 years agoAdd comment
Sepherosa Ziehau [Sat, 24 May 2008 03:57:26 +0000 (03:57 +0000)]
Add comment

15 years agoFix a warning and raise WARNS to 6.
Sascha Wildner [Fri, 23 May 2008 23:40:59 +0000 (23:40 +0000)]
Fix a warning and raise WARNS to 6.

15 years agoCalls to DIOCSYNCSLICEINFO were being made with the assumption that
Matthew Dillon [Fri, 23 May 2008 19:46:37 +0000 (19:46 +0000)]
Calls to DIOCSYNCSLICEINFO were being made with the assumption that
CD_FLAG_OPEN indicated an already-open device.  With recent changes this
flag is set prior to the check and the calls were being made without
any slice information, causing a panic.  For now follow what FreeBSD did
and just remove the calls.

Remove redundant setting of CD_FLAG_OPEN.

Reported-by: VOROSKOI Andras <sinknull@crater.dragonflybsd.org>,
     Michael Neumann <mneumann@ntecs.de>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1016>

15 years ago- Print L3 cache (on NorthBridge) information
Sepherosa Ziehau [Fri, 23 May 2008 15:36:59 +0000 (15:36 +0000)]
- Print L3 cache (on NorthBridge) information
- Correct L2 cache associative and register mapping

15 years ago- For 350 chips, don't set various INTR bits in TX control word; turning INTR
Sepherosa Ziehau [Fri, 23 May 2008 15:34:03 +0000 (15:34 +0000)]
- For 350 chips, don't set various INTR bits in TX control word; turning INTR
  bits on seems to confuse hardware TX engine
- For 350 chips, set TX desc's buffer physical address before turning on the
  TX desc valid bit
- In an_start, set IFF_OACTIVE, if there is no free TX desc called; this avoids
  confusing functions which schedule ifnet.if_start
- Minor style and white space changes

Submitted-by: Jost Tobias Springenberg <jspringe@uos.de>
15 years agoFix a pipelining performance issue due to the way reading from the socket
Matthew Dillon [Fri, 23 May 2008 06:55:11 +0000 (06:55 +0000)]
Fix a pipelining performance issue due to the way reading from the socket
was implemented.  Instead of having the threads compete for read-access to
the socket, create a single thread whos responsibility is to read traffic
from the socket and route it to the appropriate transaction.  This greatly
improves parallel threading performance for cpdup's to remote hosts.

15 years agoRemove commented out references to lwkt_* source files as lwkt is no more
Nicolas Thery [Thu, 22 May 2008 20:01:55 +0000 (20:01 +0000)]
Remove commented out references to lwkt_* source files as lwkt is no more
supported userland.

15 years agoAdd support for for the AI_NUMERICSERV getaddrinfo(3) flag. While pulling
Hasso Tepper [Thu, 22 May 2008 06:50:14 +0000 (06:50 +0000)]
Add support for for the AI_NUMERICSERV getaddrinfo(3) flag. While pulling
documentation for it from FreeBSD, add missing info about other flags as
well.

Obtained-from: KAME and FreeBSD

15 years agoHAMMER 47/Many: Stabilization pass
Matthew Dillon [Thu, 22 May 2008 04:14:01 +0000 (04:14 +0000)]
HAMMER 47/Many: Stabilization pass

* Fix a buffer cache deadlock.  Buffers representing pending I/O must be
  thrown away (by calling biodone()'d) when cleaning a deleted inode out on
  the backend.  Otherwise the truncation can deadlock against them.

15 years agoAdd KTR_KERNENTRY to ktr(4) and LINT.
Sascha Wildner [Thu, 22 May 2008 04:00:43 +0000 (04:00 +0000)]
Add KTR_KERNENTRY to ktr(4) and LINT.

15 years agokprintf to device_printf conversion.
Michael Neumann [Wed, 21 May 2008 19:56:46 +0000 (19:56 +0000)]
kprintf to device_printf conversion.

15 years agoBring in fixes for a bug which occurs when the filesystem become fulls.
Matthew Dillon [Wed, 21 May 2008 18:49:49 +0000 (18:49 +0000)]
Bring in fixes for a bug which occurs when the filesystem become fulls.
This bug could result in 'ffs blkfree: freeing free block' panics.

However, this may not fix all such panics.  The jury is still out as of this
commit.

Obtained-from:  FreeBSD/ffs_balloc.c 1.52 and 1.53

15 years agotest test
Michael Neumann [Wed, 21 May 2008 14:45:25 +0000 (14:45 +0000)]
test test

15 years agoUpdate blacklists to more thorough versions.
Simon Schubert [Wed, 21 May 2008 14:07:41 +0000 (14:07 +0000)]
Update blacklists to more thorough versions.

Obtained-from:  Debian openssh-blacklist 0.3
Submitted-by: Atte Peltomaki <koston@iki.fi>
15 years agoMerge error fix.
Hasso Tepper [Tue, 20 May 2008 21:13:39 +0000 (21:13 +0000)]
Merge error fix.

Spotted-by: corecode and Rumko.
15 years agoAdd a define for IEEE80211_FC1_PROTECTED.
Matthew Dillon [Tue, 20 May 2008 19:23:25 +0000 (19:23 +0000)]
Add a define for IEEE80211_FC1_PROTECTED.

Taken-From: OpenBSD
Submitted-by: Cristi Magherusan <majeru@gentoo.ro>
15 years agoProperly track the write-open count when updating a msdos mount from RW to RO,
Matthew Dillon [Tue, 20 May 2008 19:14:38 +0000 (19:14 +0000)]
Properly track the write-open count when updating a msdos mount from RW to RO,
or from RO to RW.

Reported-by: Rumko <rumcic@gmail.com>
15 years agoAdd a DELAY(500) during the register init phase to give the device some time
Matthew Dillon [Tue, 20 May 2008 18:23:33 +0000 (18:23 +0000)]
Add a DELAY(500) during the register init phase to give the device some time
to initialize before attempting to read its memory space.

Taken-From: FreeBSD

15 years agoUpdate the traceroute(8) to the newest code from FreeBSD HEAD. Besides many
Hasso Tepper [Tue, 20 May 2008 12:14:10 +0000 (12:14 +0000)]
Update the traceroute(8) to the newest code from FreeBSD HEAD. Besides many
typo, style etc fixes this brings in the ability to specify protocol used
for probes: UDP6, ICMPv6 and NONE (useful for testing firewalls).

Obtained-from: FreeBSD

15 years agoFix an overflow in the time calculation.
Matthew Dillon [Mon, 19 May 2008 16:39:09 +0000 (16:39 +0000)]
Fix an overflow in the time calculation.

15 years agoUse correct date.
Sascha Wildner [Mon, 19 May 2008 11:34:23 +0000 (11:34 +0000)]
Use correct date.

15 years agoEnable MS-style pragma push/pop.
Simon Schubert [Mon, 19 May 2008 10:46:39 +0000 (10:46 +0000)]
Enable MS-style pragma push/pop.

Obtained-from:  FreeBSD
Noticed-by: RussianE3 @ #dragonflybsd
15 years agoFill CPU info for vkernels. This makes KTR use TSC in vkernels.
Simon Schubert [Mon, 19 May 2008 10:29:58 +0000 (10:29 +0000)]
Fill CPU info for vkernels.  This makes KTR use TSC in vkernels.

15 years agoAdd KTR for tracing userland->kernel entries, i.e. faults and syscalls.
Simon Schubert [Mon, 19 May 2008 10:28:06 +0000 (10:28 +0000)]
Add KTR for tracing userland->kernel entries, i.e. faults and syscalls.

15 years agoAdd macros for the linker, which might be different than the compiler.
Simon Schubert [Mon, 19 May 2008 10:26:02 +0000 (10:26 +0000)]
Add macros for the linker, which might be different than the compiler.

15 years agoDon't manually declare select, instead include sys/select.h.
Simon Schubert [Mon, 19 May 2008 10:21:31 +0000 (10:21 +0000)]
Don't manually declare select, instead include sys/select.h.

15 years agoDon't #include <sys/select.h> from sys/types.h, to conform to SUS.
Simon Schubert [Mon, 19 May 2008 10:19:49 +0000 (10:19 +0000)]
Don't #include <sys/select.h> from sys/types.h, to conform to SUS.

Some old BSD programs assume that sys/types.h is basically enough
to get all types and even functions declared, so adjust these.
sys/param.h still works as kitchensink and includes sys/select.h.

15 years agoChange asf defaults and flags to suit Dragonfly more.
Simon Schubert [Mon, 19 May 2008 10:13:08 +0000 (10:13 +0000)]
Change asf defaults and flags to suit Dragonfly more.

15 years agoDeclare lsearch(3)/lfind(3), move them to libc and make them POSIX compliant.
Simon Schubert [Mon, 19 May 2008 10:06:34 +0000 (10:06 +0000)]
Declare lsearch(3)/lfind(3), move them to libc and make them POSIX compliant.

Obtained-from:  FreeBSD

15 years agoDeclare lsearch(3)/lfind(3), move them to libc and make them POSIX compliant.
Simon Schubert [Mon, 19 May 2008 10:05:18 +0000 (10:05 +0000)]
Declare lsearch(3)/lfind(3), move them to libc and make them POSIX compliant.

Obtained-from:  FreeBSD

15 years agoHAMMER 46B/Many: Stabilization pass
Matthew Dillon [Sun, 18 May 2008 21:47:06 +0000 (21:47 +0000)]
HAMMER 46B/Many: Stabilization pass

* Add a feature to vmntvnodescan() to only do one pass on the vnode list.
  Have HAMMER use it.

* Fix a buffer cache leak.  Buffers could wind up disassociated from their
  HAMMER structures while in a B_LOCKED state, preventing the kernel from
  reusing them.

15 years agoRemove obsolete userland lwkt.
Nicolas Thery [Sun, 18 May 2008 20:57:56 +0000 (20:57 +0000)]
Remove obsolete userland lwkt.

Approved-By: dillon@
(http://leaf.dragonflybsd.org/mailarchive/kernel/2008-05/msg00053.html)

15 years agoSync CAM with FreeBSD using lockmgr locks instead of mutexes.
Peter Avalos [Sun, 18 May 2008 20:30:23 +0000 (20:30 +0000)]
Sync CAM with FreeBSD using lockmgr locks instead of mutexes.
Note:  This is mostly a code sync with FreeBSD which improves stability
in addition to the items listed below.  This provides a framework for
releasing the mplock, but for now it's still there.

Add an xpt_print function to reduce most of the xpt_print_path/printf
pairs. Convert the core code to use it.

Initial cut at Basic Domain Validation.

Make cam_xpt's pronouncements match camcontrol (Tagged -> Command) Queueing.

Pay attention to return value from xpt_bus_register in xpt_init.

Add an xpt_rescan function and a thread that will field rescan requests.
The purpose of this is to allow a SIM (or other entities) to request a bus
rescan and have it then fielded in a different (process) context from the
caller.

Check the return value from cam_periph_acquire.

Drop the periph/sim lock when calling disk_destroy().

Drop the topology lock before calling the periph oninvalidate and dtor
vectors.

For the XPT_SASYNC_CB operation, only decouple the broadcast to the bus
and device lists instead of decoupling the whole operation.  This avoids
problems with SIMs going away.

Split the camisr into per-SIM done queues.  This optimizes the locking a
little bit and allows for direct dispatch of the doneq from certain
contexts that would otherwise face recursive locking problems.

Zero the CCBs when mallocing them.

Only schedule the xpt_finishconfig_task once.

Eliminate the use of M_TEMP.

Add a helper function for registering async callbacks.

Release the bus reference that is acquired when doing a CAMIOCOMMAND ioctl.

Zero scsi_readcapacity allocations so we can really tell if there has
been data returned.

Remove duplicate includes and fix typos.

Add a bunch of definitions and structures to support newer drivers.

When probing a newly found device, don't automatically assume that the
device supports retrieving a serial number.  Instead, first query the
list of VPD pages it does support, and only query the serial number if
it's supported, else silently move on.  This eliminates a lot of noise
during verbose booting, and will likely eliminate the need for most
NOSERIAL quirks.

Reduce diffs from FreeBSD.

Obtained-from: FreeBSD

15 years agoAllocate struct lwp instances with kmalloc() instead of zalloc() for MP safety.
Nicolas Thery [Sun, 18 May 2008 20:02:02 +0000 (20:02 +0000)]
Allocate struct lwp instances with kmalloc() instead of zalloc() for MP safety.

15 years agoCount if_opackets and if_oerrors.
Sepherosa Ziehau [Sun, 18 May 2008 08:10:03 +0000 (08:10 +0000)]
Count if_opackets and if_oerrors.

15 years agoCount if_opackets.
Sepherosa Ziehau [Sun, 18 May 2008 07:47:14 +0000 (07:47 +0000)]
Count if_opackets.

Reported-by: Xin LI <delphij@delphij.net>
15 years agoFix a number of core kernel issues related to HAMMER operation.
Matthew Dillon [Sun, 18 May 2008 05:54:31 +0000 (05:54 +0000)]
Fix a number of core kernel issues related to HAMMER operation.

* The cluster code was incorrectly using the maximum IO size from
  the filesystem on which /dev is mounted instead of the maximum
  IO size of the block device.  This became evident when HAMMER
  (with 16K blocks) tried to call cluster_read() via /dev/ad6s1h
  (on UFS with 8K blocks).

* Change the way the VNLRU code works to avoid an infinite loop in
  vmntvnodescan().  The vnode LRU recycling code was cycling vnodes
  from the head of mp->mnt_nvnodelist to the tail.  Under certain heavy
  load conditions this could cause a vmntvnodescan() to never finish
  running and eventually hit a count assertion (at 1,000,000 vnodes scanned).

  Instead of cycling the vnodes in the mnt_nvnodelist, use the syncer
  vnode (mount->mnt_syncer) as a placemarker and move *IT* within the
  list to represent the LRU scan.  By not cycling vnodes to the end
  of the list, vmntvnodescan() can no longer get into an infinite loop.

* Change the mount->mnt_syncer logic slightly to avoid races against
  a background sync while unmounting.  The field is no longer cleared
  by the sync_reclaim() call but is instead cleared by the unmount code
  before vrele()ing the special vnode.

15 years ago- Add devq which stores mbuf dequeued from ifnet.if_snd during ifnet.if_sart.
Sepherosa Ziehau [Sun, 18 May 2008 05:12:08 +0000 (05:12 +0000)]
- Add devq which stores mbuf dequeued from ifnet.if_snd during ifnet.if_sart.
  This is mainly used to avoid confusing functions scheduling ifnet.if_start
- Add tapifstop() which drains devq and clear IFF_RUNNING and IFF_OACTIVE.
- In tapopen(), move TAP_OPEN flag testing before announcing ifnet_attach_event
- Remove ifnet.if_serializer holding around ifq operation.
- White space and minor style changes.

15 years agoReturn after calling bridge_ouput_p.
Sepherosa Ziehau [Sun, 18 May 2008 04:38:44 +0000 (04:38 +0000)]
Return after calling bridge_ouput_p.

Reported-by: dillon@
15 years agoIt's "useful" not "usefull".
Peter Avalos [Sun, 18 May 2008 03:02:53 +0000 (03:02 +0000)]
It's "useful" not "usefull".

15 years agoKNOTE still needs mplock, so tapifstart() could be called in MPSAFE theads.
Sepherosa Ziehau [Sun, 18 May 2008 02:40:41 +0000 (02:40 +0000)]
KNOTE still needs mplock, so tapifstart() could be called in MPSAFE theads.

15 years agoHAMMER Utilities: Update for HAMMER changes.
Matthew Dillon [Sun, 18 May 2008 01:49:44 +0000 (01:49 +0000)]
HAMMER Utilities: Update for HAMMER changes.

* Update for localization changes made in the filesystem.

* Make minor feature adjustments.

15 years agoHAMMER 46/Many: Performance pass, media changes, bug fixes.
Matthew Dillon [Sun, 18 May 2008 01:48:50 +0000 (01:48 +0000)]
HAMMER 46/Many: Performance pass, media changes, bug fixes.

* Add a localization field to the B-Tree element which has sorting priority
  over the object id.

  Use the localization field to separate inode entries from file data.  This
  allows the reblocker to cluster inode information together and greatly
  improves directory/stat performance.

* Enhance the reblocker to reblock internal B-Tree nodes as well as leaves.

* Enhance the reblocker by adding 'reblock-inodes' in addition to
  'reblock-data' and 'reblock-btree', allowing individual types of
  meta-data to be independantly reblocked.

* Fix a bug in hammer_bread().  The buffer's zoneX_offset field was
  sometimes not being properly masked, resulting in unnecessary blockmap
  lookups.  Also add hammer_clrxlate_buffer() to clear the translation
  cache for a hammer_buffer.

* Fix numerous issues with hmp->sync_lock.

* Fix a buffer exhaustion issue in the pruner and reblocker due to not
  counting I/O's in progress as being dirty.

* Enhance the symlink implementation.  Take advantage of the extra 24 bytes
  of space in the inode data to directly store symlinks <= 24 bytes.

* Use cluster_read() to gang read I/O's into 64KB chunks.  Rely on
  localization and the reblocker and pruner to make doing the larger
  I/O's worthwhile.

These changes reduce ls -lR overhead on 43383 files (half created with cpdup,
half totally randomly created with blogbench).  Overhead went from 35 seconds
after reblocking, before the changes, to 5 seconds after reblocking,
after the changes.

15 years agoChange cluster_read() to not block on read-ahead buffers it is unable to
Matthew Dillon [Sun, 18 May 2008 01:35:40 +0000 (01:35 +0000)]
Change cluster_read() to not block on read-ahead buffers it is unable to
immediately lock.  HAMMER needs this because HAMMER will cluster at the
device level and becaue of that the cluster can cover multiple buffer
types and inodes.

15 years agoSync with NetBSD:
Peter Avalos [Sat, 17 May 2008 22:48:04 +0000 (22:48 +0000)]
Sync with NetBSD:

Add EL_REFRESH and rl_forced_update_display().

15 years agoRemove unused proc_zone declaration.
Nicolas Thery [Sat, 17 May 2008 22:04:07 +0000 (22:04 +0000)]
Remove unused proc_zone declaration.

15 years agoMove patches for tnftp into contrib/ and remove -I- to make gcc4 quieter.
Peter Avalos [Sat, 17 May 2008 22:01:12 +0000 (22:01 +0000)]
Move patches for tnftp into contrib/ and remove -I- to make gcc4 quieter.

15 years agoQuiet gcc4. -I- isn't required any more.
Peter Avalos [Sat, 17 May 2008 21:53:39 +0000 (21:53 +0000)]
Quiet gcc4. -I- isn't required any more.

15 years agoChanges for libarchive-2.4.17 import.
Peter Avalos [Sat, 17 May 2008 21:51:47 +0000 (21:51 +0000)]
Changes for libarchive-2.4.17 import.

15 years agoMerge from vendor branch LIBARCHIVE:
Peter Avalos [Sat, 17 May 2008 21:50:43 +0000 (21:50 +0000)]
Merge from vendor branch LIBARCHIVE:
Import libarchive-2.4.17.  See NEWS for details.

15 years agoImport libarchive-2.4.17. See NEWS for details.
Peter Avalos [Sat, 17 May 2008 21:50:43 +0000 (21:50 +0000)]
Import libarchive-2.4.17.  See NEWS for details.

15 years agoMerge from vendor branch TNFTP:
Peter Avalos [Sat, 17 May 2008 21:46:19 +0000 (21:46 +0000)]
Merge from vendor branch TNFTP:
Sync with NetBSD:

Use the service name to getaddrinfo() (along with the host name), so that
features such as DNS Service Discovery have a better chance of working.

Display the service name in various status & error messages.

Don't getservbyname() the :port component of a URL; RFC 3986 says it's
just an unsigned number, not a service name.

Only attempt to el_parse() a command unknown by the default parser
if editing is enabled.
Fixes NetBSD PR bin/38589

Add epsv6 and epsv to disable extended passive mode for ipv6 or both ipv4
and ipv6 respectively.

15 years agoSync with NetBSD: chlamydia/vendor/TNFTP crater/vendor/TNFTP
Peter Avalos [Sat, 17 May 2008 21:46:19 +0000 (21:46 +0000)]
Sync with NetBSD:

Use the service name to getaddrinfo() (along with the host name), so that
features such as DNS Service Discovery have a better chance of working.

Display the service name in various status & error messages.

Don't getservbyname() the :port component of a URL; RFC 3986 says it's
just an unsigned number, not a service name.

Only attempt to el_parse() a command unknown by the default parser
if editing is enabled.
Fixes NetBSD PR bin/38589

Add epsv6 and epsv to disable extended passive mode for ipv6 or both ipv4
and ipv6 respectively.

15 years agoSyntax cleanup and also commit a missing piece of the jail_allow_raw_sockets
Matthew Dillon [Sat, 17 May 2008 20:33:36 +0000 (20:33 +0000)]
Syntax cleanup and also commit a missing piece of the jail_allow_raw_sockets
sysctl.

15 years agoMerge from vendor branch LESS:
Peter Avalos [Sat, 17 May 2008 19:31:28 +0000 (19:31 +0000)]
Merge from vendor branch LESS:
Update to less-418:

Fix search bug when using -R and text contains ANSI color escape sequences.
Fix crash when using -r with UTF-8 text containing 0x9B bytes.
Fix display bug when using ' command to move less than one page forward.
Update GPL to version 3.

15 years agoUpdate to less-418:
Peter Avalos [Sat, 17 May 2008 19:31:28 +0000 (19:31 +0000)]
Update to less-418:

Fix search bug when using -R and text contains ANSI color escape sequences.
Fix crash when using -r with UTF-8 text containing 0x9B bytes.
Fix display bug when using ' command to move less than one page forward.
Update GPL to version 3.

15 years agoAdd a sysctl jail.allow_raw_sockets (default to diabled) which allows
Matthew Dillon [Sat, 17 May 2008 18:20:33 +0000 (18:20 +0000)]
Add a sysctl jail.allow_raw_sockets (default to diabled) which allows
jails to use raw sockets.

Submitted-by: "Kevin L. Kane" <kevin.kane@gmail.com>
15 years agoOur man can use local files, thus mark as done.
Sascha Wildner [Sat, 17 May 2008 09:16:13 +0000 (09:16 +0000)]
Our man can use local files, thus mark as done.

15 years agoHAMMER Utilities: Stabilization pass.
Matthew Dillon [Fri, 16 May 2008 18:39:03 +0000 (18:39 +0000)]
HAMMER Utilities: Stabilization pass.

* Fix a bug in 'hammer show' which caused the cache to expand indefinitely.

15 years agoCasting anything above ~2.1G to 'int' makes the result value negative.
Sepherosa Ziehau [Fri, 16 May 2008 14:46:46 +0000 (14:46 +0000)]
Casting anything above ~2.1G to 'int' makes the result value negative.

15 years agoUnify vlan_input() and vlan_input_tag():
Sepherosa Ziehau [Fri, 16 May 2008 13:19:12 +0000 (13:19 +0000)]
Unify vlan_input() and vlan_input_tag():
- For device drivers that support hardware vlan tag extraction, mbuf's
  M_VLANTAG is turned on and vlan tag is saved in mbuf.m_pkthdr.ether_vlantag
- At the very beginning of ether_input_chain(), if the packet's ether type is
  vlan and hardware does not extract vlan tag, vlan_ether_decap() is called to
  do software vlan tag extraction.
- Instead of BPF_MTAP(), ETHER_BPF_MTAP() is used in ether_input_chain() to
  deliver possible vlan tagging information to the bpf listeners.
- Ether header is restored before calling vlan_input(), so under most cases,
  extra ether header copy is avoided.  vlan_input() does nothing more than
  finding vlan interface and looping back the packet to ether_input_chain()
  with vlan interface as input interface.

Ideas-from: FreeBSD

15 years agoAdd blacklist feature for weak Debian-generated ssh keys.
Simon Schubert [Fri, 16 May 2008 11:44:56 +0000 (11:44 +0000)]
Add blacklist feature for weak Debian-generated ssh keys.

Default is to disallow weak keys.

Obtained-from:  Ubuntu Linux

15 years agoAdd blacklist feature for weak Debian-generated ssh keys.
Simon Schubert [Fri, 16 May 2008 10:49:26 +0000 (10:49 +0000)]
Add blacklist feature for weak Debian-generated ssh keys.

Default is to disallow weak keys.

Obtained-from:  Ubuntu Linux

15 years agoAdd blacklist feature for weak Debian-generated ssh keys.
Simon Schubert [Fri, 16 May 2008 10:48:44 +0000 (10:48 +0000)]
Add blacklist feature for weak Debian-generated ssh keys.

Default is to disallow weak keys.

Obtained-from:  Ubuntu Linux

15 years agoFor 'make upgrade', teach etc/Makefile to remove GNU info files from the
Sascha Wildner [Thu, 15 May 2008 18:29:30 +0000 (18:29 +0000)]
For 'make upgrade', teach etc/Makefile to remove GNU info files from the
'dir' menu before deleting them and move the files from etc/Makefile to
Makefile_upgrade.inc.

Submitted-by: matthias
15 years ago'check' label is only used in SMP build.
Sepherosa Ziehau [Thu, 15 May 2008 13:48:27 +0000 (13:48 +0000)]
'check' label is only used in SMP build.

Noticed-by: swildner@
15 years agoAdd some more remains from the Fortran removal.
Sascha Wildner [Thu, 15 May 2008 11:53:20 +0000 (11:53 +0000)]
Add some more remains from the Fortran removal.

15 years agoBump .Dd for r1.8.
Sascha Wildner [Thu, 15 May 2008 09:26:14 +0000 (09:26 +0000)]
Bump .Dd for r1.8.

15 years agoMention ASSERT_NOT_SERIALIZED() and IS_SERIALIZED() macros.
Sascha Wildner [Thu, 15 May 2008 09:21:40 +0000 (09:21 +0000)]
Mention ASSERT_NOT_SERIALIZED() and IS_SERIALIZED() macros.

15 years agoThe char dummy must be dummy[2] to accomodate a nul terminator when dealing
Matthew Dillon [Thu, 15 May 2008 03:59:59 +0000 (03:59 +0000)]
The char dummy must be dummy[2] to accomodate a nul terminator when dealing
with a degenerate buffer size.

Submitted-by: Johannes Hofmann <Johannes.Hofmann@gmx.de>
Taken-from: FreeBSD

15 years agoFix str[c]spn off by one error.
Matthew Dillon [Thu, 15 May 2008 03:48:58 +0000 (03:48 +0000)]
Fix str[c]spn off by one error.

Submitted-by: "Dionysus Blazakis" <dion.blazakis@gmail.com>
15 years agoHAMMER 45/Many: Stabilization pass, undo sequencing.
Matthew Dillon [Thu, 15 May 2008 03:36:40 +0000 (03:36 +0000)]
HAMMER 45/Many: Stabilization pass, undo sequencing.

* The flusher was improperly requesting a reflush on buffers.  The flush
  request was being defered for any buffers with active front-end references
  and then wound up being flushed by the front-end, breaking ordering
  requirements.

  Remove the reflush flag entirely.  This fixes numerous crash recovery
  cases.

* Add a missing unlock in the reblocking ioctl code which was responsible
  for a number of process lockups.

* Enhance the undo recovery kprintf.

* Validate the CRC in UNDO records

15 years agoHAMMER Utilities: Features
Matthew Dillon [Thu, 15 May 2008 03:23:41 +0000 (03:23 +0000)]
HAMMER Utilities: Features

* Display a 'B' flag for b-tree nodes whos CRCs fail.

15 years agoMake use of interrupt endpoint to increase responsiveness.
Hasso Tepper [Wed, 14 May 2008 20:21:22 +0000 (20:21 +0000)]
Make use of interrupt endpoint to increase responsiveness.

Obtained-from: OpenBSD

15 years agoRemove fortran from base.
Hasso Tepper [Wed, 14 May 2008 15:02:48 +0000 (15:02 +0000)]
Remove fortran from base.

15 years agoMention KTR_IFQ and KTR_IF_START
Sepherosa Ziehau [Wed, 14 May 2008 13:02:04 +0000 (13:02 +0000)]
Mention KTR_IFQ and KTR_IF_START

Reminded-by: swildner@
15 years agoReduce ifnet.if_serializer contention on output path:
Sepherosa Ziehau [Wed, 14 May 2008 11:59:24 +0000 (11:59 +0000)]
Reduce ifnet.if_serializer contention on output path:
- Push ifnet.if_serializer holding down into each ifnet.if_output implementation
- Add a serializer into ifaltq, which is used to protect send queue instead of
  its parent's if_serializer.  This change has following implication:
  o  On output path, enqueueing packets and calling ifnet.if_start are decoupled
  o  In device drivers, poll->dev_encap_ok->dequeue operation sequence is no
     longer safe, instead dequeue->dev_encap_fail->prepend should be used
  This serializer will be held by using lwkt_serialize_adaptive_enter()
- Add altq_started field into ifaltq, which is used to interlock the calling
  of its parent's if_start, to reduce ifnet.if_serializer contention.
  if_devstart(), a helper function which utilizes ifaltq.altq_started, is added
  to reduce code duplication in ethernet device drivers.
- Add if_cpuid into ifnet.  This field indicates on which CPU device driver's
  interrupt will happen.
- Add ifq_dispatch().  This function will try to hold ifnet.if_serializer in
  order to call ifnet.if_start.  If this attempt fails, this function will
  schedule ifnet.if_start to be called on CPU located by ifnet.if_start_cpuid
  if_start_nmsg, which is per-CPU netmsg, is added to ifnet to facilitate
  ifnet.if_start scheduling.  ifq_dispatch() is called by ether_output_frame()
  currently
- Use ifq_classic_ functions, if altq is not enabled
- Fix various device drivers bugs in their if_start implementation
- Add ktr for ifq classic enqueue and dequeue
- Add ktr for ifnet.if_start

15 years agoHAMMER Utilities: Feature add
Matthew Dillon [Tue, 13 May 2008 20:49:34 +0000 (20:49 +0000)]
HAMMER Utilities: Feature add

Add a new command 'synctid <filesystem>' which provides a formal transaction
id representing the state of the filesystem as of when it is called.  The
filesystem will be properly synced by the command and an interlocked
timestamp will be returned.

Remove the -x option, remove the calls to sync() by the 'now' and 'now64'
directives.  No longer sleep for one second in 'now'.  Document that these
directives do not return a guaranteed transaction id.

15 years agoHAMMER 44/Many: Stabilization pass, user-guaranteed transaction ids
Matthew Dillon [Tue, 13 May 2008 20:46:55 +0000 (20:46 +0000)]
HAMMER 44/Many: Stabilization pass, user-guaranteed transaction ids

* B-Tree changes:  Allow leaves to be empty.  Do not leave internal nodes
  with subtree_offsets of 0 when deleting a B-Tree element.  Do not try to
  clean up internal nodes with subtree_offsets of 0 while scanning the B-Tree.

  The pruner will be made responsible for such cleanups.  This way the
  front-end does not modify the B-Tree at all.

* Add a new ioctl to support the hammer utility 'synctid' command.

15 years agoRemove udbp(4) form tree. It was never connected to the build and supports
Hasso Tepper [Tue, 13 May 2008 08:46:36 +0000 (08:46 +0000)]
Remove udbp(4) form tree. It was never connected to the build and supports
only ancient devices.

15 years agoAssorted fixes to ugen(4) from FreeBSD.
Hasso Tepper [Tue, 13 May 2008 08:35:12 +0000 (08:35 +0000)]
Assorted fixes to ugen(4) from FreeBSD.

Obtained-from: FreeBSD

15 years agoHAMMER 43C/Many: Performance cleanup
Matthew Dillon [Tue, 13 May 2008 05:04:39 +0000 (05:04 +0000)]
HAMMER 43C/Many: Performance cleanup

* Do not put an inode on the sync list when it becomes inactive, unless
  it no longer has filesystem visibility.  This greatly reduces the amount
  of cycling which occurs on the inode B-Tree element, and greatly reduces
  spurious backend flushes.

  This change results in a major performance improvement for both reads
  and writes in a massively parallel I/O test (blogbench).  Write
  performance more then doubles and read performance increases by 20%.

* Lock the freemap free code.

* Remove some of the debug code.

15 years agoHAMMER Utilities: Misc features and adjustments.
Matthew Dillon [Tue, 13 May 2008 04:58:10 +0000 (04:58 +0000)]
HAMMER Utilities: Misc features and adjustments.

* Directory and symlink names were not being properly clipped.

* Additional -v options will display more of the contents of the inode
  data structure.

15 years agoHAMMER 43B/Many: Correct delete-on-disk record bug.
Matthew Dillon [Tue, 13 May 2008 00:15:28 +0000 (00:15 +0000)]
HAMMER 43B/Many: Correct delete-on-disk record bug.

* When an inode is being deleted any delete-on-disk records must be flushed,
  instead of freed.

15 years agoHAMMER 43A/Many: Cleanup, bug fixes.
Matthew Dillon [Mon, 12 May 2008 23:15:46 +0000 (23:15 +0000)]
HAMMER 43A/Many: Cleanup, bug fixes.

* Fix an assertion that can occur when a deleted softlink is racing a
  sync of the inode.

* Set HAMER_INODE_DONDISK for general records as well as for data records.
  This flag is set when a record might be laid down on media before its
  inode.  (This fixes an assertion).

* Set HAMMER_INODE_DDIRTY for all mtime updates.

* Clean up hammer_ip_check_directory_empty().

15 years agoHAMMER 43/Many: Remove records from the media format, plus other stuff
Matthew Dillon [Mon, 12 May 2008 21:17:18 +0000 (21:17 +0000)]
HAMMER 43/Many: Remove records from the media format, plus other stuff

* Get rid of hammer_record_ondisk.  As HAMMER has evolved the need for
  a separate record structure has devolved into trivialities.  Originally
  the idea was to have B-Tree nodes referencing records and data.  The
  B-Tree elements were originally intended to be throw-away and the on-media
  records were originally intended to be the official representation of
  the data and contained additional meta-information such as the obj_id
  of a directory entry and a few additional fields related to the inode.

  But once the UNDO code went in and it became obvious that the B-Tree needed
  to be tracked (undo-wise) along with everything else, the need for an
  official representation of the record as a separate media structure
  essentially disappeared.

  Move the directory-record meta-data into the directory-entry data and move
  the inode-record meta-data into the inode-record data.  As a single
  exception move the atime field to the B-Tree element itself (it replaces
  what used to be the record offset), in order to continue to allow atime
  updates to occur without requiring record rewrites.  With these changes
  records are no longer needed at all, so remove the on-media record structure
  and all the related code.

* The removal of the on-media record structure also greatly improves
  performance.

* B-Tree elements are now the official on-media record.

* Fix a race in the extraction of the root of the B-Tree.

* Clean up the in-memory record handling API.  Instead of having to
  construct B-Tree leaf elements we can simply embed one in the in-memory
  record structure (struct hammer_record), and in the inode.