dragonfly.git
15 years agoHAMMER Utilities: Sync with 59A
Matthew Dillon [Thu, 26 Jun 2008 04:07:57 +0000 (04:07 +0000)]
HAMMER Utilities: Sync with 59A

* Add mirror-read, mirror-write, and status directives.

15 years agoHAMMER 59A/Many: Mirroring related work (and one bug fix).
Matthew Dillon [Thu, 26 Jun 2008 04:06:23 +0000 (04:06 +0000)]
HAMMER 59A/Many: Mirroring related work (and one bug fix).

* BUG FIX: Fix a bug in directory hashkey generation.  The iterator could
  sometimes conflict with a key already on-disk and interfere with a pending
  deletion.  The chance of this occuring was miniscule but not 0.  Now fixed.

  The fix also revamps the directory iterator code, moving it all to one
  place and removing it from two other places.

* PRUNING CHANGE: The pruning code no longer shifts the create_tid and
  delete_tid of adjacent records to fill gaps.  This means that historical
  queries must either use snapshot softlinks or use a fine-grained
  transaction id greater then the most recent snapshot softlink.

  fine-grained historical access still works up to the first snapshot
  softlink.

* Clean up the cursor code responsible for acquiring the parent node.

* Add the core mirror ioctl read/write infrastructure.  This work is still
  in progress.

  - ioctl commands
  - pseudofs enhancements, including st_dev munging.
  - mount options
  - transaction id and object id conflictless allocation
  - initial mirror_tid recursion up the B-Tree (not finished)
  - B-Tree mirror scan optimizations to skip sub-hierarchies that do not
    need to be scanned (requires mirror_tid recursion to be 100% working).

15 years agoRemove trailing space.
Sascha Wildner [Wed, 25 Jun 2008 17:51:16 +0000 (17:51 +0000)]
Remove trailing space.

15 years agoMissing TX_UNK -> TX_POLL conversion
Sepherosa Ziehau [Wed, 25 Jun 2008 16:25:58 +0000 (16:25 +0000)]
Missing TX_UNK -> TX_POLL conversion

15 years agoTX_UNK -> TX_POLL
Sepherosa Ziehau [Wed, 25 Jun 2008 16:02:35 +0000 (16:02 +0000)]
TX_UNK -> TX_POLL

According-to: Linux forcedeth

15 years agoAdd MCP73, MCP77 and MCP79 support.
Sepherosa Ziehau [Wed, 25 Jun 2008 15:50:27 +0000 (15:50 +0000)]
Add MCP73, MCP77 and MCP79 support.

Obtained-from: Linux forcedeth

15 years agoregen
Sepherosa Ziehau [Wed, 25 Jun 2008 15:33:04 +0000 (15:33 +0000)]
regen

15 years agoAdd PCI ids for nVidia MCP77 MCP73 and MCP79 NICs
Sepherosa Ziehau [Wed, 25 Jun 2008 15:28:59 +0000 (15:28 +0000)]
Add PCI ids for nVidia MCP77 MCP73 and MCP79 NICs

15 years agoMCP65 has no hardware csum offloading support.
Sepherosa Ziehau [Wed, 25 Jun 2008 14:39:35 +0000 (14:39 +0000)]
MCP65 has no hardware csum offloading support.

Obtained-from: OpenBSD

15 years agoMake bce(4) aware ETHER_INPUT_CHAIN and ETHER_INPUT2
Sepherosa Ziehau [Wed, 25 Jun 2008 13:36:52 +0000 (13:36 +0000)]
Make bce(4) aware ETHER_INPUT_CHAIN and ETHER_INPUT2

15 years agoRemove an else branch to flatten indentation. Also free up memory allocate
Michael Neumann [Wed, 25 Jun 2008 13:25:06 +0000 (13:25 +0000)]
Remove an else branch to flatten indentation. Also free up memory allocate
by asprintf.

15 years agoImplement: hammer snapshot <softlink-dir> [<filesystem>]
Michael Neumann [Wed, 25 Jun 2008 13:10:06 +0000 (13:10 +0000)]
Implement: hammer snapshot <softlink-dir> [<filesystem>]

15 years agoMake bge(4) aware ETHER_INPUT_CHAIN and ETHER_INPUT2
Sepherosa Ziehau [Wed, 25 Jun 2008 13:00:09 +0000 (13:00 +0000)]
Make bge(4) aware ETHER_INPUT_CHAIN and ETHER_INPUT2

15 years agoMake fxp(4) aware ETHER_INPUT_CHAIN and ETHER_INPUT2
Sepherosa Ziehau [Wed, 25 Jun 2008 11:56:13 +0000 (11:56 +0000)]
Make fxp(4) aware ETHER_INPUT_CHAIN and ETHER_INPUT2

15 years agoMake xl(4) aware ETHER_INPUT_CHAIN and ETHER_INPUT2
Sepherosa Ziehau [Wed, 25 Jun 2008 11:46:03 +0000 (11:46 +0000)]
Make xl(4) aware ETHER_INPUT_CHAIN and ETHER_INPUT2

15 years agoOn UP system, make sure that mbuf chain is not empty before accessing it.
Sepherosa Ziehau [Wed, 25 Jun 2008 11:45:07 +0000 (11:45 +0000)]
On UP system, make sure that mbuf chain is not empty before accessing it.

15 years agoMake re(4) aware ETHER_INPUT_CHAIN and ETHER_INPUT2
Sepherosa Ziehau [Wed, 25 Jun 2008 11:02:33 +0000 (11:02 +0000)]
Make re(4) aware ETHER_INPUT_CHAIN and ETHER_INPUT2

15 years agoOne more place where an inode is still printed as a 32 bit quantity.
YONETANI Tomokazu [Tue, 24 Jun 2008 21:55:48 +0000 (21:55 +0000)]
One more place where an inode is still printed as a 32 bit quantity.

15 years agoDescribe flags more verbose.
Thomas Nikolajsen [Tue, 24 Jun 2008 21:13:26 +0000 (21:13 +0000)]
Describe flags more verbose.

15 years agoports is gone: remove use of PORTSSUPFILE.
Thomas Nikolajsen [Tue, 24 Jun 2008 20:22:30 +0000 (20:22 +0000)]
ports is gone: remove use of PORTSSUPFILE.

15 years agoHAMMER Utilities: Sync to 58B
Matthew Dillon [Tue, 24 Jun 2008 17:40:24 +0000 (17:40 +0000)]
HAMMER Utilities: Sync to 58B

* Update all utilities to deal with the cleaned up ioctl structures and
  to augment history and undo output with the non-monotonic timestamps.

15 years agoHAMMER 58B/Many: Revamp ioctls, add non-monotonic timestamps, mirroring
Matthew Dillon [Tue, 24 Jun 2008 17:38:17 +0000 (17:38 +0000)]
HAMMER 58B/Many: Revamp ioctls, add non-monotonic timestamps, mirroring

* Revamp most of HAMMER's ioctl structures with an eye towards future
  enhancements.

* Adjust on-media structures to include a non-monotonic creation and
  deletion timestamps.  Since the transaction id no longer translates
  to a timestamp adding explicit timestamps allows the 'hammer history'
  and 'undo' utilities to still display timestamps for the change history.

* Start working on the mirroring support ioctls.

15 years agoMake nfe(4) aware ETHET_INPUT_CHAIN and ETHER_INPUT2
Sepherosa Ziehau [Tue, 24 Jun 2008 13:55:17 +0000 (13:55 +0000)]
Make nfe(4) aware ETHET_INPUT_CHAIN and ETHER_INPUT2

15 years agoMove mbuf chain initialization into common place.
Sepherosa Ziehau [Tue, 24 Jun 2008 13:32:27 +0000 (13:32 +0000)]
Move mbuf chain initialization into common place.

15 years agoAdd vlan(4) support for ETHER_INPUT2. It is not built by default.
Sepherosa Ziehau [Tue, 24 Jun 2008 11:40:56 +0000 (11:40 +0000)]
Add vlan(4) support for ETHER_INPUT2.  It is not built by default.

15 years agoVLAN_MTU works as expected on em(4)
Sepherosa Ziehau [Tue, 24 Jun 2008 11:17:16 +0000 (11:17 +0000)]
VLAN_MTU works as expected on em(4)

15 years agoFix typo.
Sascha Wildner [Tue, 24 Jun 2008 07:58:00 +0000 (07:58 +0000)]
Fix typo.

15 years agoAdd nohistory flag.
Thomas Nikolajsen [Tue, 24 Jun 2008 03:24:52 +0000 (03:24 +0000)]
Add nohistory flag.

15 years agoHAMMER Utilities: Remove time/transaction-id conversion directives.
Matthew Dillon [Tue, 24 Jun 2008 02:42:48 +0000 (02:42 +0000)]
HAMMER Utilities: Remove time/transaction-id conversion directives.

* Remove time/tid conversion directives that no longer apply.

* Clean up usage().

15 years agoHAMMER 58A/Many: Mirroring support part 1
Matthew Dillon [Mon, 23 Jun 2008 21:42:48 +0000 (21:42 +0000)]
HAMMER 58A/Many: Mirroring support part 1

* Implement mastership domains for transaction ids to support multi-master
  mirroring and implement mastership selection at mount time.

  Mastership domains work by having the low 4 bits of the transaction id
  specify the mastership id (0-15).  This allows the mirroring code to
  distinguish between changes originating on a particular node and changes
  mirrored from another node.

  This also ensures that filesystem objects can be created on the mirrors
  in parallel without resulting in conflicitng object ids.

* Eliminate time-based TID generation.  Just increment the TID as
  appropriate.

  NOTE: Portions of this change may be reverted at a later time depending
  on how the mirroring implementation proceeds.

* Minor code cleanups.

15 years agoHAMMER Utilities: Sync with 58A
Matthew Dillon [Mon, 23 Jun 2008 21:31:58 +0000 (21:31 +0000)]
HAMMER Utilities: Sync with 58A

* Add the master=<number> mount option, a unique id (0-15) which uniquely
  identifies a master in a multi-master cluster.  It will initially be
  used to support multi-master mirroring.

* Rename the hammer softprune command to prune and remove the original
  prune.

* Transaction ids are no longer based on the time at all.  They used to
  be loosely based on the time but could get knocked off by bad system
  time.  Now they aren't at all.

15 years agoSupport S_IFDIR mknod() calls for HAMMER. This is used by the Hammer
Matthew Dillon [Mon, 23 Jun 2008 17:21:58 +0000 (17:21 +0000)]
Support S_IFDIR mknod() calls for HAMMER.  This is used by the Hammer
utility program to create pseudo-filesystem directories inside HAMMER.

15 years agoExpose ether_input_oncpu()
Sepherosa Ziehau [Mon, 23 Jun 2008 14:40:12 +0000 (14:40 +0000)]
Expose ether_input_oncpu()

15 years agoWhite space
Sepherosa Ziehau [Mon, 23 Jun 2008 14:29:56 +0000 (14:29 +0000)]
White space

15 years agoDiscard packets which was lingering on msgport when receiving interface
Sepherosa Ziehau [Mon, 23 Jun 2008 14:24:48 +0000 (14:24 +0000)]
Discard packets which was lingering on msgport when receiving interface
was brought down or entered monitor mode.

15 years agoAdd ether_input_chain2() which could be called by ethernet NIC drivers to
Sepherosa Ziehau [Mon, 23 Jun 2008 11:57:19 +0000 (11:57 +0000)]
Add ether_input_chain2() which could be called by ethernet NIC drivers to
deliver packets into upper layer.  Unlike ether_input_chain(), this function
only locates the msgport for the input packets, rest of the functionalities
of ether_input_chain() are performed in the protocal threads, i.e. after
packets reaches target msgports.  This function and other related functions
are put under kernel option ETHER_INPUT2, which is _not_ enabled by default.
As of this commit, vlan(4) and ipflow don't work with ether_input_chain2().

em(4) is adapted to aware ETHER_INPUT2.

Reviewed-by: dillon@, aggelos@ (early version)
# Additional comments are added to the the reviewed patch.

15 years agoHAMMER Utilities: Add the 'pseudofs' directive for commit 57
Matthew Dillon [Mon, 23 Jun 2008 07:37:54 +0000 (07:37 +0000)]
HAMMER Utilities: Add the 'pseudofs' directive for commit 57

* The pseudofs directive may be used to create pseudo-filesystems within
  a HAMMER filesystem.  Each such filesystem maintains its own inode
  numbering space and can be used as a replication target.  Up to 65535
  pseudo-filesystems are supported.

15 years agoHAMMER 57/Many: Pseudofs support
Matthew Dillon [Mon, 23 Jun 2008 07:31:14 +0000 (07:31 +0000)]
HAMMER 57/Many: Pseudofs support

* Finish up implementation of the localization field which is used to
  split the B-Tree up into domains.  Use the upper 16 bits as a
  pseudo filesytem selector.

* Code hammer_vop_mknod() to be able to create pseudo-filesystems.

15 years agos/Fx/Dx/
Sascha Wildner [Mon, 23 Jun 2008 06:56:25 +0000 (06:56 +0000)]
s/Fx/Dx/

15 years agoUse standard section name: ACKNOWLEDGEMENTS -> AUTHORS
Sascha Wildner [Mon, 23 Jun 2008 06:22:15 +0000 (06:22 +0000)]
Use standard section name: ACKNOWLEDGEMENTS -> AUTHORS

15 years agoFix typo: Phenix -> Phoenix
Sascha Wildner [Sun, 22 Jun 2008 21:26:09 +0000 (21:26 +0000)]
Fix typo: Phenix -> Phoenix

15 years agoAdd an isa(4) manual page.
Sascha Wildner [Sun, 22 Jun 2008 20:57:39 +0000 (20:57 +0000)]
Add an isa(4) manual page.

Derived-from: OpenBSD

15 years agoUpdate cvs id.
Sascha Wildner [Sun, 22 Jun 2008 20:39:40 +0000 (20:39 +0000)]
Update cvs id.

15 years agoSync with FreeBSD.
Sascha Wildner [Sun, 22 Jun 2008 20:34:46 +0000 (20:34 +0000)]
Sync with FreeBSD.

15 years agoAdd a pnpbios(4) manpage.
Sascha Wildner [Sun, 22 Jun 2008 20:00:23 +0000 (20:00 +0000)]
Add a pnpbios(4) manpage.

Taken-from: FreeBSD

15 years agos/Fx/Dx/
Sascha Wildner [Sun, 22 Jun 2008 19:33:55 +0000 (19:33 +0000)]
s/Fx/Dx/

15 years agoSort alphabetically.
Sascha Wildner [Sun, 22 Jun 2008 16:14:44 +0000 (16:14 +0000)]
Sort alphabetically.

15 years agoMention aggelos' lwn.net article.
Sascha Wildner [Sun, 22 Jun 2008 11:11:09 +0000 (11:11 +0000)]
Mention aggelos' lwn.net article.

15 years agoHAMMER 56F/Many: Stabilization pass
Matthew Dillon [Sat, 21 Jun 2008 20:21:58 +0000 (20:21 +0000)]
HAMMER 56F/Many: Stabilization pass

* When data is reblocked any related direct-io offsets cached in front-end
  buffer cache buffers must be cleaned out.  This also requires running
  through any snapshotted inodes referencing the same object.

* The flusher must check that the cached B-Tree node has not been flagged
  as deleted (HAMMER_NODE_DELETED) before seeking to it.

* hammer_io_direct_read() now requires and asserts that the second-level
  cached offset in the BIO is a zone-2 offset.

* hammer_io_direct_write() no longer overwrites the second-level cached
  offset with the third level raw disk offset.  It pushes a third level
  to set the raw disk offset.

* When creating a directory entry, set the localization field for pseudo-fs
  support (which isn't quite working yet anyway so no biggy).

* Move the Red-Black tree generator for inodes from hammer_ondisk.c to
  hammer_inode.c.

15 years agoSilence -Wold-style-definition.
Sascha Wildner [Sat, 21 Jun 2008 20:05:04 +0000 (20:05 +0000)]
Silence -Wold-style-definition.

15 years agoSilence -Wold-style-definition.
Sascha Wildner [Sat, 21 Jun 2008 20:01:14 +0000 (20:01 +0000)]
Silence -Wold-style-definition.

15 years agoFix -Wold-style-definition warnings in the scanner skeleton.
Sascha Wildner [Sat, 21 Jun 2008 19:32:14 +0000 (19:32 +0000)]
Fix -Wold-style-definition warnings in the scanner skeleton.

15 years agoAnsify
Sascha Wildner [Sat, 21 Jun 2008 19:29:21 +0000 (19:29 +0000)]
Ansify

15 years agoFix paths.
Sascha Wildner [Sat, 21 Jun 2008 17:15:57 +0000 (17:15 +0000)]
Fix paths.

15 years agoUpdate FILES section.
Sascha Wildner [Sat, 21 Jun 2008 17:08:20 +0000 (17:08 +0000)]
Update FILES section.

15 years agoFix path in comment.
Sascha Wildner [Sat, 21 Jun 2008 16:05:06 +0000 (16:05 +0000)]
Fix path in comment.

15 years agoMore copy{in,out} removal for ctloutput routines
Aggelos Economopoulos [Sat, 21 Jun 2008 12:30:19 +0000 (12:30 +0000)]
More copy{in,out} removal for ctloutput routines

15 years agoSince either hardware or ether input code will strip packet's vlan tag,
Sepherosa Ziehau [Sat, 21 Jun 2008 06:47:29 +0000 (06:47 +0000)]
Since either hardware or ether input code will strip packet's vlan tag,
before the packet could reach ether level ipfw filtering, we will have
to change the packet's ether type to VLAN, if the packet was vlan tagged,
so ipfw could see the correct packet mac-type.

15 years agoUse __func__, instead of hardcode the function name.
Sepherosa Ziehau [Sat, 21 Jun 2008 05:55:46 +0000 (05:55 +0000)]
Use __func__, instead of hardcode the function name.

15 years agoWhite space
Sepherosa Ziehau [Sat, 21 Jun 2008 03:58:09 +0000 (03:58 +0000)]
White space

15 years agoMinor style change
Sepherosa Ziehau [Sat, 21 Jun 2008 03:39:20 +0000 (03:39 +0000)]
Minor style change

15 years agoHAMMER 56E/Many: Correct bug in 56D
Matthew Dillon [Sat, 21 Jun 2008 01:24:12 +0000 (01:24 +0000)]
HAMMER 56E/Many: Correct bug in 56D

* Fix a bug related to fsync that could result in an infinite loop.

15 years agoHAMMER 56D/Many: Media structure finalization, atime/mtime, etc.
Matthew Dillon [Fri, 20 Jun 2008 21:24:53 +0000 (21:24 +0000)]
HAMMER 56D/Many: Media structure finalization, atime/mtime, etc.

* Move the atime and mtime fields to the end of struct hammer_inode_data.
  CRCs on hammer_inode_data no longer include atime or mtime, allowing
  them to be updated without having to update the related B-Tree node.

* Change the time format for ctime, atime, and mtime.  These 64 bit fields
  now store microseconds in real time instead of transaction ids.

* atime is now updated asynchronously, and mtime is now updated with
  UNDO records only.  Split the ITIMES flag into ATIME and MTIME and
  no longer set the DDIRTY (inode_data generally dirty) flag when the
  mtime changes.

* Finish on-media structural components for pseudo-fs support inside a
  HAMMER filesystem.

* Finish on-media structural components for adding a serial number to
  the B-Tree element structures, for mirroring support.

* Make fsync() wait for the flush to complete, issue extra flushes as
  needed to take the UNDO FIFO's start position past the fsync'd data
  so a crash does not undo it.

15 years agoHAMMER Utilities: Sync with 56D
Matthew Dillon [Fri, 20 Jun 2008 21:18:11 +0000 (21:18 +0000)]
HAMMER Utilities: Sync with 56D

* Time fields moved and format changed to disassociate them from transaction
  ids.

15 years agoDon't do copy{in,out} in ctloutput any more
Aggelos Economopoulos [Fri, 20 Jun 2008 20:58:37 +0000 (20:58 +0000)]
Don't do copy{in,out} in ctloutput any more

15 years agoUpdate bluetooth ctloutput functions not to use copy{in,out}
Aggelos Economopoulos [Fri, 20 Jun 2008 20:52:29 +0000 (20:52 +0000)]
Update bluetooth ctloutput functions not to use copy{in,out}

15 years agoFix a bug in cluster_read(). An error returned by the call to
Matthew Dillon [Fri, 20 Jun 2008 05:40:04 +0000 (05:40 +0000)]
Fix a bug in cluster_read().  An error returned by the call to
VOP_BMAP() in the late read-ahead code is unrelated to the success
of the call and should be ignored.

15 years agoHAMMER 56C/Many: Performance tuning - MEDIA STRUCTURES CHANGED!
Matthew Dillon [Fri, 20 Jun 2008 05:38:26 +0000 (05:38 +0000)]
HAMMER 56C/Many: Performance tuning - MEDIA STRUCTURES CHANGED!

* Implement variable block sizes.  Records at offsets < 1MB use 16K buffers
  while records at offsets >= 1MB use 64K buffers.  This improves performance
  primarily by reducing the number of B-Tree elements we have to stuff.

* Mess around with the deadlock handling code a bit.  It still needs
  a re-think but it works.  Implement low-priority shared locks.
  A low priority shared lock can only be acquired if no other locks are
  held by the thread.

* Implement slow-down code for the record backlog to the flusher and
  reimplement the slow-down code that deals with reclaimed inodes queued
  to the flusher.  This should hopefully fix the kernel memory exhaustion
  issues for M_HAMMER.

* Update layer2->append_off.  It isn't implemented yet but doing this now
  will prevent media incompatibilities later on when it does get implemented.

* Split hammer_blockmap_free() into hammer_blockmap_free() and
  hammer_blockmap_finalize().

* Fix a bug in the delayed-CRC handling related to reblocking.  When
  throwing away a modified buffer, pending CRC requests must also be
  thrown away.

* Fix a bug in the record overlap compare code.  If we cannot return 0
  due to an overlap because the record has been deleted, we must still
  return an appropriate formal code so the scan progresses in the
  correct direction down the red-black tree.

* Make data in the meta-data zone a meta-data buffer structure type so
  it gets synced to disk at the appropriate time.  This may be temporary,
  it's needed to deal with the atime/mtime code but another commit may
  soon make it moot.

* Bump the seqcount so cluster_read() does the right thing when reading
  into a large UIO just after opening a file.

* Do a better job calculating vap->va_bytes.  It's still fake, but its a
  more accurate fake.

* Fix an issue in the BMAP code related to ranges that do not cover the
  requested logical offset.

* Fix a bug in the blockmap code.  If a reservation is released without
  finalizing any allocations within that big-block, another zone can steal
  it out from under the current zone's next_offset, resulting in a zone
  mismatch panic.

15 years agoPrototype declarations don't have an initializer.
YONETANI Tomokazu [Fri, 20 Jun 2008 01:23:27 +0000 (01:23 +0000)]
Prototype declarations don't have an initializer.

15 years agoHAMMER Utilities: Bug fixes
Matthew Dillon [Thu, 19 Jun 2008 23:30:30 +0000 (23:30 +0000)]
HAMMER Utilities: Bug fixes

* The initial layer1->blocks_free was not properly accounting for
  allocations made during newfs_hammer.

15 years agoMiscellanious performance adjustments to the kernel
Matthew Dillon [Thu, 19 Jun 2008 23:27:39 +0000 (23:27 +0000)]
Miscellanious performance adjustments to the kernel

* Add an argument to VOP_BMAP so VFSs can discern the type of operation
  the BMAP is being done for.

* Normalize the variable name denoting the blocksize to 'blksize' in
  vfs_cluster.c.

* Fix a bug in the cluster code where a stale bp->b_error could wind up
  getting returned when B_ERROR is not set.

* Do not B_AGE cluster bufs.

* Pass the block size to both cluster_read() and cluster_write() instead
  of those routines getting the block size from
  vp->v_mount->mnt_stat.f_iosize.  This allows different areas of a file
  to use a different block size.

* Properly initialize bp->b_bio2.bio_offset to doffset in cluster_read().
  This fixes an issue where VFSs were making an extra, unnecessary call
  to BMAP.

* Do not recycle vnodes on the free list until numvnodes has reached
  desiredvnodes.  Vnodes were being recycled when their resident page count
  had dropped to zero, but this is actually too early as the VFS may cache
  important information in the vnode that would otherwise require a number
  of I/O's to re-acquire.  This mainly helps HAMMER (whos inode lookups are
  fairly expensive).

* Do not VAGE vnodes.

* Remove the minvnodes test.  There is no reason not to load the vnode cache
  all the way through to its max.

* buf_cmd_t visibility for the new BMAP argument.

15 years agoProvide MP_LOCK_HELD() for UP builds as well
Aggelos Economopoulos [Thu, 19 Jun 2008 21:32:55 +0000 (21:32 +0000)]
Provide MP_LOCK_HELD() for UP builds as well

15 years agoDuring bridge destroy, dispatch bridge member/span deletion to netisr0
Sepherosa Ziehau [Thu, 19 Jun 2008 15:51:57 +0000 (15:51 +0000)]
During bridge destroy, dispatch bridge member/span deletion to netisr0

15 years agoDispatch whole bridge_ifdetach() to netisr0, since it will touch
Sepherosa Ziehau [Thu, 19 Jun 2008 15:26:47 +0000 (15:26 +0000)]
Dispatch whole bridge_ifdetach() to netisr0, since it will touch
member interface's if_bridge

15 years ago- In bridge_delete_member(), release bridge's serializer when configure
Sepherosa Ziehau [Thu, 19 Jun 2008 14:33:36 +0000 (14:33 +0000)]
- In bridge_delete_member(), release bridge's serializer when configure
  member interface to avoid possible deadlock.  Add comment about it.
  Clear member interface's if_bridge early.
- In bridge_ifdetach(), hold proper bridge interface's serializer before
  calling various deletion functions.

15 years agoChange suseconds_t to long as it is in most of systems. Fixes a lot of
Hasso Tepper [Thu, 19 Jun 2008 12:23:51 +0000 (12:23 +0000)]
Change suseconds_t to long as it is in most of systems. Fixes a lot of
printf related warnings everywhere.

Noticed-by: swildner@
15 years agoMinor style change
Sepherosa Ziehau [Thu, 19 Jun 2008 11:56:04 +0000 (11:56 +0000)]
Minor style change

15 years ago- Don't dispatch bridge 'get' ioctl to netisr0, there are copyouts down
Sepherosa Ziehau [Thu, 19 Jun 2008 11:33:07 +0000 (11:33 +0000)]
- Don't dispatch bridge 'get' ioctl to netisr0, there are copyouts down
  deep inside certain bridge ioctl functions.  Add comment about it.
- Dispatch bridge 'set' ioctl to netisr0, i.e. 'set' ioctls are serialized
  by netisr0.

15 years agoRemove KKASSERT() from the code block where not all callers' CPU own
YONETANI Tomokazu [Thu, 19 Jun 2008 05:34:23 +0000 (05:34 +0000)]
Remove KKASSERT() from the code block where not all callers' CPU own
the LWP, occasionally leading to a panic because of race between CPUs.

Explained-by: dillon@
15 years agoupdate unix domain socket option retrieval
Aggelos Economopoulos [Thu, 19 Jun 2008 00:03:45 +0000 (00:03 +0000)]
update unix domain socket option retrieval

Noticed-by: Andras Voroskoi
15 years agoRemove extra parenthesis.
Sascha Wildner [Wed, 18 Jun 2008 11:38:37 +0000 (11:38 +0000)]
Remove extra parenthesis.

15 years agoMove timeval struct into its own header and include it from headers where
Hasso Tepper [Wed, 18 Jun 2008 09:36:07 +0000 (09:36 +0000)]
Move timeval struct into its own header and include it from headers where
needed or defined by standards plus from sys/types.h. This makes several
pkgsrc packages more happy.

Including just sys/types.h to use struct timeval works there in every BSD,
Linux and Solaris, so we can't just ignore it.

Also make struct timeval standards compilant in progress.

Inspired-by: FreeBSD
15 years agoLink libarchive against libbz2 and libz to be compatible with upstream.
Hasso Tepper [Wed, 18 Jun 2008 06:28:21 +0000 (06:28 +0000)]
Link libarchive against libbz2 and libz to be compatible with upstream.
In this way third party applications linking against libarchive don't need
a special care.

15 years agoHAMMER Utilities: Sync with 56B
Matthew Dillon [Wed, 18 Jun 2008 01:13:52 +0000 (01:13 +0000)]
HAMMER Utilities: Sync with 56B

* Change the way atime is stored.

15 years agoHAMMER 56B/Many: Performance tuning - MEDIA STRUCTURES CHANGED!
Matthew Dillon [Wed, 18 Jun 2008 01:13:30 +0000 (01:13 +0000)]
HAMMER 56B/Many: Performance tuning - MEDIA STRUCTURES CHANGED!

* MEDIA CHANGE: The atime has been moved back into the inode data proper.
  The nlinks field has also been moved.

* PERFORMANCE: The CRC for cached B-Tree nodes was being run on every access
  instead of just the first time.  This was the cause of HAMMER's poor
  directory scanning performance and cpu-intensive write flushes.

  Adjusted to only check the CRC on the initial load into the buffer cache.

* PERFORMANCE: The CRC for modified B-Tree nodes was being regenerated every
  time the node was modified, so a large number of insertions or deletions
  modifying the same B-Tree need needlessly regenerated the CRC each time.

  Adjusted to delay generation of the CRC until just before the buffer is
  flushed to the physical media.

  Just for the record, B-Tree nodes are 4K and it takes ~25uS to run a CRC
  on them.  Needless to say removing the unnecessary calls solved a lot of
  performance issues.

* PERFORMANCE: Removed limitations in the node caching algorithms.  Now more
  then one inode can cache pointers to the same B-Tree node.

* PERFORMANCE: When calculating the parent B-Tree node we have to scan the
  element array to locate the index that points back to the child.  Use a
  power-of-2 algorithm instead of a linear scan.

* PERFORMANCE: Clean up the selection of ip->cache[0] or ip->cache[1] based
  on whether we are trying to cache the location of the inode or the
  location of the file object's data.

15 years agodo early copyin / delayed copyout for socket options
Aggelos Economopoulos [Tue, 17 Jun 2008 20:50:12 +0000 (20:50 +0000)]
do early copyin / delayed copyout for socket options

15 years agoTemporarly comment out message based bridge control; there are copyout deep
Sepherosa Ziehau [Tue, 17 Jun 2008 12:45:55 +0000 (12:45 +0000)]
Temporarly comment out message based bridge control; there are copyout deep
inside of certain bridge_ioctl functions

15 years agoRelease bridge serializer before calling bridge_control
Sepherosa Ziehau [Tue, 17 Jun 2008 12:24:30 +0000 (12:24 +0000)]
Release bridge serializer before calling bridge_control

15 years ago- Release bridge interface's serializer when configuring member interface
Sepherosa Ziehau [Tue, 17 Jun 2008 11:49:11 +0000 (11:49 +0000)]
- Release bridge interface's serializer when configuring member interface
- Set member interface's ifnet.if_bridge only after everything on the bridge
  has been setup
- Minor style change

15 years agoChange number of TX desc back to 256. 512 TX desc does not work on 88E8036.
Sepherosa Ziehau [Tue, 17 Jun 2008 11:00:13 +0000 (11:00 +0000)]
Change number of TX desc back to 256.  512 TX desc does not work on 88E8036.

Reported-by: Ferruccio Zamuner <nonsolosoft@diff.org>
15 years agoHAMMER Utilities: sync with 56A
Matthew Dillon [Tue, 17 Jun 2008 04:03:38 +0000 (04:03 +0000)]
HAMMER Utilities: sync with 56A

* New 'hammer bstats <interval>' command to monitor B-Tree statistics.

* newfs_hammer and related code significantly changed with regards to
  media changes in commit 56A.

15 years agoHAMMER 56A/Many: Performance tuning - MEDIA STRUCTURES CHANGED!
Matthew Dillon [Tue, 17 Jun 2008 04:02:38 +0000 (04:02 +0000)]
HAMMER 56A/Many: Performance tuning - MEDIA STRUCTURES CHANGED!

* MEDIA CHANGE: The blockmaps have been folded into the freemap.  Allocations
  are now made directly out of the freemap.  More work is expected here.

  The blockmaps are still used to sequence allocations, but no block
  number translation is required any more.  This didn't improve performance
  much but it will make it easier for future optimizations to localize
  allocations.

* PERFORMANCE: Removed the holes recording code.  Another commit will
  soon take over the functionality.

* PERFORMANCE: The flusher's slave threads now collect a number of inodes
  into a batch before starting their work, in an attempt to reduce
  deadlocks between slave threads from adjacent inodes.

* PERFORMANCE: B-Tree positional caching now works much better, greatly
  reducing the cpu overhead when accessing the filesystem.

* PERFORMANCE: Added a write-append optimization.  Do not do a
  lookup/iteration to locate records being overwritten when no such
  records should exist.  This cuts the cpu overhead of write-append
  flushes in half.

* PERFORMANCE: Add a vfs.hammer.write_mode sysctl feature to test out
  two different ways of queueing write I/O's.

* Added B-Tree statistics (hammer bstats 1).

15 years agoSerialize bridge configuration operations by netisr0, so that "test and set"
Sepherosa Ziehau [Mon, 16 Jun 2008 14:48:01 +0000 (14:48 +0000)]
Serialize bridge configuration operations by netisr0, so that "test and set"
member interface's if_bridge field could be safe.

15 years agoUpdate build structure for libarchive update.
Peter Avalos [Mon, 16 Jun 2008 08:20:23 +0000 (08:20 +0000)]
Update build structure for libarchive update.

15 years agoMerge from vendor branch LIBARCHIVE:
Peter Avalos [Mon, 16 Jun 2008 08:12:40 +0000 (08:12 +0000)]
Merge from vendor branch LIBARCHIVE:
Import libarchive-2.5.4b.

Requested-by: hasso
15 years agoImport libarchive-2.5.4b.
Peter Avalos [Mon, 16 Jun 2008 08:12:40 +0000 (08:12 +0000)]
Import libarchive-2.5.4b.

Requested-by: hasso
15 years agoWe must process incoming IPI messages when spinning in the thread
Matthew Dillon [Mon, 16 Jun 2008 02:00:05 +0000 (02:00 +0000)]
We must process incoming IPI messages when spinning in the thread
cpu acquisition code.  This avoids a deadlock which can occur between
the cpu whos thread is trying to exit and the cpu receiving the thread.

Reported-by: Gary Allan <dragonfly@gallan.co.uk>
15 years agoThe default value of net.inet6.ip6.v6only is 'on'.
Sascha Wildner [Sun, 15 Jun 2008 19:20:05 +0000 (19:20 +0000)]
The default value of net.inet6.ip6.v6only is 'on'.

Noticed-by: Jordan Gordeev <jgordeev@dir.bg>
15 years ago- In if_up(), purge ifnet.if_snd before turning on IFF_UP, this is used to
Sepherosa Ziehau [Sun, 15 Jun 2008 12:15:08 +0000 (12:15 +0000)]
- In if_up(), purge ifnet.if_snd before turning on IFF_UP, this is used to
  clean up packets that sneaked into ifnet.if_snd after if_down()
- Strip blank line

15 years ago- Don't turn on IFF_OACTIVE when dequeuing ifnet.if_snd; it no longer
Sepherosa Ziehau [Sun, 15 Jun 2008 12:01:32 +0000 (12:01 +0000)]
- Don't turn on IFF_OACTIVE when dequeuing ifnet.if_snd; it no longer
  makes sense
- If parent interface is NULL, purge ifnet.if_snd